views:

1705

answers:

1

I have implemented chromeless player and so far the necessary controls such as play, pause, change video, mute, unmute all appear to work fine through JavaScript. I now need to send the chromeless player to "Full Screen" mode via JavaScript.

The JavaScript API player includes the full screen button but the chromeless player does NOT; infact; the chromeless player is not supposed to contain ANY button. I therefore need to set full screen mode via JavaScript but could not find any documented method for this. Any idea if this is possible or not?

FYI, I am using SWFObject to embed the player.

References:

+1  A: 

There is a player.setSize(width:Number, height:Number) method on the player object.Have you used that.I am using ActionScript though and setSize is working for me.

Looking at the documentation 'You should not have to use this method in JavaScript as the player will automatically resize when the containing elements in the embed code have their height and width properties modified.'

I am not a javascript expert but i would suggest...you can put the player in a div tag and on click the 'fullscreen' button or icon you reset the size of that div to '100%' and i think the player would automatically increase to that size

Hope this helps.

Rajat
Looks like even in youtube they do it like that...do a viewsource of their code....
Rajat
I now realize that Adobe Flash itself does not allow full screen mode switching unless it is triggered from inside the flash movie by a user action (clicking a button, input from keyboard). Your example is probably as good as it gets.
Salman A