• Resolved PyroSteveJr

    (@pyrostevejr)


    Basically when I have one playlist on a page everything works fine. The code looks like:

    <h3>Video Player 1</h3>
    <div style="width: 640px;">
    	<div id="videoPlayer1" align="center">Loading the player...</div>
    </div>
    
    <script type="text/javascript">// <![CDATA[
    	jwplayer("videoPlayer1").setup({
    		flashplayer: "http://localhost/_jwplayer/player.swf", playlist: [
    			{ duration: 253, file: "http://localhost/Misc/Video1.mp4", image: "http://localhost/Misc/Video1.jpg", title: "Video1" },
    			{ duration: 253, file: "http://localhost/Misc/Video2.mp4", image: "http://localhost/Misc/Video2.jpg", title: "Video1" }
    		],
    		'playlist.position': 'bottom',
    		'playlist.size': 120,
    		height: 480,
    		width: 640,
    		volume: 80,
    		'skin': 'http://localhost/_jwplayer/athealthways.zip',
    		autostart: false
    	});
    // ]]></script>

    But when I try to have 2 of them neither load.

    <h3>Video Player 1</h3>
    <div style="width: 640px;">
    	<div id="videoPlayer1" align="center">Loading the player...</div>
    </div>
    
    <h3>Video Player 2</h3>
    <div style="width: 640px;">
    	<div id="videoPlayer2" align="center">Loading the player...</div>
    </div>
    
    <script type="text/javascript">// <![CDATA[
    	jwplayer("videoPlayer1").setup({
    		flashplayer: "http://localhost/_jwplayer/player.swf", playlist: [
    			{ duration: 253, file: "http://localhost/Misc/Video1.mp4", image: "http://localhost/Misc/Video1.jpg", title: "Video1" },
    			{ duration: 253, file: "http://localhost/Misc/Video2.mp4", image: "http://localhost/Misc/Video2.jpg", title: "Video1" }
    		],
    		'playlist.position': 'bottom',
    		'playlist.size': 120,
    		height: 480,
    		width: 640,
    		volume: 80,
    		'skin': 'http://localhost/_jwplayer/athealthways.zip',
    		autostart: false
    	});
    
    	jwplayer("videoPlayer2").setup({
    		flashplayer: "http://localhost/_jwplayer/player.swf", playlist: [
    			{ duration: 253, file: "http://localhost/Misc/Video3.mp4", image: "http://localhost/Misc/Video3.jpg", title: "Video3" },
    			{ duration: 253, file: "http://localhost/Misc/Video4.mp4", image: "http://localhost/Misc/Video4.jpg", title: "Video4" }
    		],
    		'playlist.position': 'bottom',
    		'playlist.size': 120,
    		height: 480,
    		width: 640,
    		volume: 80,
    		'skin': 'http://localhost/_jwplayer/athealthways.zip',
    		autostart: false
    	});
    
    // ]]></script>

    http://wordpress.org/plugins/jw-player-plugin-for-wordpress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter PyroSteveJr

    (@pyrostevejr)

    Well the second I post this I figured it out. In case someone runs into same problem here is my code. I just had to separate out javascript.

    <h3>Video Plyaer 1</h3>
    <div style="width: 640px;">
    	<div id="videoPlayer1" align="center">Loading the player...</div>
    </div>
    
    <script type="text/javascript">// <![CDATA[
    	jwplayer("videoPlayer1").setup({
    		flashplayer: "http://localhost/_jwplayer/player.swf", playlist: [
    			{ duration: 253, file: "http://localhost/Misc/Video1.mp4", image: "http://localhost/Misc/Video1.jpg", title: "Video1" },
    			{ duration: 253, file: "http://localhost/Misc/Video2.mp4", image: "http://localhost/Misc/Video2.jpg", title: "Video1" }
    		],
    		'playlist.position': 'bottom',
    		'playlist.size': 120,
    		height: 480,
    		width: 640,
    		volume: 80,
    		'skin': 'http://localhost/_jwplayer/athealthways.zip',
    		autostart: false
    	});
    // ]]></script>
    
    <h3>Video Player 2</h3>
    <div style="width: 640px;">
    	<div id="videoPlayer2" align="center">Loading the player...</div>
    </div>
    
    <script type="text/javascript">// <![CDATA[
    	jwplayer("videoPlayer2").setup({
    		flashplayer: "http://localhost/_jwplayer/player.swf", playlist: [
    			{ duration: 253, file: "http://localhost/Misc/Video3.mp4", image: "http://localhost/Misc/Video3.jpg", title: "Video3" },
    			{ duration: 253, file: "http://localhost/Misc/Video4.mp4", image: "http://localhost/Misc/Video4.jpg", title: "Video4" }
    		],
    		'playlist.position': 'bottom',
    		'playlist.size': 120,
    		height: 480,
    		width: 640,
    		volume: 80,
    		'skin': 'http://localhost/_jwplayer/athealthways.zip',
    		autostart: false
    	});
    // ]]></script>
    Plugin Author JW Player

    (@longtail-video)

    Glad you got it, thanks for sharing!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple players with playlists not working’ is closed to new replies.