Hello,

I've tried without success to register the onFullscreen and onFullscreenExit functions via this module. I thing I am allmost there, but I've no luck after hours of experimenting. An advice would be really welcome.

In JavaScript I've these two functions:

onFullscreen:function(){this.getPlugin("content").css({body:{fontSize:50},height:200});},
onFullscreenExit:function(){this.getPlugin("content").css({body:{fontSize:16},height:65});} 

I've tried lots of combinations, like this:

<?php
flowplayer_add('#player', array(
'onFullscreen' => 'this.getPlugin("content").css({body:{fontSize:50},height:200})',
'onFullscreenExit' => 'this.getPlugin("content").css({body:{fontSize:16},height:65})',
'clip' => array( 
        'autoPlay' => false, 
        'autoBuffering' => true,
        ...

but none of them works, it is still interpreted as a string. Since I'm not a JavaScript programmer, could you please provide me an working example.

Comments

robloach’s picture

Something like this?

drupal_add_js('myplayer.js');
flowplayer_add('#player', array(
'onFullscreen' => 'onFullscreen',
'onFullscreenExit' => 'onFullscreenExit',
'clip' => array(
        'autoPlay' => false,
        'autoBuffering' => true,
        ...

myplayer.js

function onFullscreen(){this.getPlugin("content").css({body:{fontSize:50},height:200});},
function onFullscreenExit(){this.getPlugin("content").css({body:{fontSize:16},height:65});} 
drapal’s picture

Thank you very much for your suggestion, but it seems to me, that it doesn't work. The .js file is included, in the jQuery.extend I can see "onFullscreen": "onFullscreen", but the player isn't even displayed.