Flyleaf icon indicating copy to clipboard operation
Flyleaf copied to clipboard

VideoView in ScrollViewer not properly rendering

Open rebelmx4 opened this issue 2 years ago • 21 comments

image

rebelmx4 avatar Jun 28 '22 07:06 rebelmx4

Hi @rebelmx4, this probably related / duplicate to #149

I will try later to reproduce it and just confirm it.

SuRGeoNix avatar Jun 28 '22 10:06 SuRGeoNix

i use flyleaf in wpf

rebelmx4 avatar Jun 29 '22 06:06 rebelmx4

Hi @rebelmx4, I tried to reproduce it. The problem was with the Front Window which is used for the player's front content and not the actual video. You might be able to handle this by changing the front window's visibility to false when it's partially or fully scrolled? Can you confirm that your issue is only with front window and not with the WinFormHost(video)?

image

Update: OK I see now the issue also with the video

SuRGeoNix avatar Jun 29 '22 13:06 SuRGeoNix

Found the related issue with WindowsFormHost here

I will try to implement this on the upcoming updates

SuRGeoNix avatar Jun 29 '22 13:06 SuRGeoNix

If you can test this from master and let me know if the fix works for you. Otherwise wait for the next nuget package update to test it.

SuRGeoNix avatar Jun 29 '22 15:06 SuRGeoNix

I already tesed code of master, it is OK!!!! it is the first time that i post iusse, I'm surprised you responded so quickly. thank you very much. but i meet another problem. Only part of picture can be present sometime. image

rebelmx4 avatar Jul 01 '22 03:07 rebelmx4

No problem @rebelmx4. Is this another issue or related with the scroll viewer? Do you see anything at Flyleaf's logs?

SuRGeoNix avatar Jul 01 '22 04:07 SuRGeoNix

how to see Flyleaf's logs? it probably is related width the scroll view. this view is used to preview video. when the mouse enter a thumb. i attach VideoView to grid which is parent of thumb. After i scroll this view, occasionally occur this case when the mouse enter a thumb.

rebelmx4 avatar Jul 01 '22 05:07 rebelmx4

Check the Engine.Start() from samples to see how you can enable logging. But yes probably that's related with the scroll viewer. If I cannot reproduce it I will not be able to fix it. You can use this if you know when it happens (on the player that mouse enter fires):-

Player.VideoView.WinFormsHost.ResetRegion();

Update: I might found the issue... I will try to fix it later on

SuRGeoNix avatar Jul 01 '22 05:07 SuRGeoNix

Hey @rebelmx4, can you post your xaml or can you tell me what do you do exactly when you preview the video, does the VideoView still have the scroll viewer as a parent?

SuRGeoNix avatar Jul 01 '22 09:07 SuRGeoNix

thumb.zip

thumb is used here image

I only create VideoView. When the mouse enter a thumb, i deattach VideoView from its parent and attach it to current thumb. code is here ( OnMouseEnter and OnMouseLeave Thumb class ) image

rebelmx4 avatar Jul 01 '22 09:07 rebelmx4

Can you check with the latest commit?

It seems that the issue happens when you do this:

playerContainer.Children.Add(_previewPlayer);

Does this happen every time or sometimes? If the latest commit does not fix it can you confirm that this one fixes it? (add below the above line)

_previewPlayer.WinFormsHost.ResetRegion();

SuRGeoNix avatar Jul 01 '22 09:07 SuRGeoNix

the lastest commit does not have a partial rendering problem, but it have "cross viewport " problem. GIF

rebelmx4 avatar Jul 01 '22 10:07 rebelmx4

This is happening because your preview player is outside from the scroll viewer (hmmm... or its not? I will review this). Not sure how to fix this...

SuRGeoNix avatar Jul 01 '22 10:07 SuRGeoNix

OK that was my mistake, forgot an additional update, hopefully now it's fixed!

SuRGeoNix avatar Jul 01 '22 10:07 SuRGeoNix

And one more tip. You can use the new GetBitmap2 from renderer to save the last frame as thumb (you can now specify also the size- height) and present it like 'continue watching'. Check also the Player.GetSession so you can continue playing from where the player stopped with the same streams. Do this before you open a new input or when you stop the player.

SuRGeoNix avatar Jul 01 '22 10:07 SuRGeoNix

Great,It is function which i want。 Thank you for your respond. I will test it on the next monday. I'm sorry。

来自 MEIZU 18 Pro

-------- 原始邮件 -------- 发件人:John Stamatakis @.> 时间:2022年7月1日 18:41 收件人:SuRGeoNix/Flyleaf @.> 抄送:rebelmx4 @.>,Mention @.> 主题:Re: [SuRGeoNix/Flyleaf] if videoView in scrollView,videoView cross view Port (Issue #170)

And one more tip. You can use the new GetBitmap2 from renderer to save the last frame as thumb (you can now specify also the size- height) and present it like 'continue watching'. Check also the Player.GetCurrentSession so you can continue playing from where the player stopped with the same streams.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/SuRGeoNix/Flyleaf/issues/170#issuecomment-1172207398", "url": "https://github.com/SuRGeoNix/Flyleaf/issues/170#issuecomment-1172207398", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

rebelmx4 avatar Jul 01 '22 11:07 rebelmx4

No worries. Feel free to re-open an issue even just to ask for help ;) Happy weekend

SuRGeoNix avatar Jul 01 '22 11:07 SuRGeoNix

The above two issues have been fixed. thank you!! yet there is a small issue. when the mouse enter, for a moment there is a twinkle. GIF

In addition, i cant reopen the issue. image

rebelmx4 avatar Jul 04 '22 02:07 rebelmx4

No worries. I will re-open it. I will try to review also this one until the next update.

SuRGeoNix avatar Jul 04 '22 06:07 SuRGeoNix

I was not able to reproduce with a quick try. Is it possible that the overflow content are the image and not the player? Can you try by hiding the image?

SuRGeoNix avatar Jul 09 '22 11:07 SuRGeoNix

I'm closing this as the VideoView changed completely with the new FlyleafHost implementation. Give me some feedback when possible.

SuRGeoNix avatar Nov 03 '22 18:11 SuRGeoNix