Log in or register to post comments

Video Playback Controls

June 23, 2015 - 4:02pm #10

Apologies if this is covered somewhere else, but I can't find a solution for this.

I'm using Vuforia 4.2.3, Unity 4.6.5f1 and Xcode 6.3.2 and have migrated a Vuforia 3 app over to Vuforia 4 without any problems except for an issue with video playback.

After adding in the new 4.2.3 video prefab and setting up the video, I can get the video to trigger and play automatically without any problems, but what I can't get it to do is pause, play (if not set to auto play) or go full screen on tap like the videos used to do in Vuforia 3.

The play icon will show over the video for example, but when tapping on it I cannot get the video to start playing. Likewise, when the video is playing, tapping on it will not pause the video.

I'm aware that VideoPlaybackController is not part of the 4.2.3 files and I thought this was the part that controlled playback features, but is it because I am using Unity 4.6.5 rather than Unity 5 that the playback controls are not working? We are using some 3rd party assets which do not support Unity 5 so we cannot upgrade at present.

I've seen https://developer.vuforia.com/forum/faq/unity-how-do-i-create-simple-videoplayback-app that provides the code for VideoPlaybackController, but this generates errors because it is for use with an older version of Vuforia.

How can I enable playback controls? Is there an updated version of VideoPlaybackController that I can utilise? Or modify the old one in a way that doesn't generate errors?

Any help you can provide would be much appreciated.

 

Regards,

Matthew.

Video Playback Controls

June 25, 2015 - 6:11pm #9

Are you using the code from the Vuforia 3.x VideoPlayback sample or have you replaced it with the VideoPlayback 4.2.3 source? The VideoPlayerHelper.cs in Unity calls methods in the respective native plug-in (iOS or Android) that is included with the sample. You can find the iOS native source for that here:

Assets/Plugins/iOS/VuforiaMediaSource/src/VuforiaMedia.xcodeproj

You can use the VideoPlayback 4.2.3 sample app as a comparitive reference to your upgraded app.

Video Playback Controls

June 26, 2015 - 5:31am #8

Hi dm3d,

I've just created a new project in Unity 4.6.5 and installed the Vuforia 4.2.3 package plus the video sample as well.

Even with this, the touch functionality does not work. It simply shows the keyframe texture I've assigned for the video, but tapping on the play button does nothing.

Is this an issue with running on Unity 4.6.5? Will the function only work on Unity 5.x now?

 

Regards,

Matthew.

Video Playback Controls

June 29, 2015 - 8:17pm #7

Are you trying this in Unity PlayMode? The VideoPlayback video samples aren't supported in Unity PlayMode since the video playback is handled by the native code (mentioned in my earlier post) for the target platform (iOS or Android), not for Mac OS or Windows.

Video Playback Controls

June 30, 2015 - 6:21am #6

Hi dm3d,

No, I know that videos won't play in Unity's Play Mode and shows the 'Error' cross.

This is me testing on an iPhone 5 with the latest version of iOS installed.

Video Playback Controls

July 2, 2015 - 9:27pm #5

Does an unmodified version of the VideoPlayback 4.2.3 sample app work okay?

Video Playback Controls

July 3, 2015 - 3:06am #4

Hi dm3d,

No it doesn't. I tried a fresh Unity project with a vanilla copy of the Vuforia 4.2.3 package and Video sample and the same issue is happening where you cannot trigger a video to play by tapping on the Play button when running the test on an iPhone.

Video Playback Controls

July 6, 2015 - 7:12pm #3

I tested the VideoPlayback 4.2.3 Unity sample on an iPhone 5 and it worked fine. You can toggle full-screen video playback in the menu settings. Access the menu with a double-tap.

Video Playback Controls

July 7, 2015 - 3:53am #2

Hi dm3d,

Was this using Unity 4.6.5 or Unity 5?

Video Playback Controls

July 7, 2015 - 10:56am #1
Log in or register to post comments