RenderHeads / UnityPlugin-AVProVideo

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

FinishedPlaying event does not fire in certain HLS video #1122

Closed kakusato closed 2 years ago

kakusato commented 2 years ago

Describe the issue The first one will fire. It does not fire after rewinding a little after the video finishes playing. MP4 is no problem.

Your Setup (please complete the following information):

kahnivore commented 2 years ago

Could you provide a little more detail here so that we can try reproduce this? How far back are you seeking, perhaps you could share a code sample?

Thanks

kakusato commented 2 years ago

using UnityEngine; using RenderHeads.Media.AVProVideo;

public class EventTest : MonoBehaviour {

public MediaPlayer MediaPlayer;

void Start()
{
    if (MediaPlayer) MediaPlayer.Events.AddListener(OnVideoEvent);
}

public void OnVideoEvent(MediaPlayer mp, MediaPlayerEvent.EventType et, ErrorCode errorCode)
{
    Debug.Log(et);
}

}

It is difficult to explain, so I uploaded a video. https://youtu.be/UmeULdRZbh4

  1. MP4, 1st playback fires.

  2. Rewind a little.

  3. MP4, second playback also fires.

  4. HLS, first playback fires.

  5. Rewind a little.

  6. HLS, second playback does not fire.

kahnivore commented 2 years ago

Tested with both an MP4 and an HLS stream, both behave in the same way - i.e. fire the finished playing event when it ends and then again after rewinding a little.

Could you perhaps share the stream you're testing with? You can send to unitysupport@renderheads.com if it's private (please include the issue number (1122) in the subject line.

kahnivore commented 2 years ago

Sorry, I accidentally deleted the project file before realising it would contain the trial version and not the licensed plugin. Could you reshare? Also noticed access was still required.

kakusato commented 2 years ago

I'm sorry. I will post it again.

https://drive.google.com/file/d/1gTlIvwtevA983F822YWkwJqHUSK04kT1/view?usp=sharing

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kakusato commented 2 years ago

What happened after that?

kahnivore commented 2 years ago

Interesting, it does seem to occur with your stream (i.e. not firing the finished playing event a second time after rewinding a little). We need to investigate why this is happening and will get back to you.

AndrewRH commented 2 years ago

I'm sorry. I will post it again.

https://drive.google.com/file/d/1gTlIvwtevA983F822YWkwJqHUSK04kT1/view?usp=sharing

Could you please share this again? Best to email the link to unitysupport@renderheads.com with a subject "GitHub #1122"

Thanks,

kakusato commented 2 years ago

Shared with.

https://drive.google.com/file/d/1gTlIvwtevA983F822YWkwJqHUSK04kT1/view?usp=sharing

AndrewRH commented 2 years ago

Thanks, we have reproduced and fixed the issue.

Updated script is attached here: MediaPlayer_Events.zip

This fix will go into the next release 2.5.2

Thanks for reporting this!

Chris-RH commented 2 years ago

Hi @kakusato Version 2.5.2 has been released, so please let us know if the update has fixed the problem, thank you :) Kind regards, Chris

Chris-RH commented 2 years ago

Please reopen if this is still a problem

sieutungbi commented 2 years ago

@Chris-RH I can confirm, the bug still happend in 2.5.7 ultra version, in my case it's does not fire StartedSeeking and FinishedSeeking, or maybe anything else, when i seek the video (streaming m3u8) on android, i only see event started, stalled, unstalled. in IOS it work fine.