Advertisement
princeofheart

jPlayer

May 29th, 2014
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 2.52 KB | None | 0 0
  1. <script type="text/javascript">
  2. //<![CDATA[
  3. $(document).ready(function(){
  4.     var myPlaylist = new jPlayerPlaylist({
  5.         jPlayer: "#jquery_jplayer_N",
  6.         cssSelectorAncestor: "#jp_container_N"
  7.     }, [
  8.         {
  9.             title:"Cro Magnon Man",
  10.             artist:"The Stark Palace",
  11.             mp3:"http://www.jplayer.org/audio/mp3/TSP-01-Cro_magnon_man.mp3",
  12.             oga:"http://www.jplayer.org/audio/ogg/TSP-01-Cro_magnon_man.ogg",
  13.             poster: "http://www.jplayer.org/audio/poster/The_Stark_Palace_640x360.png"
  14.         }
  15.     ], {
  16.         playlistOptions: {
  17.             enableRemoveControls: true
  18.         },
  19.         swfPath: "js",
  20.         supplied: "webmv, ogv, m4v, oga, mp3",
  21.         smoothPlayBar: true,
  22.         keyEnabled: true,
  23.         audioFullScreen: true
  24.     });
  25.    
  26.     $("#NEXT").click(function() {
  27.     var cur_time = $("#jquery_jplayer_N").data("jPlayer").status.currentTime;
  28.     alert(cur_time); // Nothings alerts :(
  29.     var cur_time2 = $("#jquery_jplayer_1").data("jPlayer").status.currentTime;
  30.     alert(cur_time2); // Nothing alerts:(
  31.     var cur_time3 = $("#jp_container_N").data("jPlayer").status.currentTime;
  32.     alert(cur_time3); // nothing alerts :(
  33.     // window.location('somepage.php'); // if success
  34.     });
  35.    
  36.    
  37. });
  38.  
  39. //]]>
  40. </script>
  41.  
  42. // body part which contains jPlayer //
  43. <div id="p_wrapper">
  44.     <div id="p">
  45.         <!-- audio player begin -->
  46.        
  47.             <div id="jp_container_N" class="jp-video jp-video-270p">
  48.            
  49.             <div class="jp-type-playlist">
  50.            
  51.                 <div  style="display:none;" class="jp-playlist">
  52.                     <ul>
  53.                         <!-- The method Playlist.displayPlaylist() uses this unordered list -->
  54.                         <li></li>
  55.                     </ul>
  56.                 </div>
  57.                 <div style="display:none;" id="jquery_jplayer_N" class="jp-jplayer"></div>
  58.                 <div class="jp-gui">
  59.                     <div class="jp-video-play">
  60.                         <a href="javascript:;" class="jp-video-play-icon" tabindex="1">play</a>
  61.                     </div>
  62.                     <div class="jp-interface">
  63.                 <div class="jp-progress">
  64.                             <div class="jp-seek-bar">
  65.                                 <div class="jp-play-bar"></div>
  66.                             </div>
  67.                 </div>
  68.                         <div class="jp-current-time"></div>
  69.                         <div class="jp-duration"></div>
  70.                         <div class="jp-details">
  71.                             <ul>
  72.                                 <li><span class="jp-title"></span></li>
  73.                             </ul>
  74.                         </div>
  75.                             <div class="jp-controls-holder">
  76.                             <ul class="jp-controls">
  77.                                 <li>  All Controls displays here  </li>
  78.                             </ul>
  79.                             <div class="jp-volume-bar">
  80.                                 <div class="jp-volume-bar-value"></div>
  81.                             </div>
  82.                            
  83.                            
  84.                             </div>
  85.                     </div>
  86.                 </div>
  87.                
  88.             </div>
  89.         </div>
  90.        
  91.      
  92.       <!-- audio player end ALL DIVS ended PROPERLY-->
  93.    
  94.      
  95.     </div>
  96. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement