ViroVideo is crashing if Wrapped in "ViroFlexView"
If "ViroVideo" is Wrappedup in "ViroNode" it's working but if the "ViroVideo" is wrapped up in "ViroFlexView" application is crashing -
"react": "16.8.3",
"react-native": "0.59.3",
"react-viro": "2.14.0"
Below Code is working
<ViroNode position={[x, y, z]} width={wdt} height={hgt}>
<ViroVideo height={videoHeight} width={videoWdith} paused={false} loop={true}
source={{uri:'https://firebasestorage.googleapis.com/v0/b/odoori-
de298.appspot.com/o/Videos%2F2_1556398090985.mp4?
alt=media&token=ccfce9f7-89e9-4f55-8d82-97750452ee6a'}}>
</ViroVideo>
</ViroNode>
Below is crashing
<ViroFlexView position={[x, y, z]} width={wdt} height={hgt}>
<ViroVideo height={videoHeight} width={videoWdith} paused={false} loop={true}
source={{uri:'https://firebasestorage.googleapis.com/v0/b/odoori-
de298.appspot.com/o/Videos%2F2_1556398090985.mp4?
alt=media&token=ccfce9f7-89e9-4f55-8d82-97750452ee6a'}}>
</ViroVideo>
</ViroFlexView>
@VikAdvani
Could you please check above issue ?
You have <ViroVideo width={videoWdith} ... /> vs. <ViroVideo width={videoWidth} ... />.
Might be a typo issue? I wonder if the reference error is failing silently causing the app to crash.
my app is also crashing code is below-:
import React, { useState } from 'react'; import { StyleSheet } from 'react-native'; import { ViroARScene, ViroText, ViroConstants, ViroARSceneNavigator, ViroNode, ViroSphere, Viro3DObject, ViroAmbientLight, ViroScene, ViroImage, ViroFlexView, Viro360Image, Viro360Video, ViroAnimatedImage, ViroAnimations, ViroBox, ViroARImageMarker, ViroARPlane, ViroARPlaneSelector, ViroButton, ViroCamera, ViroDirectionalLight, ViroVideo } from '@viro-community/react-viro';
const InititalScene = () => {
return (
<ViroARScene >
<ViroFlexView
backgroundColor="#fff"
width={0.5}
height={0.2}
opacity={1}
>
<ViroVideo
source={require('./m.mp4')}
loop={true}
position={[0, 0, -5]}
/>
</ViroFlexView>
</ViroARScene>
); }
export default () => { return ( <ViroARSceneNavigator initialScene={{ scene: InititalScene }} style={{ flex: 1 }} /> ); };
var styles = StyleSheet.create({
});