viromedia / viro

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

Viro360Video with uri source stops playing video but audio is ok #778

Open krisix opened 4 years ago

krisix commented 4 years ago

Environment

  1. Development OS: Mac
  2. Device OS & Version: iOS version 12.4.1
  3. Version: ViroReact 2.17.0 and React Native 0.59.10
  4. Device(s): iPhone 7

Description

I want to play 360 video - everything works fine when the video is embedded and I load it with require(). When I want to play remote video using source={{ uri: 'https://...' }} it plays a few seconds and then stops. But the audio is still playing in the background. Only the video is not playing anymore.

Also I don't receive onBufferStart and onBufferEnd events.

I've created a simple demo using react-native-video and the same video plays ok (although you can't move around) - so it is not a problem with a web server.

I've search other issues and found that it could be a problem with no passing apiKey - but my video is not going black and I'm using ViroReact 2.17.0.

Reproducible Demo

  <ViroScene>
    <Viro360Video source={ { uri: 'https://slaskie.tenkai.pl/mobileapp/chudow_360_FINALNA_1.mp4' } } loop={ true } paused={ this.state.isPaused } 
      onBufferStart={ () => { console.log('buf start'); } } onBufferEnd={ () => { console.log('buf end'); } } 
      onError={ (e) => { console.log('buf error'); } }
      onUpdateTime={ (currentPlaybackTimeInSeconds, totalPlayBackDurationInSeconds) => { console.log('buf', currentPlaybackTimeInSeconds, totalPlayBackDurationInSeconds); } }
      />
  </ViroScene>
LarsRa commented 4 years ago

I have also the issue of not receiving onBufferStart and onBufferEnd events from the viro360video component.

krisix commented 4 years ago

I have also the issue of not receiving onBufferStart and onBufferEnd events from the viro360video component.

Can you share your code?

adamhalasz commented 4 years ago

@krisix were you able to solve this? I'm having the same issue.

krisix commented 4 years ago

@krisix were you able to solve this? I'm having the same issue.

It works ok on production builds - both iOS and Android. I'm using Viro 2.17.0.

I had problems only with dev builds.