Download & Extend

video module incompatible with FlowPlayer 3.x

Project:Video
Version:6.x-2.x-dev
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:glen201
Status:closed (fixed)

Issue Summary

Guys, forgive me if I missed it but I cannot for the life of me figure out how to get flowplayer to work correctly with this module.

Here's my configuration:

- Drupal 5.12
- Video Module 5.x.1.x
- Flowplayer 3.x

I've done the following:

- Placed a copy of flowplayer and flowplayer controller on the server
- Gone under /admin/settings/video to point to flowplayer
- Uploaded a sample .flv file

Result...

- The video node is created however the flowplayer appears blank and doesn't show the .flv
- The .flv file is on the server (permissions are correct and can be directly downloaded)

Question(s)

1. Which version of flowplayer are you guys using? I downloaded 3.x. I tried to get my hands on an earlier version but there not available off the sourceforge Web site any longer.

2. Where are you putting flowplayer? I've tried the root directory, files directory.

3. Is it possible the video module is incorrectly passing flash parameters for the copy of flowplayer that I have? This would explain why the swf is visible but the .flv never loads.

4. Do I need to bypass the video.js file and include the flowplayer.js instead?

Thank you for your help.

Comments

#1

Title:Flowplayer issues» video module incompatible with FlowPlayer 3.x
Category:support request» bug report
Assigned to:Anonymous» fax8

yeah.. seems that new flowplayer version 3 is not backward compatible with the configuration we are using.

So.. video module code needs to be updated to reflect this flowplayer apis changes.
Meanwhile you can use the attached flowplayer version which should work. Just rename it from FlowPlayer.swf.jpg to FlowPlayer.swf (drupal.org don't let me upload .swf files).

I will work on updating the code.

AttachmentSize
FlowPlayer.swf_.jpg 109.23 KB

#2

In order to support FlowPlayer 3, I had to modify the file includes/common.inc in the module's directory.

Starting at line 89, I replaced the following:

<?php
  $output
.= '<param name="movie" value="' . url() . check_plain($loader_location) . '" />
               <param name="wmode" value="transparent" />
               <param name="allowScriptAccess" value="sameDomain" />
               <param name="quality" value="high" />
               <param name="flashvars" value="config={baseURL:\''
. $base_url .'\',videoFile:\''. $file .'\',autoPlay:true,bufferLength:5}" />' . "\n"
 
. _video_get_parameters($node) .
 
'<p>'. t('Your browser is not able to display this multimedia content.') .'</p>
</object>'
;
?>

With the following:

<?php
  $config
= sprintf("config={'playerId':'player','clip':{'url':'%s'},'playlist':[{'url':'%s'}]}", $base_url . '/' . $file, $base_url . '/' . $file);
 
$output .= '<param name="movie" value="' . url() . check_plain($loader_location) . '" />
               <param name="wmode" value="transparent" />
               <param name="allowScriptAccess" value="sameDomain" />
               <param name="quality" value="high" />
               <param name="flashvars" value="'
. $config . '" />'
 
. _video_get_parameters($node) .
 
'<p>'. t('Your browser is not able to display this multimedia content.') .'</p>
</object>'
;
?>

Hope this helps! (Although, I think I could have used sprintf() better.)

#3

It works!!!!!
@ remi
tnx you very much.... :-)
Keep with the good work...

#4

Yes !! Thanks a lot, remi !!!
Other possible mistake: to forget the flowplayer.controls.swf in the root Drupal directory. (Firebug helps a lot)
I attached a patch corresponding to the change you mentionned.

AttachmentSize
video-FlowPlayer3.x.patch 1.23 KB

#5

While at it, don't think we should better use the Javascript API for flowplayer? It's much cleaner and should be more compatible with future releases.

#6

Thanks for making a patch out of my changes, denis.metz.

As for the JavaScript API, I believe it should be a separate issue.

#7

Assigned to:fax8» heshan.lk
Status:active» fixed

I will added this to the CVS, Thanks for contribution.

#8

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#9

Version:5.x-1.x-dev» 6.x-2.1-beta1
Status:closed (fixed)» needs work

Why hasn't this fix made it to the latest releases? Clearly it's causing people unnecessary problems by leaving it out!!??

-- glen

#10

