`
dbscx
  • 浏览: 73402 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

JW Player带播放列表的Demo

阅读更多

需要3个文件player.html、player.swf(见附件)、player.xml

 

文件player.html

<html>
<head/>
<body>
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='1000' height='600' id='single1' name='single1'>
  <param name='movie' value='player.swf'>
  <param name='allowfullscreen' value='true'>
  <param name='allowscriptaccess' value='always'>
  <param name='wmode' value='transparent'>
  <param name='flashvars' value='playlistfile=player.xml&playlistsize=200&playlist=right&autostart=false&repeat=list'>
  <embed
    type='application/x-shockwave-flash' 
    id='single2' 
    name='single2' 
    src='player.swf' 
    width='1000' 
    height='600' 
    bgcolor='undefined' 
    allowscriptaccess='always'
    allowfullscreen='true' 
    wmode='transparent' 
    flashvars='playlistfile=player.xml&playlistsize=200&playlist=right&autostart=false&repeat=list'>
  </embed>
</object>
</body>
</html>

 

文件player.xml

可以选择XSPF,RSS,itunes,media,ASX,ATOM

 

Flashvars XSPF RSS itunes media ASX ATOM
author creator - author credit author -
date - pubDate - - - published
description annotation description summary description abstract summary
duration duration - duration content duration -
file location enclosure - content ref -
link info link - - moreinfo link
image image - - thumbnail - -
start - - - - starttime -
streamer - - - - - -
tags - category keywords keywords - -
title title title - title title title
provider - - - - - -

 

ASX格式的player.xml

<asx version="3.0">
  <title>Example ASX playlist</title> 
  <entry>
    <title>FLV video</title> 
    <author>the Peach Open Movie Project</author> 
    <abstract>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</abstract> 
    <moreinfo href="http://www.bigbuckbunny.org/" /> 
    <ref href="../../testing/files/bunny.flv" /> 
  </entry>
  <entry>
    <title>MP3 Audio with image</title> 
    <author>the Peach Open Movie Project</author> 
    <abstract>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</abstract> 
    <ref href="files/bunny.mp3" /> 
    <moreinfo href="http://www.bigbuckbunny.org/" /> 
    <param name="image" value="files/bunny.jpg" /> 
  </entry>
  <entry>
    <title>PNG Image with duration</title> 
    <author>the Peach Open Movie Project</author> 
    <abstract>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</abstract> 
    <ref href="files/bunny.png" /> 
    <duration value="00:00:10" /> 
  </entry>
  <entry>
    <title>Youtube video with start</title> 
    <author>the Peach Open Movie Project</author> 
    <abstract>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</abstract> 
    <moreinfo href="http://www.bigbuckbunny.org/" /> 
    <ref href="http://youtube.com/watch?v=IBTE-RoMsvw" /> 
    <starttime value="10" /> 
  </entry>
</asx>

 XDPF格式的player.xml

<playlist version="1" xmlns="http://xspf.org/ns/0/">
  <title>Example XSPF playlist</title> 
  <tracklist>
    <track>
      <title>FLV video</title> 
      <creator>the Peach Open Movie Project</creator> 
      <info>http://www.bigbuckbunny.org/</info> 
      <annotation>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</annotation> 
      <location>../../testing/files/bunny.flv</location> 
    </track>
    <track>
      <title>MP3 audio with thumb</title> 
      <creator>the Peach Open Movie Project</creator> 
      <info>http://www.bigbuckbunny.org/</info> 
      <annotation>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</annotation> 
      <location>files/bunny.mp3</location> 
      <image>files/bunny.jpg</image> 
    </track>
    <track>
      <title>PNG image with duration</title> 
      <creator>the Peach Open Movie Project</creator> 
      <annotation>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</annotation> 
      <location>files/bunny.png</location> 
      <meta rel="duration">10</meta> 
    </track>
    <track>
      <title>Youtube video with start</title> 
      <creator>the Peach Open Movie Project</creator> 
      <info>http://www.bigbuckbunny.org/</info> 
      <annotation>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</annotation> 
      <location>http://youtube.com/watch?v=IBTE-RoMsvw</location> 
      <meta rel="start">10</meta> 
    </track>
  </tracklist>
</playlist>

RSS格式的player.xml

<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats">
  <channel>
    <title>Example iTunes RSS playlist</title> 
    <item>
      <title>FLV Video</title> 
      <link>http://www.bigbuckbunny.org/</link> 
      <description>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</description> 
      <enclosure url="../../testing/files/bunny.flv" type="video/x-flv" length="1192846" /> 
      <itunes:author>the Peach Open Movie Project</itunes:author> 
    </item>
    <item>
      <title>MP3 Audio with image</title> 
      <link>http://www.bigbuckbunny.org/</link> 
      <description>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</description> 
      <enclosure url="files/bunny.mp3" type="audio/mpeg" length="1192846" /> 
      <itunes:author>the Peach Open Movie Project</itunes:author> 
      <jwplayer:image>files/bunny.jpg</jwplayer:image> 
    </item>
    <item>
      <title>PNG Image with duration</title> 
      <description>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</description> 
      <enclosure url="files/bunny.png" type="image/png" length="1192846" /> 
      <itunes:author>the Peach Open Movie Project</itunes:author> 
      <itunes:duration>00:10</itunes:duration> 
    </item>
    <item>
      <title>Youtube video with start</title> 
      <link>http://www.bigbuckbunny.org/</link> 
      <description>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</description> 
      <enclosure url="http://youtube.com/watch?v=IBTE-RoMsvw" type="text/html" length="1192846" /> 
      <itunes:author>the Peach Open Movie Project</itunes:author> 
      <jwplayer:start>10</jwplayer:start> 
    </item>
  </channel>
</rss>

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics