React-native-video: Videos / Audios stop playing when switching source or running multiple videos on iOS

Created on 2 Sep 2019  路  3Comments  路  Source: react-native-video/react-native-video

Bug

Videos / Audios stop playing when switching source or running multiple videos on iOS. The following is logged into the debug console through XCode.

In Android everything works as intended.

'''

Environment info

React Native: 0.59.9
react-native-video: 4.2.0
react-native-video pod version: 4.4.0

Steps To Reproduce

1 - Have multiple <Video paused={true} /> components on a screen (different sources for each).
2 - change paused prop to false in one of them.
3 - while the first still plays, make a second video play as well (by changing paused to false)

Expected Result

The first and second videos should play accordingly

Actual Result

Videos stop playing until components are unmounted or app restarted

Possibly related issues:

1727

Most helpful comment

I managed to track down the issue. It is not a problem with this library. Sorry for the inconvenience.
In the case someone runs into anything similar, here is what happened

My app depends on react-native-sound-recorder to record audios, and sometimes that library, not this one, would hang the whole avaudiosession thing.

The issue was resolved in this pull request (not yet on npm)

Lesson here is: Always try to create a simple reproduction case of a bug before bothering the library maintainers.

All 3 comments

Can you test with this branch?
https://github.com/24i/react-native-video/tree/feature/ios-player-deinit

if it works I will make the PR

Hi, thanks for investing some time into this

It didn't work, unfortunately, same error.

I did try to isolate the case and found out that if the video/audio files are bundled with the app, everything runs fine.

In my app, though, the files are first downloaded to an internal directory (the documents dir). The

I will create a reproduction case and update this issue

I managed to track down the issue. It is not a problem with this library. Sorry for the inconvenience.
In the case someone runs into anything similar, here is what happened

My app depends on react-native-sound-recorder to record audios, and sometimes that library, not this one, would hang the whole avaudiosession thing.

The issue was resolved in this pull request (not yet on npm)

Lesson here is: Always try to create a simple reproduction case of a bug before bothering the library maintainers.

Was this page helpful?
0 / 5 - 0 ratings