You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
I think the issue is that after it has played, it is paused, rather than being stopped. So therefore it is unpaused rather than starting again. I believe that if you called stop() at the end of the video, when you play it again, it should fire started.
I tried adding a media player stop() call when the FinishedPlaying event occurs. If I click my UI play button after that (which calls media player play(), the Unpaused event occurs but the video remains at the end. If I call media player play() again after that, the video would begin playing from its beginning but the Started event does not occur. Instead, after adding more debug statements, I found that the StartedSeeking and FinishedSeeking events followed by an Unpaused event are what happens.
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
The text was updated successfully, but these errors were encountered: