RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
232 stars 28 forks source link

Video Loop not working #1268

Closed EricBeetsOfficial-Opuscope closed 2 years ago

EricBeetsOfficial-Opuscope commented 2 years ago

Describe the issue When I open a video by scripts (using OpenMedia) the Loop command seems to not working (also under Editor)..

Your Setup (please complete the following information):

To Reproduce

  1. Write a script opening a video
  2. add mediaPlayer.Loop = true
  3. run

Videos https://user-images.githubusercontent.com/63807677/186162526-11540b4f-9e5c-4532-8331-4ab9be837e95.mp4

Thanks in advance Eric

Chris-RH commented 2 years ago

Hi @EricBeetsOfficial-Opuscope,

mediaPlayer.IsLooping()

In the mediaplayer component you can also set playback to loop https://www.renderheads.com/content/docs/AVProVideo/articles/component-media-player.html#main

vlisk commented 2 years ago

avpro version 2.5.7, iphone 13 pro ios version is 15.6.1

description: media playback loop is not not work, it present stop at last frame

vlisk commented 2 years ago

any one can help?

Chris-RH commented 2 years ago

Hi @vlisk Did you try either of the above suggestions?

EricBeetsOfficial-Opuscope commented 2 years ago

Hi @EricBeetsOfficial-Opuscope,

mediaPlayer.IsLooping()

In the mediaplayer component you can also set playback to loop https://www.renderheads.com/content/docs/AVProVideo/articles/component-media-player.html#main

I also tried that .. It seems when we use an async code (based on UniTask) it does not work (with sync code, it seems to work..). I will try to prepare a script to show it ..

vlisk commented 2 years ago

@Chris-RH i am try mediaPlayer=true,but not work, i use below method when finsh event fired mediaPlayer.Control.SeekFast(0); mediaPlayer.Control.Play(); it work ,but i do not think it is the best method

Chris-RH commented 2 years ago

We'll look into the code for this, thank you.

MorrisRH commented 2 years ago

The bug is caused when the looping toggle in the media player inspector is unchecked. You can work around it for now by making sure that looping is enabled before calling OpenMedia and then disabling it before you start playback.

We're working on a fix which should make it into the next release.

MorrisRH commented 2 years ago

This issue has now been fixed and the fix will be available in the next release.

vlisk commented 2 years ago

@MorrisRH we buy at unity assetstore,how could we get the new release with bug fixed!!

Ste-RH commented 2 years ago

We are aiming to send out a new release later today @vlisk . You will be able to download the update, once released, via the Unity ecosystem.

Chris-RH commented 2 years ago

Version 2.6.1 has been released. Please let us know if the issue has not been fixed for you.