JW Player无法播放HLS。这是我的网页的HTML代码:
<!DOCTYPE>
<html>
<head>
<script src='https://content.jwplatform.com/libraries/7XBRYUMN.js'></script>
<script>jwplayer.key="***";</script>
</head>
<body>
<div id="my-video"></div>
<script type="text/javascript">
jwplayer("my-video").setup({
file: "http://esioslive6-i.akamaihd.net/hls/live/202892/AL_P_ESP1_FR_FRA/playlist.m3u8",
width: 400,
height: 240,
title: "video",
hlshtml: true,
type: "hls",
androidhls: true
});
</script>
</body>
</html>
Player总是显示:Error loading Player: No playable sources found。HLS在网上查询了http://demo.jwplayer.com/stream-tester/正确复制HLS。我错在哪里?
我认为您在jwplayer上的帐户不允许HLS自适应流或jwplayer。Key与jwplayer js文件不匹配。我已经检查了演示网站的账户,这是正常播放
<!DOCTYPE>
<html>
<head>
<script src="//content.jwplatform.com/libraries/V6NfEzT7.js"></script>
<script>jwplayer.key="AIzaSyCCd7R6tUAGAwFNlq0hV_C7GWNEZNhzxa4";</script>
</head>
<body>
<div id="my-video"></div>
<script type="text/javascript">
jwplayer("my-video").setup({
file: "http://esioslive6-i.akamaihd.net/hls/live/202892/AL_P_ESP1_FR_FRA/playlist.m3u8",
width: 400,
height: 240,
title: "video",
hlshtml: true,
type: "hls",
androidhls: true
});
</script>
</body>
</html>