
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.