Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume prop not affecting volume at all on YoutubePlayer #305

Open
ChristopherGabba opened this issue Sep 3, 2023 · 4 comments
Open

Volume prop not affecting volume at all on YoutubePlayer #305

ChristopherGabba opened this issue Sep 3, 2023 · 4 comments

Comments

@ChristopherGabba
Copy link

ChristopherGabba commented Sep 3, 2023

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: react-native-webview/react-native-webview#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"
@uoon-dev
Copy link

same here

@ChristopherGabba
Copy link
Author

@LonelyCpp Good afternoon, its been about a year since I submitted this issue. Just wondering if you had a chance to look at it...

@AkanBerkant
Copy link

The huge react-native community cannot solve this problem. It's unbelievable.

@AkanBerkant
Copy link

Has anyone been able to solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants