How do I setup flowplayer as the video player?

I downloaded flowplayer and changed the settings in the ckeditor swf menu
----------------------------------------------------
return array(
'video/x-flv' => array(
'path' => 'sites/all/libraries/flowplayer/flowplayer-3.2.5.swf',
'offsetHeight' => 24,
'fileName' => 'file',
----------------------------
the flowplayer shows up but would not play the video.

Comments

anrikun’s picture

Flowplayer is currently not supported as it requires some extra work.
I'll try to work on it this week-end!

anrikun’s picture

Title: How to setup flowplayer as the video player » Add support for Flowplayer as the video player
Version: 6.x-2.1 » 6.x-2.x-dev
Assigned: pablogy » Unassigned
Status: Active » Needs review

I have just added experimental support for Flowplayer as the video player.
Download CKEditor SWF last dev or grab it from CVS.
Assuming that you have downloaded and unpacked Flowplayer to your site/all/libraries directory, you may enter the config below at admin/settings/ckeditor_swf.
It uses Flowplayer for video and 1 Pixel Out for audio (Flowplayer cannot be used for audio).
Please review this!

<?php
return array(
  'video/x-flv' => array(
    'path' => 'sites/all/libraries/flowplayer/flowplayer-3.2.5.swf',
    'offsetHeight' => 0,
    'fileName' => 'clip',
    'jsonName' => 'config',
  ),
  'audio/mpeg' => array(
    'path' => 'sites/all/libraries/audio-player/player.swf',
    'offsetHeight' => 0,
    'fileName' => 'soundFile',
    'defaultWidth' => 290,
    'defaultHeight' => 24,
  ),
);
?>
pablogy’s picture

I have followed your steps. It is working internet explorer but not in Firefox.

Thanks.

anrikun’s picture

Did you clear your cache?
It should work with Firefox too.

pablogy’s picture

Ok it is working.

Thanks

parashutiki’s picture

How to disable autoplay?

anrikun’s picture

That is another thing I have to add support for!
But I'm too busy at the moment :-(

parashutiki’s picture

Sorry. I thought what is easy and my question would be similar. I just decide it by pasting forward code, such this.

<html>
<script type="text/javascript" src="http://site.name/sites/all/libraries/flowplayer/example/flowplayer-3.2.4.min.js"></script>
<p><div id="player" style="display:block;width:600px;height:480px;"></div></p>
<script>
flowplayer("player", "http://site.name/sites/all/libraries/flowplayer/flowplayer-3.2.5.swf", {clip:  {url: "%2Fsites%2Fdefault%2Ffiles%2Fflash%2Foutput-lesson-6.flv", autoPlay: false, autoBuffering: false }});
</script>
</html>

I do it because in JW player when pushing PAUSE show Embed configurations and user can't stop video lesson for learning. I don't know how this disallow.

And this is for playlist from 3 videos for example/

<script type="text/javascript" src="http://site.name/sites/all/libraries/flowplayer/example/flowplayer-3.2.4.min.js"></script>
<p><div id="player" style="display:block;width:600px;height:480px;"></div></p>
<script>
flowplayer("player", "http://site.name/sites/all/libraries/flowplayer/flowplayer-3.2.5.swf", {clip:  {baseUrl: "%2Fsites%2Fdefault%2Ffiles%2Fflash%2F", autoPlay: false, autoBuffering: false },playlist: ['lesson-12-1.flv', 'lesson-12-2.flv', 'lesson-12-3.flv'], plugins: {controls: {url: "http://site.name/sites/all/libraries/flowplayer/flowplayer.controls-3.2.3.swf", playlist: true}}});
</script>
twilightelf’s picture

Please, help to disable autoplay.

anrikun’s picture

I will provide a patch to disable autoplay this week-end (or before if I have some time!).

yooh’s picture

Hi all,

did someone find a solution to disable autoPlay ?

yooh’s picture

If i edit the source code and replace :

<param name="flashvars" value="config={"clip":"/sites/default/files/sample.flv"}" />

by

<param name="flashvars" value='config={"clip":{"url":"/sites/default/files/sample.flv","autoPlay":false,"autoBuffering":true}}' />

it's work,But not user friendly.

yooh’s picture

Oups, i'm using 7.x-1.0-beta1

Sorry

anrikun’s picture

@yooh (#13): no problem, 6.x and 7.x are in sync so it should work in both! Thanks for sharing.

twilightelf’s picture

i am still waiting for :(

yooh’s picture

version : 7.x-1.0-beta1
I made some change to have autoPlay option:
For me, it's working but i need to select again the video file and parameters if i edit it.

ckeditor_swf.module line 279, replace

function ckeditor_swf_params($params) {
  $output = '';
  foreach ($params as $name => $value) {
		$output .= '<param name="'.$name.'" value="'.$value.'" />'."\n";
  }
  return $output;
}

by

function ckeditor_swf_params($params) {
  $output = '';
  foreach ($params as $name => $value) {
	if($name=="flashvars" && stristr($value, "url") === FALSE && isset($params["play"])) {
		$temps = explode("%3A",$value);
		$temp1 = substr($temps[1], 0, -3);
		$value_flashvars = $temps[0]."%3A%7B%27url%27%3A".$temp1."%2C%27autoPlay%27%3Afalse%2C%27autoBuffering%27%3Atrue%7D%7D";
		$output .= '<param name="'.$name.'" value="'.$value_flashvars.'" />'."\n";
	} else {
		$output .= '<param name="'.$name.'" value="'.$value.'" />'."\n";
	}
  }
  return $output;
}
AlanT’s picture

According to the project's main page, this module does not need any javascript player to play FLV and MP3 files.

Currently, CKEditor SWF needs the following to run:

the CKEditor module, version 6.x-1.0 or above or the Wysiwyg module, version 6.x-2.1 or above
the CKEditor editor, version 3.1 or above
the GD2 PHP library
the getID3() module is needed if you want FLV and MP3 files support.

I am EXTREMELY disappointed that I spent so much time installing this and the getid3 modules to find that it will play these formats ONLY with a NON-COMMERCIAL external javascript library! (JW Player requires a paid license to use on commercial websites.)

I have used Flowplayer for previous videos, and thought this would simplify my setup.

Oh, by the way, Flowplayer CAN play audio as long as you get the extra js library.

If we have to give this module PHP code, then it should be able to interface with ANY media player. Please provide the code to interface both FLV and MP3 with Flowplayer. Otherwise, give up on creating worthless modules.

sonicweaversinc’s picture

No need to be a pessimistic douche bag about it. Calm down and how about being supportive. This module is great, and understand it's still under development. This is the way things ago, especially when he takes his own personal time to do this. How about learning some code maybe and contributing something. Learn some manners as well.

AlanT’s picture

And there's no reason for the description of this module to be misleading.

If it requires an external javascript library (for ANY feature to work), then list it in the requirements. It's okay to add something like "only for xxxxxx feature".

At least that way, no one wastes time if the module does not meet their needs.

And as far as manners, I did not engage in any name-calling. Perhaps you should listen to your own advice.

Helmut Neubauer’s picture

@yooh (#16) Did you do anything else? Unfortunately, it doesn't work for me :(.

Helmut Neubauer’s picture

Ok, I got it, forgot do disable the auto play option in my WYSIWYG editor. Perhaps it's useful to add yoohs change permanently to the code?

drakythe’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Status: Needs review » Active

Is Flowplayer 3 still supported in some form? I cannot get my flv to play with the latest version (3.2.11). I have successfully played the file with JWplayer, but I'm looking to stop my video on the last frame and keep it in place, which I've only gotten to work with FP3 before, and I cannot seem to replicate it with JWplayer.