Can someone help me troubleshoot the code for this issue? I am trying to embed the FLV player, and show a playlist that users can select the video they want to play
The code below works in that it displays the payer, and plays the playlist, but it plays the videos one after the other without stopping and never displays the playlist.
Embedded code
<script type="text/javascript" src="http://domain/static/mediaplayer/current/swfobject.js"></script>
<div id="flashvideo">this will be replaced by the SWF.</div>
<script type="text/javascript">
var so = new SWFObject('http://domain/static/mediaplayer/current/mediaplayer.swf','playlist','640','480','9');
so.addParam('allowfullscreen','true');
so.addParam('width', '640');
so.addParam('height', '480');
so.addParam('displaywidth', '320');
so.addParam('displayheight', '240');
so.addParam('flashvars','file=http://domain/c/document_library/get_file%3Fp_l_id%3D147022%26folderId%3D16415%26name%3DDLFE-10817.x...');
so.write('flashvideo');
</script>
--------------------------------------------------------------------------------
Playlist
<?xml version='1.0' encoding='UTF-8' ?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<creator>Minny Mouse</creator>
<title>Session 1</title>
<location>http://domain/static/mediaplayer/current/video.flv</location>
<image>http://domain/image/image_gallery%3Fimg_id=134601</image>
<info>http://domain/</info>
</track>
<track>
<creator>Mickey Mouse</creator>
<title>Session 1</title>
<location>http://otherdomain/flash/global/CDNPortal/devconf2008_session_1.flv</location>
<image>http://domain/image/image_gallery%3Fimg_id=134601</image>
<info>http://domain/</info>
</track>
<track>
<creator>Donald Duck</creator>
<title>Session 2</title>
<location>http://otherdomain/flash/global/CDNPortal/devconf2008_session_1.flv</location>
<image>http://domain/image/image_gallery%3Fimg_id=134601</image>
<info>http://domain/</info>
</track>
</trackList>
</playlist>
Put these four flashvars (NOT parameters) into your flashvars.
so.addParam('width', '640');so.addParam('height', '480');
so.addParam('displaywidth', '320');
so.addParam('displayheight', '240');
Please review the supported flashvars here: http://code.longtailvideo.com/trac/wiki/Flashvars3