I', trying to display video using ViroReact for an AR App. My reference for this work is ViroMedia github source but every time app crashes. i'm using ViroVideo for this porpuse
this is my source code:
.......
const HelloWorldSceneAR = () => {
const [text,setText]=useState("Initializing AR...");
function onInitialized(state, reason) {
console.log("erorrrrrrrrr",state,reason);
if (state === ViroTrackingStateConstants.TRACKING_NORMAL) {
alert("good initalize......");
} else if (state === ViroTrackingStateConstants.TRACKING_UNAVAILABLE) {
// Handle loss of tracking
}
}
return (
<ViroARScene onTrackingUpdated={onInitialized}>
<ViroVideo width={1.7} height={0.95}
position={[0, -5, -2.9]} scale={[2, 2, 2]} paused={false}
source={require("./res/alphachica.mp4")}
loop={true} muted={false} volume={1.0}
/>
);
};
export default () => {
return (
<ViroARSceneNavigator
autofocus={true}
initialScene={{
scene: HelloWorldSceneAR,
}}
style={styles.f1}
/>
);
};
where is the problem?thank you for your attention as i said,app crashes!
what is my problem?thanks