Unity version
6000.3.6f1
Unity editor platform
Windows
AVPro Video edition
Core
AVPro Video version
3.4.0
Device hardware
NVidia RTX 3090
Intel I9-13900K
Which Windows version are you using?
Windows 11
Graphics API
D3D 11
Video API
Media Foundation
Audio output
System Direct
Any other Media Player component configuration required to reproduce the issue.
No response
Which output component(s) are you using?
Apply to Material
Any other component configuration required to reproduce the issue.
No response
The issue
Order of actions :
The users request the Playback of a movie for the first time :
- MediaPlayer GameObject is Enabled from code.
- OnEnable :
- Set AutoStart to False
- OpenMedia with the following api : _mediaPlayer.OpenMedia(MediaPathType.AbsolutePathOrURL, video_path, false)
- Wait for 1st FrameReady event -> Start the playback.
- Once the playback is done, disable the MediaPlayer GameObject
Later, once the playback is done, the user request to playback the same movie again, with the same order of actions as before.
But this second time, the AutoStart get set to True (I can verify this from the Unity Inspector).
At no point and nowhere in my code I'm setting AutoStart to True.
The only fix I've found is to listen for the MetaDataReady Event and reset AutoStart to False there as it is the First event received where the AutoStart value is changed.
Note :
The AutoStart field doesn't get set to True immediately after the call to OpenMedia (a log after and before the OpenMedia method still display False for the AutoStart value).
It seems to happen just before the MetaDataReady Event.
Media information
No response
Log output
Unity version
6000.3.6f1
Unity editor platform
Windows
AVPro Video edition
Core
AVPro Video version
3.4.0
Device hardware
NVidia RTX 3090
Intel I9-13900K
Which Windows version are you using?
Windows 11
Graphics API
D3D 11
Video API
Media Foundation
Audio output
System Direct
Any other Media Player component configuration required to reproduce the issue.
No response
Which output component(s) are you using?
Apply to Material
Any other component configuration required to reproduce the issue.
No response
The issue
Order of actions :
The users request the Playback of a movie for the first time :
- MediaPlayer GameObject is Enabled from code.
- OnEnable :
- Set AutoStart to False
- OpenMedia with the following api :
_mediaPlayer.OpenMedia(MediaPathType.AbsolutePathOrURL, video_path, false)- Wait for 1st FrameReady event -> Start the playback.
- Once the playback is done, disable the MediaPlayer GameObject
Later, once the playback is done, the user request to playback the same movie again, with the same order of actions as before.
But this second time, the AutoStart get set to True (I can verify this from the Unity Inspector).
At no point and nowhere in my code I'm setting AutoStart to True.
The only fix I've found is to listen for the MetaDataReady Event and reset AutoStart to False there as it is the First event received where the AutoStart value is changed.
Note :
The AutoStart field doesn't get set to True immediately after the call to OpenMedia (a log after and before the OpenMedia method still display False for the AutoStart value).
It seems to happen just before the MetaDataReady Event.
Media information
No response
Log output