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

Support reinitializing media player when media options change

Open delphinius81 opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. We have found that HEVC (h265) videos do not play well on Windows without the low latency mode disabled. However, our video playback needs to support playing videos that could have different encodings on the same player. We make this distinction at runtime based on what video is being loaded just in time. Currently, MediaPlayer is initialized once, the first time a video is loaded. If we then try to play a video that requires different options, the player is not reinitialised, resulting in playback trouble.

Describe the solution you'd like

  1. API to reinitialize the MediaPlayer if requested by the user
  2. Auto-detect if playback options have changed since the last media was opened, and reinitialize the MediaPlayer when OpenMedia is called.

Describe alternatives you've considered Currently, we have addressed this issue by changing the access level of the Initialise method in MediaPlayer to public, which we then call prior to OpenMedia from our code. However, since we are changing the API itself, this gets overridden each time we update the package.

Additional context Add any other context or screenshots about the feature request here.

delphinius81 avatar Jul 06 '22 15:07 delphinius81