Any response? :|
Forum user: Denis
Basic information
| Registered | Jul 6, 2009 |
| Last login | Oct 29, 2009 |
| Forum posts | 11 |
| Direct URL | http://www.flowplayer.org/forum/users/12655 |
Latest forum posts
Thanks for your contribution Mike!
I think flowplayer was not made to do that. if you have a flash site and want to play a video make a simple player inside, it is easy with flash it is all done. And you can use Action Script to have more options to control the video, like flowplayers events and that stuff..
answering to your question.. i think you can't do it, unless some modifications are done to flowplayer.
answering to your question.. i think you can't do it, unless some modifications are done to flowplayer.
Here http://www.flowplayer.org/forum/4/23642 is my solution for what i needed, maybe you find it useful.
I have modified the playlist plugin to reach my specific needs and here i post the code and the explanation of what it does, maybe it is useful for someone else.
What is the difference between this version and the original?
1- Loads the clip you selected from the scrollable and starts buffering but not playing it.
2- If you want to play the video you have to click the item again, or click the play button in the flowplayer.
*Note: It loads the first clip of the playlist by default.
**Note: It is not a combination of the original plugin and my modifications, is a simplified and modified version of the plugin to reach my specific needs.
***Note: This modified version does not support loop (as it does not play automatically), does not support other type of playlist, just a playlist with scrollable, and does not supports any other options it just does what i needed and what i explained before.
The JavaScript code:
The XHTML code is the same as shown here but the player A tag has no content inside (no splash image, because the player will show the first frame of the video as starts buffering)
What is the difference between this version and the original?
1- Loads the clip you selected from the scrollable and starts buffering but not playing it.
2- If you want to play the video you have to click the item again, or click the play button in the flowplayer.
*Note: It loads the first clip of the playlist by default.
**Note: It is not a combination of the original plugin and my modifications, is a simplified and modified version of the plugin to reach my specific needs.
***Note: This modified version does not support loop (as it does not play automatically), does not support other type of playlist, just a playlist with scrollable, and does not supports any other options it just does what i needed and what i explained before.
The JavaScript code:
/**
* flowplayer.playlist 3.0.6. Flowplayer JavaScript plugin.
*
* This file is part of Flowplayer, http://flowplayer.org
*
* Author: Tero Piirainen, <info@flowplayer.org>
* Copyright (c) 2008 Flowplayer Ltd
*
* Dual licensed under MIT and GPL 2+ licenses
* SEE: http://www.opensource.org/licenses
*
* Date: 2009-02-16 06:51:28 -0500 (Mon, 16 Feb 2009)
* Revision: 1454
*
* Modified by: Denis Ciccale <denis@baobabproducciones.com>
* Date of modification: 2009-07-22 15:00:43
*/
(function($) {
$f.addPlugin("playlist", function(wrap, options) {
// self points to current Player instance
var self = this;
var opts = {
playingClass: 'playing',
pausedClass: 'paused',
activeClass:'active' // scrollable active class name
};
$.extend(opts, options);
wrap = $(wrap);
var els = null;
//{{{ "private" functions
// play/pause or load the video
function play(el, clip) {
if (el.hasClass(opts.playingClass) || el.hasClass(opts.pausedClass)) {
self.toggle();
}
// load the video and start buffering
else {
self.setClip(clip).startBuffering();
}
return false;
}
// reset playlist item class
function clearCSS() {
// playlist items
els = wrap.children();
els.removeClass(opts.playingClass).removeClass(opts.pausedClass);
}
function getEl(clip) {
return els.filter("[href=" + clip.url + "]");
}
//}}}
// all elements of playlist
els = wrap.children();
// click event for each element of the playlist
els.click(function() {
var el = $(this); // clicked element
var clip = el.attr("href"); // the clip
// if it is already selected from playlist, play the video
if ( el.hasClass(opts.activeClass) ) {
return play(el, clip);
}
// if it is other item
else {
clearCSS(); // reset items class
return play(el, clip); // load this clip
}
});
// loads the first clip of the playlist
var clip = self.getClip(0);
if (!clip.url) {
var el0 = els.eq(0); // first element from playlist
// load flowplayer and set the clip
self.load(function () { return play(el0, el0.attr("href")); } );
}
// playlist items class changes depending on clip events
// onBegin
self.onBegin(function(clip) {
clearCSS();
});
// onPause
self.onPause(function(clip) {
getEl(clip).removeClass(opts.playingClass).addClass(opts.pausedClass);
});
// onResum
self.onResume(function(clip) {
getEl(clip).removeClass(opts.pausedClass).addClass(opts.playingClass);
});
// onUnload
self.onUnload(function() {
clearCSS();
});
return self;
});
})(jQuery);
The XHTML code is the same as shown here but the player A tag has no content inside (no splash image, because the player will show the first frame of the video as starts buffering)
I have finally modified the playlist plugin to reach my needs, i will post the code later and explain what it does. It is a simple version of playlist plugin, just to do what i need. May be it is useful for someone else.
Hi, i am working with the playist plugin, when i click a clip item i want the flowplayer to update with that video (it actually do this) but not to start playing automatically, but to start buffering (or not, but at least load that clip into the flowplayer without playing automatically).
If anyone can help me it would be cool and i will appreciate it.
thanks.
If anyone can help me it would be cool and i will appreciate it.
thanks.
The onStart event fires when autoBuffering is true,
i want to fire onStart only when the video starts playing and not when starts buffering.
is this a bug? or a not correct way of implementing this event?
if not,
is there any other way to do what i want without using onStart?
thanks.
i want to fire onStart only when the video starts playing and not when starts buffering.
is this a bug? or a not correct way of implementing this event?
if not,
is there any other way to do what i want without using onStart?
thanks.
At least here http://www.flowplayer.org/demos/plugins/javascript/embed.html says you can't run events on embed code.
http://img107.imageshack.us/img107/1782/flashbugscreenshot.jpg
As you can see on that screenshot, it is possible to drag the circle of the scrubber outside the bar and also to the 26 second, even though the video last 25s.
As you can see on that screenshot, it is possible to drag the circle of the scrubber outside the bar and also to the 26 second, even though the video last 25s.
To fix bug no1. you can edit tools.scrollable-1.0.5.js changing:
this line: if (i > self.getSize() - conf.size) { return self; }
to this: if (i > self.getSize() - conf.size) { i = self.getSize() - conf.size; }
this line: if (i > self.getSize() - conf.size) { return self; }
to this: if (i > self.getSize() - conf.size) { i = self.getSize() - conf.size; }