Log in or register to post comments

Video Looping Issue

May 15, 2013 - 11:50am #1

Hi ,

 

I achieved Video Looping by using setlooping method of mediaplayer in android. But between video ends and restarts there is flicker/gap of 1 second.

We faced similar issue in iOS and we solved the issue by using following lines

 

  if(videoTextureID[playerIndex] == 0 || (videoTexID && videoTextureID[playerIndex] != videoTexID)) {
                        videoTextureID[playerIndex] = videoTexID;
                    }
 
in renderFrameQCAR
 
How i can achieve same in Android JNI code

Video Looping Issue

April 4, 2018 - 7:36am #3

Hi @AlessandroB,

I found this thread while searching for a video loop option. I'm using Unity and added this code (snippet from another thread) in VideoPlaybackBehaviour.cs:

case VideoPlayerHelper.MediaState.REACHED_END:
     if (videoLoop) {
      mVideoPlayer.Play(false, 0.0f);
     }

At the end of the video is (one?) frame where the video stops before it's restarted. I'm not sure if this is the problem this thread solves. Anyway, I'm looking of a solution for Unity, since here it's about iOS and Android. Any idea?

Thanks

Video Looping Issue

May 15, 2013 - 1:10pm #2

Hi, in Android samples you can refer to the renderFrame() function in VideoPlayback.cpp and use

 videoPlaybackTextureID[currentTarget] 

 

Log in or register to post comments