video-dev / hls.js

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
https://hlsjs.video-dev.org/demo
Other
14.77k stars 2.56k forks source link

Android Chrome issue (HLS VoD) #340

Closed mikeevstropov closed 8 years ago

mikeevstropov commented 8 years ago

Android 4.0.4 Samsung GT-P6800 Chrome 42.0.2311.111 hls.js v0.5.17


console:

[log] > loadSource:http://warnerfilm.ru/moonplayer/master.m3u8?host=37.220.36.15&addr=video%2F…D1459201951%26partner%3D990%26signature%3D050178ba90816e947e93f91a5d6c8aa6
[log] > trigger BUFFER_RESET
[log] > attachMedia
Uncaught ReferenceError: MediaSource is not defined
[log] > manifest loaded,3 level(s) found, first bitrate:373000
[log] > startLoad
Uncaught ReferenceError: MediaSource is not defined

playlist:

#EXTM3U
#EXT-X-STREAM-INF:RESOLUTION=640x358,BANDWIDTH=373000
http://default.edge09.moonwalk.cc/ivs/17/d1/c59cd1dcc8f1/hls/tracks-3,4/index.m3u8
#EXT-X-STREAM-INF:RESOLUTION=854x480,BANDWIDTH=568000
http://default.edge09.moonwalk.cc/ivs/17/d1/c59cd1dcc8f1/hls/tracks-2,4/index.m3u8
#EXT-X-STREAM-INF:RESOLUTION=1280x718,BANDWIDTH=1036000
http://default.edge09.moonwalk.cc/ivs/17/d1/c59cd1dcc8f1/hls/tracks-1,4/index.m3u8

response:

Accept-Ranges:bytes
Access-Control-Allow-Origin:*
Cache-Control:public
Connection:close
Content-Length:421
Content-Type:application/vnd.apple.mpegurl
Date:Mon, 28 Mar 2016 18:53:03 GMT
Server:LiteSpeed
X-Powered-By:PHP/5.4.45

init:

self.object = new Hls({debug : true});
self.object.loadSource(data.manifest.m3u8);
self.object.attachMedia(video);
self.object.on(Hls.Events.MANIFEST_PARSED, function() {
    callback && callback();
});

test: http://warnerfilm.ru/test.html


Stream is work fine on desktop browser, but not working on android. Please help!

mangui commented 8 years ago

Your Chrome version does not support MSE.

mangui commented 8 years ago

You could check before instantiating with Hls.isSupported()

mikeevstropov commented 8 years ago

@mangui Sorry... Thank you for answer!!!!