Log in or register to post comments

Video Playback In Fullscreen Only

November 21, 2013 - 6:07pm #1

Hi All,

Apologies for what seems like the millionth "How To Get My Video To Play Fullscreen" post, but I've searched through all the informaiton on the forums and I can't seem to find the info I need.

For my iOS and Android app I want to have a frame marker trigger and start playing a video in fullscreen without displaying the 'video on a texture' first - so just straight into fullscreen automatically.

I have the video displaying as a 3D texture on the marker as seen in the samples and it plays automatically, so all is well there. For some reason the double tap to play full screen doesn't work, but I've managed to get it to go into fullscreen once I pause the video by tapping on the textured video and then tapping again to play - it then goes into fullscreen.

Now everytime after it has first gone into fullscreen, whenever the video marker is triggered it will always play in fullscreen automatically; after it has played right through and gone back to the camera view; after it has viewed a 3D model and then back to triggering a video, but I cannot get it to play in fullscreen for the very first time that the video trigger marker is viewed.

I'm sure the answer lies somewhere in one of the video behaviour scripts but I have tried everything I can think of to get it to work and I just can't find the answer.

I'm a beginner programmer (extending my skillset from web developing into Unity and Vuforia) so please bear with me if this is something simple and obvious, and if anyone can help me I'd be really grateful.

Video Playback In Fullscreen Only

April 26, 2016 - 1:12am #7

Delete Comment

Video Playback In Fullscreen Only

April 14, 2016 - 7:19am #6

Hello! I hope you reply, if i want to do exactly the opposite how can I do this? My video is always played in fullscreen

Video Playback In Fullscreen Only

November 22, 2013 - 9:22am #5

Thanks Nalin,

I'll have a go now I know what I'm looking for, just didn't want to be trying solutions if I was missing a file.

Have a good weekend.

Video Playback In Fullscreen Only

November 22, 2013 - 9:15am #4

Sorry, my mistake.

Either way you should have enough info to force FS playback.

Run some tests!

N

Video Playback In Fullscreen Only

November 22, 2013 - 8:51am #3

Hi Nalin,

Thanks for your reply. I can see the coding for VideoPlayer.Play in VideoPlayerHelper.cs and TrackableEventHandler.cs but I can't find a script called VideoPlaybackAppManager.cs? I've looked through the Video Example package but cannot see a script with that name?

There's

  • VideoPlaybackBehaviour.cs
  • VideoPlaybackController.cs
  • VideoPlaybackEditor.cs
  • VideoPlayerHelper.cs

I'm running Unity 4.3 and Vuforia 2.6.7, but I'm sure all the files should be correct as the videos will play.

Am I missing a file?

Video Playback In Fullscreen Only

November 22, 2013 - 1:32am #2

The VideoPlayerHelper.cs contains a play function as below:

    /// Request a movie to be played either full screen or on texture and at a given position

    public bool Play(bool fullScreen, float seekPosition)

    {

        // On Android we use Unity's built-in full screen movie player

        // On iOS we overlay a native full screen player as a new subview of the main window

        // (note that the Unity engine is not paused in this case)

 

        if (fullScreen && (Application.platform == RuntimePlatform.Android))

        {

            if (mFilename == null)

            {

                return false;

            }

 

            Handheld.PlayFullScreenMovie(mFullScreenFilename, Color.black, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFit);

            return true;

        }

        else

        {

            return videoPlayerPlay(fullScreen, seekPosition);

        }

    }

 

 

Then if you do a search for VideoPlayer.Play you will find it being called from TrackableEventHandler.cs and VideoPlaybackAppManager.cs

This should give you enough information to figure out where to force it to be fullscreen.

 

N

 

 

Log in or register to post comments