react-native-youtube-iframe icon indicating copy to clipboard operation
react-native-youtube-iframe copied to clipboard

Volume prop not affecting volume at all on YoutubePlayer

Open ChristopherGabba opened this issue 2 years ago • 4 comments

Using YoutubePlayer in very typical way, nothing fancy, just trying to play video on main screen.

                    <YoutubePlayer
                        ref={youtubeRef}
                        mute={true}
                        volume={50}
                        height={250}
                        width={width}
                        forceAndroidAutoplay
                        allowWebViewZoom
                        initialPlayerParams={{
                            controls: false,
                            preventFullScreen: true
                        }}
                        play={true}
                        onReady={() => { console.log('video Ready') }}
                        videoId={'sSsTR8qqDl4'} />Ï

The mute function works fine, but no matter if I set the volume at 0, 0.1, or 100 the volume is the exact same with no change. If I set the volume to 0 (but don't turn on mute at all), the symbol on the YouTube controls even shows muted but the volume is still maximum.

I actually tried playing this video in a web view using source={{html: xxx}} and used a div and video html component and injecting javascript to change the volume and it did not work there either. I suspect this issue may be related to the react-native-webview because it was similar there as well, so I submitted an issue there too: https://github.com/react-native-webview/react-native-webview/issues/3127.

To Reproduce Paste the YouTube player code above in app with the same params.

Expected behavior The volume should change with the volume prop changing.

Smartphone (please complete the following information):

  • Device: iPhone 12 using expo dev client
  • OS + version: iOS 16.6
  • react-native-youtube-iframe version: "^2.3.0"
  • react-native-webview version: "13.2.2"
  • Expo version [if using expo]: "^49.0.7"

ChristopherGabba avatar Sep 03 '23 02:09 ChristopherGabba

same here

uoon-dev avatar May 14 '24 07:05 uoon-dev