jwplayer android m3u8,Jwplayer play m3u8 generated by php

本文讨论了如何使用PHP创建动态M3U8 HLS播放列表,并遇到在JW Player中播放时出现'Error loading player: No playable sources found'的错误。通过直接在浏览器中加载PHP脚本可以获取正确的M3U8文件,且在VLC中播放没有问题。问题可能在于JW Player与PHP动态生成的M3U8源的兼容性。
摘要由CSDN通过智能技术生成

I use jwplayer to run m3u8 hls for a long time. I just want to create a dynamic m3u8 by php

I can get the m3u8 file if I paste the php in browser directly. I also test the m3u8 file in VLC and no problem.

php:

/*

create m3u8 here

*/

header("Content-type: application/text");

header("Content-Disposition: attachment; filename=index.m3u8");

echo $m3u8file;

?>

The m3u8 file output here:

#EXTM3U

#EXT-X-KEY:METHOD=NONE

#EXT-X-TARGETDURATION:10

#EXT-X-MEDIA-SEQUENCE:138497571

#EXTINF:10,

ch22/2013112102/138497571.ts

#EXTINF:10,

ch22/2013112102/138497572.ts

#EXTINF:10,

ch22/2013112102/138497573.ts

#EXTINF:10,

ch22/2013112102/138497574.ts

#EXTINF:10,

ch22/2013112102/138497575.ts

#EXTINF:10,

ch22/2013112102/138497576.ts

#EXTINF:10,

ch22/2013112102/138497577.ts

#EXTINF:10,

ch22/2013112102/138497578.ts

#EXTINF:10,

ch22/2013112102/138497579.ts

#EXTINF:10,

ch22/2013112102/138497580.ts

#EXT-X-ENDLIST

This script will show error in jwplayer

"Error loading player:

No playable sources found"

TEST

jwplayer("player").setup({

image: "",

file: "http://xxx.xxx.xxx.xxx/tvod/tvod.php?starttime=1384975713&endtime=1384975803",

width: '680',

height: '450',

autostart: true,

});

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值