UnityPlugin-AVProVideo icon indicating copy to clipboard operation
UnityPlugin-AVProVideo copied to clipboard

[Windows] Started event does not trigger when playing a video again after playback had finished playing a first time

Open knmcn619 opened this issue 7 months ago • 3 comments

Unity version

2022.53f1

Unity editor platform

Windows

AVPro Video edition

Core

AVPro Video version

2.9.3

Device hardware

11th Gen Intel Core i9 3.5GHz, 32GB RAM, NVIDIA GeForce RTX 3070

Which Windows version are you using?

Windows 10 Home (Version 10.0.19045 Build 19045)

Graphics API

D3D 11

Video API

Media Foundation

Audio output

System Direct

Any other Media Player component configuration required to reproduce the issue.

Media is set by reference to its location in the streaming assets folder. It is set to auto load, but not to auto play. Is is set to not loop.

Which output component(s) are you using?

Display uGUI

Any other component configuration required to reproduce the issue.

I have a script that is registering to the AVPro OnMediaPlayerEvent. I have a UI Button, that said script also has reference to, used to play and pause the video.

The issue

The first time a video is played after loading it triggers the "Started" media event, as would be expected. The video plays through its entirety and then fires off the "FinishedPlaying" event, again as would be expected. When the video is played again (currently using mediaPlayer.Play()) the "Started" event doesn't fire/get triggered but the video does in fact play.

Per the documentation, the "Started" event is triggered when playback starts. Is it not suppose to trigger every time the video playback starts? It seems like the started event should trigger every time, especially since the finished playing event fires again when the video plays to the end. And again, I'm not using looping video. Replay is triggered by clicking a button.

Both in my test environment, which I'll share via the email address, and in other projects I'm working on, I have actions I want to trigger every time a video is played or replayed.

Media information

I was testing with the AVPro Sample video: RenderHeads-1080p30-H264.

Log output


knmcn619 avatar Apr 22 '25 18:04 knmcn619