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"
TESTjwplayer("player").setup({
image: "",
file: "http://xxx.xxx.xxx.xxx/tvod/tvod.php?starttime=1384975713&endtime=1384975803",
width: '680',
height: '450',
autostart: true,
});