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

No sound from YouTube video when iOS on silent #280

Open
Loboboboboboo opened this issue Aug 12, 2018 · 11 comments
Open

No sound from YouTube video when iOS on silent #280

Loboboboboboo opened this issue Aug 12, 2018 · 11 comments

Comments

@Loboboboboboo
Copy link

It is normal for sound to play when playing YouTube videos in browsers or in apps when the phone is on silent - however this doesn't happen in the inappbrowser, as such I'm needing to add a warning instructing users if they hear no sound to un-mute the phone - please can there be an option to allow audio from the inappbrowser even when the phone is on silent.

@janpio
Copy link
Member

janpio commented Aug 12, 2018

What platform are you talking about?

@Loboboboboboo
Copy link
Author

Phonegap - iPhone 6 - iOS 11.4.1

@janpio
Copy link
Member

janpio commented Aug 12, 2018

What version of Cordova are you using? What version of Cordovs-iOS? What version of the plugin?
Do you have a simple that can reproduce the behavior you describe?

@Loboboboboboo
Copy link
Author

Loboboboboboo commented Aug 12, 2018

  • Cordova 7.1.0
  • engine name="ios" spec="~4.5.4"
  • cordova-plugin-inappbrowser 3.0.0

Simple example being linking to a html file containing just this:

<iframe width="560" height="315" src="https://www.youtube.com/embed/C0DPdy98e4c" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

The code triggering that being:

window.open('html page url, '_blank', 'location=no)

@Loboboboboboo
Copy link
Author

Is this a known thing that happens generally or is it a bug in my setup?

@janpio
Copy link
Member

janpio commented Aug 14, 2018

I don't know. Did you find anything in the documentation?

@Loboboboboboo
Copy link
Author

Nope - I presumed it was just a feature that was lacking but based off your questions about my specific setup you gave me some doubts..

@janpio
Copy link
Member

janpio commented Aug 14, 2018

InAppBrowser is a plugin for Cordova, that enables users to show websites in another "window" in their app. This is done by creating a native container that holds a webview and some navigation UI. Maybe the webview can be configured to play sounds even when the device is on silent, and just isn't. My questions were just to understand all the specifics of the problem.

@Loboboboboboo
Copy link
Author

Yeah, fair enough, and thanks for helping! Hopefully this can be configured some way..

@janpio
Copy link
Member

janpio commented Aug 14, 2018

If I had the time I would now research how this plugin creates the webview, search for some documentation on that from Apple and see if there maybe is some option to configure that.

@ternblom
Copy link

Hello,

You can fix this using this plugin https://github.com/EddyVerbruggen/cordova-plugin-backgroundaudio

I had the same problem and this plugin take care of everything.

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

No branches or pull requests

3 participants