Bug 48140 - Cannot use embedded YouTube player fragment in Details view
Summary: Cannot use embedded YouTube player fragment in Details view
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-11-27 22:19 UTC by Sylvain Gravel
Modified: 2017-06-19 17:24 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Sylvain Gravel 2016-11-27 22:19:13 UTC
There is check on Android's official YouTube Player API that validates if the view is clear of overlays in order to comply with the ToS.

With a Master-Detail view, in split mode (tablet landscape), since the master view is forced to full width (Xamarin.Forms/Xamarin.Forms.Platform.Android/Renderers/MasterDetailRenderer.cs, line 212), it gives a "false positive".  The player therefore automatically stops, making it unusable.

The only solution I found to give an "embedded" video experience was to toggle the player to full screen when it's playing but it is not the experience I would have loved for landscape tablets.

For people encountering this limitation, set an instanceas the playback event handler (the custom renderer implements IYouTubePlayerPlaybackEventListener in my case) and toggle to full screen in the OnBuffering callback.  Then, in your Forms view, handle the back button appropriately to toggle out of full screen instead of going back in the page stack.
Comment 1 adrianknight89 2016-11-29 01:41:21 UTC
Can you provide a repro?
Comment 2 Sylvain Gravel 2016-11-29 02:10:58 UTC
I don't have time in the short term but I will try
Comment 3 Paul DiPietro [MSFT] 2017-03-06 23:02:13 UTC
Please reopen this with a minimized reproduction if you are still experiencing this issue. This is being set to no response merely for sake of upkeep as nothing appears to have been provided.
Comment 4 Sylvain Gravel 2017-03-07 01:48:49 UTC
Yes this issue is still there but I still haven't gotten to creating a repro project, sorry!
Comment 5 Chris Hardy [MSFT] 2017-06-19 17:24:37 UTC
Closing this issue until we get a way to reproduce the issue. When you have a small repro project or just the key APIs you're hitting that reproduces the problem just feel free to open this back up again and we can take a look! Thanks!