Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

fallback (html5 and flash) with external XML playlist file? JW7


(Sorry for bad english)
Hello, I'm searching how to make fallback with external XML playlist file so I found this --> https://support.jwplayer.com/customer/portal/questions/5907563-m3u8-and-xml-playlists-for-rtmp-and-ios-dynamic-streaming-
I know one thing Mr.Ethan said, I should create two xml files. but it was old version and some Mr.Ethan's example link was expire URL (longtailvideo).
so I want to ask that question here again. (JWplayer version 7)

here is my playlist.xml page

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:jwplayer="http://rss.jwpcdn.com/">
<channel>
<item>
<title>Sintel Trailer</title>
<description>Sintel is a fantasy CGI from the Blender Open Movie Project.</description>
<jwplayer:image>assets/pokemon.jpg</jwplayer:image>
<jwplayer:source file="MOV_0072.mp4" />
</item>
<item>
<title>Dog</title>
<description>Sintel is a fantasy CGI from the Blender Open Movie Project.</description>
<jwplayer:image>assets/pokemon.jpg</jwplayer:image>
<jwplayer:source file="MOV_0090.mp4" />
</item>
<item>
<title>Cat</title>
<description>Sintel is a fantasy CGI from the Blender Open Movie Project.</description>
<jwplayer:image>assets/pokemon.jpg</jwplayer:image>
<jwplayer:source file="rtmp://xxx.xxx.x.xx:xxxx/VodSecure/mp4:sample.mp4" />
</item>
</channel>
</rss>

and here is my Second XML page (playlist2.xml) (Notice: the third url video is that I want to make fallback. the first,second url video still the same with first xmlpage)

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:jwplayer="http://rss.jwpcdn.com/">
<channel>
<item>
<title>Sintel Trailer</title>
<description>Sintel is a fantasy CGI from the Blender Open Movie Project.</description>
<jwplayer:image>assets/pokemon.jpg</jwplayer:image>
<jwplayer:source file="MOV_0072.mp4" />
</item>
<item>
<title>Dog</title>
<description>Sintel is a fantasy CGI from the Blender Open Movie Project.</description>
<jwplayer:image>assets/pokemon.jpg</jwplayer:image>
<jwplayer:source file="MOV_0090.mp4" />
</item>
<item>
<title>Cat</title>
<description>Sintel is a fantasy CGI from the Blender Open Movie Project.</description>
<jwplayer:image>assets/pokemon.jpg</jwplayer:image>
<jwplayer:source file="http://xxx.xxx.x.xx:1935/VodSecure/mp4:sample.mp4/playlist.m3u8" />
</item>
</channel>
</rss>

and here is my config jwplayer page

<div id='myElement'>Loading the player...</div> <br><br>
<script type='text/javascript'>
Player = jwplayer("myElement"); //เก็บเข้าตัวแปร เพราะใช้หลายที่ ขี้เกียจเขียนยาวว่าjwplayer("myElement").setup()
Player.setup({
playlist: [{
sources: [{
file: "playlist.xml"
}, {
file: "playlist2.xml"
}]
}],
height: 360,
width: 640,
rtmp: {
securetoken: "a07622fc6bb82659"
},
});

and when I run this, the warning occur : Error loading player: No playable sources found

If I change to
Player = jwplayer("myElement"); //เก็บเข้าตัวแปร เพราะใช้หลายที่ ขี้เกียจเขียนยาวว่าjwplayer("myElement").setup()
Player.setup({
playlist: "playlist.xml",
this work fine. but it will have one xml page.

4 Community Answers

Randy

JW Player Support Agent  
1 rated :

Hello,

Can you provide us the link to the playlists so we can investigate? I am assuming theres no syntax issue here but it seems like you might be missing commas after your XML files but please let me know if I am wrong.

playerInstance.setup({playlist: [{sources: [{file: “//mymp4sample.mp4”,type: ‘mp4’,},{ file: “//mym3u8/sample.m3u8”,type: ’hls’}]}],});

Randy

i...

User  
0 rated :

To Mr.Randy,

This is my link www.dexchannel.com/test/JWplayer/testplaylistxml.html

i...

User  
0 rated :

and I didn't missing comma after my XML.
THX

i...

User  
0 rated :

OK! I solve it!

just add <jwplayer:source file="http://xxx.xxx.x.xx:xxxx/VodSecure/mp4:sample.mp4/playlist.m3u8" /> in the first xml page so! it become fallback
and I don't need the second xml page any more Yessss!!!

This question has received the maximum number of answers.