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

React Player is not Working in Safari for all the video format #1305

Closed
krishnadmass opened this issue Sep 2, 2021 · 18 comments
Closed

React Player is not Working in Safari for all the video format #1305

krishnadmass opened this issue Sep 2, 2021 · 18 comments
Labels
Needs more info Please add more information or examples

Comments

@krishnadmass
Copy link

when using ReactPlayer the video is not playing in safari browser only and it shows like broken player it does not catch the error in onError handler, and the video is working fine in all other browsers(chrome, firefox, opera) is there any solution to solve this?

@cookpete
Copy link
Owner

cookpete commented Sep 2, 2021

What format is the file you are trying to play? Sounds like #1158

@krishnadmass
Copy link
Author

What format is the file you are trying to play? Sounds like #1158

tried with mp4 and webm it not playing in safari only

@worstestes
Copy link

Currently facing the same issue with all video formats for safari, chrome/firefox seem to have no issues. Any tips here?

@AndrewNow
Copy link

likewise, I can't get videos to work properly on safari.

@Dhamu143
Copy link

Hey guys, is there any update on this? I am also facing the same issue.

@cookpete
Copy link
Owner

cookpete commented Oct 22, 2021

Can someone post some more information? MP4 and WEBM files are working fine for me. macOS 11.6 Safari 15.0

image

@aroolinks
Copy link

Currently facing the same issue with all video formats for safari, any solution? How we can sort it out?

@cookpete cookpete added the Needs more info Please add more information or examples label May 16, 2022
@paul-bg
Copy link

paul-bg commented Jun 13, 2022

I have the same issue the player work well in chrome and Firefox but in safari Mac or iOS it appears with a blocked player

here the link of the implementation
https://xdsea.com/nft/0x85d216d87C993c250A7725aF8f6C161d0504c32B/1673

and its weird cause the demo page works in Mac and Iphone safari

Screen Shot 2022-06-13 at 13 46 20

@reynoldsnlp
Copy link

@paul-bg I am having a similar problem. I'm just getting started with debugging, but it looks like this blog post might be helpful: https://blog.logrocket.com/streaming-video-in-safari/

@reynoldsnlp
Copy link

It could be a back-end problem, i.e. whether the server supports Partial Content.

@daniel-j-dev
Copy link

Similar problem - can't play .ogg files on Safari

@cookpete
Copy link
Owner

Looks like ogg support is not great on Safari.

I’m gonna close this for now as it just seems like issues with Safari video support.

If anyone can isolate a specific problem with this library, that isn’t just a general support problem with Safari, with steps to reproduce or a jsfiddle/codesandbox, please reopen the issue with more details.

@reynoldsnlp
Copy link

For anyone else coming across this, you may also want to make sure your server is putting MIME content type in the headers: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/CreatingVideoforSafarioniPhone/CreatingVideoforSafarioniPhone.html

@PragathiPrabhu
Copy link

PragathiPrabhu commented Nov 22, 2022

Can’t play hls video in safari. Did anyone face this issue in safari ?

@apoorvdodiya
Copy link

apoorvdodiya commented Jun 25, 2023

In my case

  1. there was an issue from backend side, I was reading the the only the start value of the range header from the first request which did not matched in the response.

The thing is that Chrome sends range="0-" for the first request and Safari sends range="0-1" so my solution worked for Chrome for the first time and then I identified and fiexed the issue for Safari.

  1. After fixing the first issue I could not play .mkv files because HTML 5 does not support it.

@schwarzsky
Copy link

Can't play even MP4 videos on safari with no back-end. Just serving files from public directory.

@rezadadashian2
Copy link

In my case

1. there was an issue from backend side, I was reading the the only the start value of the `range` header from the first request which did not matched in the response.

The thing is that Chrome sends range="0-" for the first request and Safari sends range="0-1" so my solution worked for Chrome for the first time and then I identified and fiexed the issue for Safari.

2. After fixing the first issue I could not play `.mkv` files because HTML 5 does not support it.

hi,

how did you resolve the backend problem? about the range header?

@reynoldsnlp
Copy link

reynoldsnlp commented Apr 4, 2024

@rezadadashian2 Your server needs to respond with a 206 Partial Content with only the requested length of data. You might find this blog post helpful.

You need Content-Type headers, 206 Partial Content responses, and file extensions in the URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs more info Please add more information or examples
Projects
None yet
Development

No branches or pull requests