viromedia / viro

ViroReact: AR and VR using React Native
MIT License
2.3k stars 482 forks source link

App crashes on using ViroVideo! #997

Open IRIBApps opened 1 year ago

IRIBApps commented 1 year ago

Environment

Please provide the following information about your environment:

  1. Development OS: Mac, Windows, Linux
  2. Device OS & Version: What Android OS version (7.0, 8.0, etc.) or iOS version (11.0, 11.2) is your device running on?
  3. Version: ViroReact version and React Native version
  4. Device(s): What device(s) are you are seeing the issue on (i.e. iPhone X, Samsung Note 8, etc)

Description

Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.

Reproducible Demo

Let us know how to reproduce the issue. Include a code sample, screen capture, video recording. The more information you provide, the better we can support you.

IRIBApps commented 1 year ago

Hello Guys,I', trying to display video using ViroVideo but every time app crashes.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}
      />
    );
  };

  var styles = StyleSheet.create({
    f1: {flex: 1},
    helloWorldTextStyle: {
      fontFamily: 'Arial',
      fontSize: 30,
      color: '#ffffff',
      textAlignVertical: 'center',
      textAlign: 'center',
    },

where is the problem?thank you for your attention as i said,app crashes!

Bilin-David commented 5 months ago

got any solution for this?

JBhrayn commented 5 months ago

been having the same issue.

mushereme commented 4 months ago

same here, is there any debugging method?