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

video plays in Safari but not in Firefox and Opera #8880

Open
PAOK1926 opened this issue Oct 2, 2024 · 3 comments
Open

video plays in Safari but not in Firefox and Opera #8880

PAOK1926 opened this issue Oct 2, 2024 · 3 comments

Comments

@PAOK1926
Copy link

PAOK1926 commented Oct 2, 2024

Description

My video plays in Safari but not in Firefox and Opera.
in Firefox i get the message "The media could not be loaded, either because the server or network failed or because the format is not supported."
in Opera, tries to start but it doesn't. In Firefox mobile, starts but stops immediately.
my page is here: http://mypaok.xyz/test.html

and this is the html code:
`

<script src="//vjs.zencdn.net/8.18.1/video.min.js"></script>

`

when i try to open the stream link http://gate1.mypaok.xyz:8081/hls/paok.m3u8 with VLC plays normally..

can anyone help me ?

Reduced test case

http://mypaok.xyz/test.html

Steps to reproduce

  1. try to open with Safari
  2. then with firefox
  3. then with opera

Errors

No response

What version of Video.js are you using?

8.18.1

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

firefox all, opera all

What OS(es) and version(s) does this occur with?

macos 13.4

@PAOK1926 PAOK1926 added the needs: triage This issue needs to be reviewed label Oct 2, 2024
Copy link

welcome bot commented Oct 2, 2024

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@mister-ben
Copy link
Contributor

The browser logs a message to the console which tells you: "Access to XMLHttpRequest at 'http://gate1.mypaok.xyz:8081/hls/paok.m3u8' from origin 'http://mypaok.xyz' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

Safari playing native does not need CORS headers.

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
https://enable-cors.org

@mister-ben mister-ben removed the needs: triage This issue needs to be reviewed label Oct 2, 2024
@PAOK1926
Copy link
Author

PAOK1926 commented Oct 2, 2024

The browser logs a message to the console which tells you: "Access to XMLHttpRequest at 'http://gate1.mypaok.xyz:8081/hls/paok.m3u8' from origin 'http://mypaok.xyz' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

Safari playing native does not need CORS headers.

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS https://enable-cors.org

hello and thank you for the prompt response...

i added
add_header Access-Control-Allow-Origin *;
in my nginx configuration, and now stream plays in Firefox. But it doesnt in Opera..

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