• Hello,

    I use the plugin wordtube to play some music, and now I would like to stop the player per JavaScript. I have to insert a pause-icon via html, so, that if you click at it, the player stops. searching with Google or in this forum didn’t brought me any further. I tried some calls, but without success:

    <p onclick='jwplayer("WT1").pause()>Pause</p>
    <p onclick='WT1_1.pause()>Pause</p>
    <p onclick='jwplayer(1).pause()>Pause</p>
    <p onclick='jwplayer(0).pause()>Pause</p>

    The WT1_1 bzw WT1 I looked up in the code with firebug.

    Normaly I insert the JW Player with this code (more or less copied from JW Player API):

    <div id="as_fp_player1">Loading the player ...</div>
         <script type="text/javascript">
    	jwplayer("as_fp_player1").setup({
    		flashplayer: "<?php echo AS_flashPlayerBasicSettings::$playerUrl ?>/player.swf",
    	        file: "<?php echo $url ?>",
    		height: 50,
    		width: 300,
    		autostart: 'true'
    			    });
    </script>
    <ul>
    	 <li onclick='jwplayer("as_fp_player1").pause()'>Pause</li>
    </ul>

    and in the head I call the player:
    <script type="text/javascript" src="http:mypath/JWPlayer/jwplayer.js"></script>
    This works fine, as long, as wordtube isn’t installed. If wordtube is installed, the player starts, but the html-button doesn’t works. You can only stop the player with the buttons at the player.

    Point is, at the site, where I should use the code, there is wordtube installed, so I have to look for a different solution. The best would be, to use only wordtube, if this is possible. If not, perhaps there is a solution, to make the player and especially work with wordtube installed.

    I’m thankfull for all suggestions

    greets Paka

  • The topic ‘How to get a wordtube-js reference; jwplayer().pause()’ is closed to new replies.