Go
Not registered? Sign up!

d-playlist open new item in same player?

Google Translate
5 posts | return to the Plugins forum | get the rss feed for this thread

Jul. 10, 2009Miles

Not sure if this double posted but is it possible to use Flashvar: dplaylists.dtarget and have the item open in the same player?

Jul. 10, 2009lost


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

  <head>

    <title>Simple D-Playlists - JWMP v4.5.x - swfobject v2.2</title>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>

    <script type="text/javascript">
      var flashvars =
      {
        'file':                                  '/Movies/video1.flv',
        'image':                                 'image01.jpg',
        'controlbar':                            'bottom',
        'skin':                                  'bekle',
        'plugins':                               'http://www.domain.com/dplaylists/dplaylists-1',
        'dplaylists.dxmlpaths':                  'http://www.domain.com/dplaylists/choice.xml,http://www.domain.com/dplaylists/latest.xml', //link to the XML containing related clips
        'dplaylists.dskin':                      'http://www.domain.com/dplaylists/DPlaylistsSample.swf',
        'dplaylists.dposition':                  'top',    // center, bottom, top
        'dplaylists.dtarget':                    '_self',  // where to open the related videos when clicked on    
        'id':                                    'playerId',
        'autostart':                             'false'
      };

      var params =
      {
        'allowfullscreen':                       'true',
        'allowscriptaccess':                     'always',
        'bgcolor':                               '#FFFFFF'
      };

      var attributes =
      {
        'id':                                    'playerId',
        'name':                                  'playerId'
      };

      swfobject.embedSWF('player-4.5.227.swf', 'player1', '470', '320', '9.0.124', false, flashvars, params, attributes);
    </script>

    <script type="text/javascript">
      var player = null;


      function playerReady(obj)
      {
        player = gid(obj.id);
      };


      function loadNplay(file)
      {
        player.sendEvent('LOAD', {file:file});
        player.sendEvent('PLAY', 'true');
      };


      function gid(name)
      {
        return document.getElementById(name);
      };
    </script>

  </head>

  <body>

    <div id="playercontainer1" class="playercontainer1"><a id="player1" class="player1" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a></div>

  </body>

</html>


choice.xml
<?xml version="1.0" encoding="utf-8"?>
<videolist>
  <title>Choice</title>
  <key>choice</key>
  <video id="001">
    <title>Video 2</title>
    <thumb>/dplaylists/thumbs/video2.jpg</thumb>
    <url>javascript:loadNplay('/Movies/video2.flv')</url>
    <duration>1:31</duration>
  </video>
  <video id="002">
    <title>Video 3</title>
    <thumb>/dplaylists/thumbs/video3.jpg</thumb>
    <url>javascript:loadNplay('/Movies/video3.flv')</url>
    <duration>1:31</duration>
  </video>
  <video id="003">
    <title>Video 4</title>
    <thumb>/dplaylists/thumbs/video4.jpg</thumb>
    <url>javascript:loadNplay('/Movies/video4.flv')</url>
    <duration>1:31</duration>
  </video>
</videolist>

Oct. 22, 2009brunodbo

@lost,

You just made my day. Thanks!

Oct. 29, 2009Bk

Hi,

Is there any way of removing the editors choice button?

Thanks

Nov. 16, 2009Zachary Ozer

Currently not supported

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.