uno icon indicating copy to clipboard operation
uno copied to clipboard

fix(mpe): show player when transport controls are disabled

Open ramezgerges opened this issue 1 year ago • 8 comments

GitHub Issue (If applicable): #14735

PR Type

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

ramezgerges avatar Jan 23 '24 23:01 ramezgerges

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15196/index.html

unodevops avatar Jan 24 '24 02:01 unodevops

When_MediaPlayerElement_SetIsFullWindow_Check_Fullscreen seems to be failing in CI only, but the remaining tests are finally passing.

ramezgerges avatar Jan 25 '24 09:01 ramezgerges

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15196/index.html

unodevops avatar Jan 25 '24 09:01 unodevops

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15196/index.html

unodevops avatar Jan 25 '24 10:01 unodevops

It seems that the first test among the newly enabled tests always fails. Initially, CI was failing because of When_MediaPlayerElement_SetIsFullWindow_Check_Fullscreen. I disabled it and now When_MediaPlayerElement_SetSource_Check_Play is not passing (it was passing in CI when When_MediaPlayerElement_SetIsFullWindow_Check_Fullscreen was enabled). I suspect it may have to do with caching the sample video file after the first test, so the later tests are done before the timeout hits (although that would be weird as well since I've increased the timeouts to be 20secs instead of 8, it's just a 5mb file). I will test with a different host of the same video.

ramezgerges avatar Feb 01 '24 12:02 ramezgerges

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15196/index.html

unodevops avatar Feb 01 '24 21:02 unodevops

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15196/index.html

unodevops avatar Feb 02 '24 00:02 unodevops

I came back to this PR today and I think the fix is only partially correct. We should not be proceeding until SarDem/SarNum are filled in (i.e. are not zero). However, for the tests to pass (and to match WinUI):

  1. The video needs to load regardless of whether or not it's autoplayed. On WinUI, the video will load and fill the space (showing the first frame) even if AutoPlay is false (and the video is not played).
  2. In LibVLC, this is very problematic to implement. There is no method to " just load the first frame". We will need some trickery to start playing the video, but then immediately pause and go back to the first frame.
  3. Since most of VLC's methods don't take effect immediately (not async, they just return immediately but the effect happens later), and since VLC isn't in sync with our UI thread, actually implementing this proved to be very difficult. Every attempt I tried resulted in a race condition one way or the other.

So, we can either proceed with the PR in its current state (fill the space of the video with black and don't load anything until we actual start playing) or we can wait for a way to implement the more correct behaviour.

ramezgerges avatar Feb 19 '24 16:02 ramezgerges