I uploaded flv file, but the video doesn't play, this text is shown:

Your browser is not able to display this multimedia content.

Problems viewing videos?
Download latest Flash Player

I downloadet the flashplayer, try flowplayer3 and flowplayer 2, check settings.. Nothing helps..

#11

Version:6.x-2.1-beta1» 6.x-2.x-dev

You should add in the object's param section:

<param name="allowfullscreen" value="true" />

So the flowplayer button on the control bar allows full screen to work!!!!!!!

OMG... what a mess in this module....

#12

Status:needs work» fixed

replace theme_video_play_flash($node) function in the common.inc

<?php
/**
* Play videos from in FLV Flash video format
*
* @param $node
*   object with node information
*
* @return
*   string of content to display
*/
function theme_video_play_flash($node) {
 
$loader_location = variable_get('video_flvplayerloader', 'FlowPlayer.swf');

 
$url = _video_get_fileurl($node->vidfile);
 
$file = basename($url);
 
$base_url = substr($url, 0, strrpos($url, '/'));

 
$height = $node->video_scaled_y + 24; // add commands height

  // this will be executed by not Internet Explorer browsers
 
$output = '<!--[if !IE]> <-->
<object type="application/x-shockwave-flash" width="'
. $node->video_scaled_x .'" height="'. $height .'"
data="'
. url() . check_plain($loader_location) .'">
<!--> <![endif]-->'
. "\n";

 
// this will be executed by Internet Explorer
 
$output .= '<!--[if IE]>
<object type="application/x-shockwave-flash" width="'
. $node->video_scaled_x .'" height="'. $height .'"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">
<![endif]-->'
. "\n";

 
// params will be passed to both IE or not IE browsers
 
$config = sprintf("config={'playerId':'player','clip':{'url':'%s'},'playlist':[{'url':'%s'}]}", $base_url . '/' . $file, $base_url . '/' . $file);
 
$output .= '<param name="movie" value="' . url() . check_plain($loader_location) . '" />
               <param name="allowFullScreen" value="true" />
               <param name="wmode" value="transparent" />
               <param name="allowScriptAccess" value="sameDomain" />
               <param name="quality" value="high" />
               <param name="flashvars" value="'
. $config . '" />'
 
. _video_get_parameters($node) .
 
'<p>'. t('Your browser is not able to display this multimedia content.') .'</p>
</object>'
;

 
$output = theme('video_format_play', $output, t('http://get.adobe.com/flashplayer/'),
                                     
t('Link to Adobe Flash Player Download Page'),
                                     
t('Download latest Flash Player'));
   return
$output;
}
?>

#13

Status:fixed» needs review

Is anyone experiencing browser Javascript errors with video playback on IE with a flowplayer-based video? I got the following from IE 8's view source. I can't see why the browser is exec'ing the non-IE section here (notice the if !IE is uncommented)... Is this some incompatibility coming down from the theme?

  <div class="content">
   
<div id="video-player">
<!--[if !IE]> <-->
<object type="application/x-shockwave-flash" width="400" height="292"
data="/flowplayer.swf">
<!--> <![endif]-->
<!--[if IE]>
<object type="application/x-shockwave-flash" width="400" height="292"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">
<![endif]-->
<param name="movie" value="/flowplayer.swf" />

I get a lot of these "Line 1" errors, which is usually something in a .js include...
Also a bunch of the Object required errors

This happens even with different themes.

Message: 'null' is null or not an object
Line: 1
Char: 113
Code: 0
URI: h ttp://ubu/node/76

Message: Object required
Line: 48
Char: 3
Code: 0
URI: h ttp://ubu/node/76

There's also something funky with the video module when trying to view a video with a missing plugin (as quicktime for MPG). You get this:

<![endif]-->
Your browser is not able to display this multimedia content.

a stray endif coming on-screen (you also sometimes see it behind the flowplayer plugin before it loads)

#14

Assigned to:heshan.lk» glen201
Status:needs review» postponed (maintainer needs more info)

The problem reported in this issue for Flowplayer fixed in common.inc as of 6.x-2.4 release

Javascript errors remain, don't seem to effect performance of the page - needs further analysis

--glen201

#15

Status:postponed (maintainer needs more info)» closed (fixed)
nobody click here