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

Playing audio in mobile safari opens a full screen player #188

Closed
tim-phillips opened this issue May 6, 2017 · 5 comments
Closed

Playing audio in mobile safari opens a full screen player #188

tim-phillips opened this issue May 6, 2017 · 5 comments

Comments

@tim-phillips
Copy link

Playing audio in mobile safari opens a full screen player. I've tried playsInline with no luck.

@tim-phillips
Copy link
Author

tim-phillips commented May 6, 2017

Since my url is a streaming link, AUDIO_EXTENSIONS.test(url) returns false and therefore defaults to video.

http://s2.voscast.com:9208/;&type=mp3

I took the . out of the regex to make this work, but if I made a StreamingAudio component, would that be something that the maintainers of this library would want to be added?

@cookpete
Copy link
Owner

cookpete commented May 7, 2017

if I made a StreamingAudio component, would that be something that the maintainers of this library would want to be added?

It doesn't make sense to add another new component just to fix this. I think the best option is to add a forceAudio property to the fileConfig prop object, to be used like so:

<ReactPlayer
  url='http://s2.voscast.com:9208/;&type=mp3'
  playsinline
  fileConfig={{ forceAudio: true }}
/>

@tim-phillips
Copy link
Author

Good thinking, I'll take a swing at it.

@cookpete
Copy link
Owner

cookpete commented May 7, 2017

No need! Published in 0.17.2

@tim-phillips
Copy link
Author

Right on!

tim-phillips added a commit to kchungradio/kchung.news that referenced this issue May 7, 2017
david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue Dec 23, 2018
david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue May 23, 2020
albanqoku added a commit to albanqoku/react-player that referenced this issue Feb 24, 2021
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
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

2 participants