Closed konstantin55000 closed 4 years ago
In your screenshot, the Console
tab will have log messages from hls.js in it that can be used to help debug why you didn't see playback.
Hi Jamie, Thank you for reading this message.
Here please check http://prntscr.com/p7kpbn
Could you please make screenshot of any android mobile browser, for example this page: https://video-dev.github.io/hls.js/stable/demo/basic-usage.html (basic demo on latest hls.js)
here what happens on our page, based on basic demo. in console you may see no errors.
source code:
var streamUrl = './assets/video/360_Trim2.m3u8'; //100% valid url, no cors, same domain. var video = document.getElementById('player'); //player dom is exists if(Hls.isSupported()) { try { var hls = new Hls(); hls.loadSource(streamUrl); hls.attachMedia(video); hls.on(Hls.Events.MANIFEST_PARSED,function() { console.log('MANIFEST_PARSED'); video.play(); }); } catch(error){ logError(error); } } else if (video.canPlayType('application/vnd.apple.mpegurl')) { //apple possible fix video.src = streamUrl; video.addEventListener('loadedmetadata', function() { console.log('loadedmetadata'); video.play(); }); }
else {
//initDashWithPlayer(); init dash
console.error("hls was not loaded.");
}
//helper functions
function logEventError(event) {
onError(event.detail);
}
function logError(error) { console.error('Error code', error.code, 'object', error); } here you can check live example. https://tinyurl.com/yyg96e5z
As you can see it's very basic example, as in hls.js doc ; on mobile also no errors in console (Eruda). I would strongly say, that every example based on hls.js ( what we found on internet not stream on mobile. Galaxy S8, Mi note 4. Android 8.1 +
It seems problem on android is deeper, but we need to know exactly what's happening.
Hey @konstantin55000
I ran into this a while back on Android - can you double check if you have Data Saver disabled? https://support.google.com/chrome/answer/2392284?co=GENIE.Platform%3DAndroid&hl=en-GB
I found that when Data Saver was enabled on my mobile device, requests for m3u8
s would return an empty response body
Cool, "I ran into this a while back on Android", so what results did you get for basic example page? could you please provide screenshot from mobile? [e.q send from mobile any messenger => open mesenger on desktop , attach screenshot here] Currently we have check input ffmpeg encoding options; maybe source of problem is here. Please leave issue open for this time. i'll let us know , wen we figure it out. DataSaver: interesting thougts, seems firefox , and firefox focus, as well as other browsers does not have data saver at all, but issue still present.
If you could copy and paste the contents of the console without the error filter on from the hls.js demo page with your content it might provide some insight as to why you aren't receiving playback.
Jamie, the issue sorce looked like hls.js, but source was in video encoding options (ffmpeg params). Excuse me for inconviniense, and Thank you for support!
What version of Hls.js are you using?
latest
What browser and OS are you using?
any mobile browser
Test stream:
https://video-dev.github.io/hls.js/stable/demo/basic-usage.html Here please, check . i've also opened it from mobile. This basic example is not working with m3u8 from any mobile bwoser from android 8.1.0
Checklist
https://github.com/video-dev/hls.js/issues/1594
Steps to reproduce
Expected behavior
What you expected to happen Playing video on html5 player.
Actual behavior
What actually happened Player loaded with controls (<video controls .. ); blackscreen , no videoplayback.
Console output
For media errors reported on Chrome browser, please also paste the output of chrome://media-internals