You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I faced an issue with autoplaying videos on my website, particularly on mobile devices. I've successfully implemented video autoplay for desktop screens. But mobile screens are displaying an error message in Chrome:
I'm working with HTML/CSS/JavaScript and using HLS.js to play videos in chunks. All video content, including chunks and playlists, is hosted on AWS storage.
Here's the HTML code snippet for embedding the video:
mobile screens are displaying an error message in Chrome:
These errors do not originate from HLS.js. HLS content should be served with "Access-Control-Allow-Origin" headers to prevent CORS errors in Web-based players. HLS.js cannot proceed to parse and play content when the first request is blocked by CORS.
Here's the HTML code snippet for embedding the video:
And below is the JavaScript code I'm using to switch playlists based on screen resolution:
Since you have "autoplay" on the video element, you do not need to call video.play() in either case. Let the browser handle autoplay (or reject it based on user preference and browser policy).
What do you want to do with Hls.js?
I faced an issue with autoplaying videos on my website, particularly on mobile devices. I've successfully implemented video autoplay for desktop screens. But mobile screens are displaying an error message in Chrome:
I'm working with HTML/CSS/JavaScript and using HLS.js to play videos in chunks. All video content, including chunks and playlists, is hosted on AWS storage.
Here's the HTML code snippet for embedding the video:
And below is the JavaScript code I'm using to switch playlists based on screen resolution:
Also I noticed the strange behavior. I am located in Poland. But if I change my IP address to US via VPN, the video will be work well.
It will be great to read some advices.
Link for the web site here https://aig.gvodex.work/index
What have you tried so far?
No response
The text was updated successfully, but these errors were encountered: