TheWidlarzGroup / react-native-video

A <Video /> component for react-native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: [iOS] Video Playback Stops Background Music on v6.x.x

fatiherdogan01 opened this issue · comments

Version

6.1.1

What platforms are you having the problem on?

iOS

Architecture

Old architecture

What happened?

Video playback stops background music on iOS

Reproduction

No response

Reproduction

ignoreSilentSwitch="obey" property is working 5.2.1 version but not working 6.0.0-rc.1 or 6.1.1 version
That property may have changed or become obsolete with the 6.x.x version.
Please check this and fix it.

@fatiherdogan01 did you check silent mode? According to the document, if you set obey, the audio doesn't play when the silent switch is set.

@fatiherdogan01 did you check silent mode? According to the document, if you set obey, the audio doesn't play when the silent switch is set.

As I wrote, it works with version 5.2.1 but not with version 6.1.1

@fatiherdogan01 I tested it on a sample app and everything worked correctly. I set ignoreSilentSwitch="obey" and the audio didn't play when the silent switch was set. When I changed the silent switch, the audio played. Could you please provide more information because I couldn't reproduce the issue?

thank you for your efforts @seyedmostafahasani

<Video
    shutterColor={getThemeProperty(themeName, THEME.BORDER_COLOR)} // Android
    disableFocus // Android
    ignoreSilentSwitch={IgnoreSilentSwitchType.OBEY}
    repeat
    source={item.media}
    style={styles.mediaBackground}
/>

I tested again on iOS(15.8.2). I also received feedback about this issue from my app in production.

It doesn't work on version 6.1.2. Background audio is stop.
It works on version 5.2.1. Background audio is not stop.

I using 5.2.1 version in production and no problem.