Forums

/

revert to non-fullscreen at end?

7 replies [Last post]

I would like my player ...I would like my player to go back to non-fullscreen mode automatically when an FLV
video finishes. I haven't seen a way to this in the docs. I already have a JS
callback for finishing. Is there anything I can do at that point to revert it
to non-fullscreen if it is in fullscreen?

--Milt--

I haven't tried it, but according to this document: [url=http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html]Exploring full-screen mode in Flash Player 9
[/url]

The full-screen mode in Flash Player is initiated through ActionScript and can be terminated through ActionScript, keyboard shortcuts, or by the user switching focus to another window.

So perhaps you could detect the end of the video by monitoring the player's state, then change the window focus to drop out of fullscreen.

In this case, I don't want to change window focus, I just want to revert to the non-fullscreen
version so the user can see my toolbar and decide what to do next.

Looks to me like what would be needed is another event in the player that could be
called to invoke the actionscript that would take us out of fullscreen.

--Milt--

Just to be sure, I tried sending a 'stop' event when the player stops playing.
That doesn't work (i.e. it doesn't take the player out of fullscreen).

--Milt--

If you test for the player status equal to 3, can't you just send a keyboard event for the [ESC] ke?

Jimb

Not sure what you mean. Are you talking about doing something with Javascript?
The books I have on JS talk about being able to detect key presses, but they
don't mention anything about being able to send a key press.

--Milt--

Bump.

Anybody have any more comment on this?

I think fullscreen is neat, & I encourage my users to use it. However, leaving the user sitting
there with a big black screen at the end of the video is a real bummer. Sure, if they are
smart they can hit ESC or move the mouse and click the fullscreen button again, but
requiring this is not very user-friendly. Its much more friendly to automatically go back
to a page with some choices on it once the video is finished playing, but I can't see
how to do this.

--Milt--

Here's a contribution by windowfocus I stumbled accross in the SOLUTIONS FOUND thread. It works very nicely.

    function getUpdate(typ, pr1, pr2, pid)
    {
      if(typ == 'state')
      {
        // drop out of fullscreen
        if(pr1 == 3)
        {
          this.window.focus();
        }
      }
    };

Jimb