Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

onComplete exit fullscreen


Cant find solutions to exit fullscreen mod when playback is done

Im try something like this
bc.. jwplayer('beemPlayer').onComplete(
function() {
setFullscreen(false);
}
);


But not work, im using jw5 player

4 Community Answers

JW Player

User  
0 rated :

Thanks @sanil, this code works perfect

Ethan Feldman

JW Player Support Agent  
0 rated :

Nice :)

JW Player

User  
0 rated :

not nice!!
hmmmm...using setFullscreen with JWP6

bc.. 1. setFullscreen isn't listed as a setter in the JWP6 documentation for the JavaScript API
2. although it does work it causes erratic and unpredictable behavior
when used in-conjunction with the JWP6.4.3359 version
3. I suspect that this is a remnant from a previous version OR an
issue



Coming across this myself, as I wanted to have a clean exit when in fullscreen and the media has completed returning to normal screen mode.

The solution that I came across was found after re-reading the documentation.

Since I use in the events 'handlers' being functions listed and called when needed
for example:
bc.. events:
{
onFullscreen: fullHandler,
onComplete: completeHandler
}



The handlers are listed after the instantiation of the JWPlayer
for example:
bc.. /* this pauses the JWPlayer upon the "fullscreen" mode entry/exit */
function fullHandler()
{
jwplayer('video').pause();
}

function completeHandler()
{
jwplayer("video").stop();
jwplayer("video").resize(512,256);
jwplayer("video").setup(options);
.
.
.
}



Several things are worth noting:
<ol>
<li>entering/exiting from fullscreen; the JWPlayer will pause; yet
if one pauses first and then enter/exit fullscreen the JWPlayer
continues to play</li>
<li>the complete handler stops the media from playing; resizes;
the jwplayer; and the JWPLayer is re-initialized.
This works very well with JWP6.4.3359 and I am sure that
perhaps a more eloquent solution most probably arise with
future release. This work for both audio and video media.</li>
</ol>

*NOTE:This applies to the html5mode of the JWPLayer as I have not tested this with the flashmode since I don't use the flashmode on my web site since I don't even load the player.swf which isn't needed for the html5mode.*

To see this in effect just visit my web site, www.starbase-alpha.com, then teleport to the JWP6 examples .

gee, I may be guilty of tmi here.

Ethan Feldman

JW Player Support Agent  
0 rated :

That code works fine though, did you check it?

This question has received the maximum number of answers.