当前位置: 首页 > 工具软件 > JW PLAYER > 使用案例 >

jwplayer android m3u8,javascript - JW Player can not play m3u8 stream? - Stack Overflow

劳烨
2023-12-01

Perhaps it's a missing !DOCTYPE declaration that you don't have.

I don't have ability to test this personally, but try this version that also includes other fixes based on the original file.

Provider tests

/*

body { padding: 50px; font: 13px/20px Arial; background: #EEE; }

form { margin-top: 20px; }

#player { -webkit-box-shadow: 0 0 5px #999; background: #000; }

ul { margin-top: 40px; padding: 0 0 0 20px; list-style-type: square; }

/*]]>*/

Test M3U8

You need Flash to play these tests

//

jwplayer("player").setup({

file: '../m3u8/index.m3u8',

flashplayer: 'player.swf',

provider:'adaptiveProvider.swf',

height: 360,

width: 640

});

function loadStream(url) {

jwplayer("player").load({file: url,provider: 'adaptiveProvider.swf'});

jwplayer("player").play();

return false;

}

//]]>

//

$(document).ready(function() {

loadStream('http://localhost/m3u8/index.m3u8');

});

//]]>

EDIT: Note that you will have to be on the same Domain for this to work. Also, jwPlayer forum mentions that .m3u8 works only for iOS and Safari. Reference HERE.

To test a valid .m3u8 streaming playback webpage provided by LongTail Video website with your device, access this WEBPAGE. Caution when using desktop browser! It or VLC Media Player Plugin might crash with a sad face.

 类似资料: