Log in or register to post comments

VideoPlayer problem on iOS

February 25, 2014 - 3:52am #1

Hello,

We are experimenting on playing videos in AR and run successful build on Android, everything works fine. Our application is auto-playing video when succesfully find the target. Also double-tap controller is opens video on full screen. We dont think doing any mistake on following codes on VideoPlayerHelper.cs

/// <summary>
/// Request a movie to be played either full screen or on texture and at a given position
/// </summary>
    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);
        }
    }

 

It works fine on Android. When we run application on iOS, application starts, we show target to application,we can see augmention object but the video which is inside this object is not playing. Double tab works fine(fullscreen) but when we go back from the fullscreen video stops.

Is there any any code changes when we build application on iOS? Or any of you have an idea about the problem ?

Development Enviroment : Unity Pro, Android Pro, iOS Pro
Test device : iPhone 5 A1428

VideoPlayer problem on iOS

June 22, 2014 - 11:35pm #9

Hi , 

I am facing the same problem describe in this topic , 

any workaround , or update to solve it ?

thanks

mauro

 

 

VideoPlayer problem on iOS

February 26, 2014 - 3:39am #8

It seems not possible to play video in texture automatically using video URL. Putting it in to wish-list.

VideoPlayer problem on iOS

February 25, 2014 - 8:17am #7

Then you need to compare your code and find out what is different, then debug it ;)
 

N

VideoPlayer problem on iOS

February 25, 2014 - 8:13am #6

Sorry for misunderstood NalinS.
Yes. VideoPlayback sample works fine. (Autoplay and double tap for fullscreen works)

VideoPlayer problem on iOS

February 25, 2014 - 8:05am #5

No, that is not what I asked.

When you run the videoplayback sample out of the box, with no modifications, does it work correctly?

 

N

VideoPlayer problem on iOS

February 25, 2014 - 7:52am #4

Basicly yes. We tried implement videoplaybackbehaviour to the books sample.

VideoPlayer problem on iOS

February 25, 2014 - 7:09am #3

Is this problem reproduceable using the VideoPlayback sample?

 

N

VideoPlayer problem on iOS

February 25, 2014 - 5:18am #2

-> applicationDidEnterBackground()

-> applicationWillEnterForeground()

-> applicationDidBecomeActive()

StartQCAR

 

(Filename: /Applications/buildAgent/work/d3d49558e4d408f4/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 53)

 

cameraDeviceInitCamera

2014-02-25 14:22:04.268 DUPPAR[1791:60b] DEBUG/AR(1791) UIView has CAEAGLLayer class

2014-02-25 14:22:04.270 DUPPAR[1791:60b] DEBUG/AR(1791) UIView does not respond to selector renderFrameQCAR

2014-02-25 14:22:04.270 DUPPAR[1791:60b] DEBUG/AR(1791) UIView has CAEAGLLayer class

2014-02-25 14:22:04.271 DUPPAR[1791:60b] DEBUG/AR(1791) UIView does not respond to selector renderFrameQCAR

2014-02-25 14:22:04.272 DUPPAR[1791:60b] DEBUG/AR(1791) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR

cameraDeviceGetVideoMode

2014-02-25 14:22:04.279 DUPPAR[1791:60b] DEBUG/AR(1791) UIView has CAEAGLLayer class

2014-02-25 14:22:04.280 DUPPAR[1791:60b] DEBUG/AR(1791) UIView does not respond to selector renderFrameQCAR

2014-02-25 14:22:04.281 DUPPAR[1791:60b] DEBUG/AR(1791) UIView has CAEAGLLayer class

2014-02-25 14:22:04.281 DUPPAR[1791:60b] DEBUG/AR(1791) UIView does not respond to selector renderFrameQCAR

2014-02-25 14:22:04.282 DUPPAR[1791:60b] DEBUG/AR(1791) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR

cameraDeviceSelectVideoMode

2014-02-25 14:22:04.284 DUPPAR[1791:60b] DEBUG/AR(1791) UIView has CAEAGLLayer class

2014-02-25 14:22:04.285 DUPPAR[1791:60b] DEBUG/AR(1791) UIView does not respond to selector renderFrameQCAR

2014-02-25 14:22:04.287 DUPPAR[1791:60b] DEBUG/AR(1791) UIView has CAEAGLLayer class

2014-02-25 14:22:04.287 DUPPAR[1791:60b] DEBUG/AR(1791) UIView does not respond to selector renderFrameQCAR

2014-02-25 14:22:04.288 DUPPAR[1791:60b] DEBUG/AR(1791) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR

cameraDeviceStartCamera

markerTrackerStart

imageTrackerStart

cameraDeviceGetVideoMode

2014-02-25 14:22:04.962 DUPPAR[1791:60b] DEBUG/AR(1791) UIView has CAEAGLLayer class

2014-02-25 14:22:04.963 DUPPAR[1791:60b] DEBUG/AR(1791) UIView does not respond to selector renderFrameQCAR

2014-02-25 14:22:04.965 DUPPAR[1791:60b] DEBUG/AR(1791) UIView has CAEAGLLayer class

2014-02-25 14:22:04.966 DUPPAR[1791:60b] DEBUG/AR(1791) UIView does not respond to selector renderFrameQCAR

2014-02-25 14:22:04.966 DUPPAR[1791:60b] DEBUG/AR(1791) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR

2014-02-25 14:22:47.511 DUPPAR[1791:a81b] INFO/AR(1791) 2014-02-25 14:22:47: Completed CloudReco transaction with ID 'f8c0183b2bd147819679065d429b4dbe'

Found Target!!!

targetFinderGetResults

targetFinderEnableTracking

2014-02-25 14:22:47.573 DUPPAR[1791:60b] INFO/AR(1791) 2014-02-25 14:22:47: ImageTracker: Successfully created dataset

2014-02-25 14:22:47.617 DUPPAR[1791:60b] INFO/AR(1791) 2014-02-25 14:22:47: Successfully created ImageTarget.

targetFinderGetImageTargets

targetFinderStop

Num trackables detected: 1

 

(Filename: /Applications/buildAgent/work/d3d49558e4d408f4/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 53)

 

This is the output when we scan target. 

 

Edit : Also tried to replace original VideoPlaybackHelper.cs and VideoPlaybackBehaviour.cs. Video still not working when target scanned.

Edit2 : After debugging we found a point on IsPlayableOnTexture() function returns false.
 

private bool videoPlayerIsPlayableOnTexture()
    {
        return videoPlayerIsPlayableOnTextureIOS(mVideoPlayerPtr);
    }

 

Log in or register to post comments