The playlist plugin in auto mode works only if I have atleast 2 items in my list. (playlists with just 1 item do not work). Can someone please confirm this? Is there a work around?
Playlist plugin with single clip Created Jun 18, 2009
This thread is solved
Views: 3089 Replies: 4 Last reply Jun 19, 2009
You must login first before you can use this feature
Reply to:
Playlist plugin with single clip, from
Put your configuration here in < flowplayer > tags so we can take a look. I've setup a one-item playlist below that seems to work ok.
HTML setup for the player
JavaScript coding
HTML setup for the player
<!-- include latest Flowplayer javascript file -->
<script language="javascript" src="path/to/flowplayer-3.2.6.js"></script>
<!-- player container with optional splash image -->
<a href="path/to/video_file" id="playerContainer">
<img src="path/to/splash_image" />
</a>
JavaScript coding
Following script will install Flowplayer into our player container
<script language="javascript">
// our custom configuration is given in third argument
flowplayer("playerContainer", "path/tohttp://releases.flowplayer.org/swf/flowplayer-3.2.7.swf",{
playlist: [{}]
});
</script>
Reply to:
» Playlist plugin with single clip, from
degenerate
Sorry. I dont know how to get the player to work in the forum editor. Here is my code. Please let me know if you need more info.
<script type="text/javascript">
//<![CDATA[
var conf = { playlist: [{url: 'http://www.flowplayer.org/img/demos/national.jpg',
title: 'Secure Business Mobility',
html: '',
autoPlay: true}]}
//]]>
</script>
<flowplayer>
play: null,
// clip properties common to all playlist entries
clip: {
baseUrl: 'http://blip.tv/file/get',
subTitle: 'from blib.tv video sharing site',
autoPlay: true,
// our playlist
playlist: conf.playlist,
// show playlist buttons in controlbar
plugins: {
// here is our rtpm plugin configuration
akamai: {
url: '/flash/flowplayer/flowplayer.rtmp-3.1.0.swf'
} ,
controls: {
autoHide: 'always',
hideDelay: 500,
playlist: true
}
}
});
/*
here comes the magic plugin. It uses first div.clips element as the
root for as playlist entries. loop parameter makes clips play
from the beginning to the end.
*/
$f("player").playlist("div.clips:first", {loop:true});
//$f("player").autoPlay = false;
</flowplayer>
Reply to:
» » Playlist plugin with single clip, from
I don't have any experience with the RTMP plugin so I'm not sure how that makes flowplayer behave differently, and cannot offer any real assistance.
However you might try the following to get yourself started, and let everyone know for more help:
As you can see from my example posted above, even an empty playlist works using regular flowplayer configuration. The addition of the RTMP or your other customizations might be the problem (or cause of a bug).
However you might try the following to get yourself started, and let everyone know for more help:
- try manually inserting the playlist (no external object)
- try turning playlist:true to false in the controls
- try enabling the play:null
- test without RTMP streaming (regular FLVs)
As you can see from my example posted above, even an empty playlist works using regular flowplayer configuration. The addition of the RTMP or your other customizations might be the problem (or cause of a bug).
Reply to:
» » » Playlist plugin with single clip, from
degenerate
I found the offending line of code in flowplayer.playlist-3.0.6.js
var manual = self.getPlaylist().length <= 1 || opts.manual;
I had to change this to '< 1'. Now it works with a single item in the playlist.
var manual = self.getPlaylist().length <= 1 || opts.manual;
I had to change this to '< 1'. Now it works with a single item in the playlist.