On Tuesday, July 31, 2018 at 9:05:03 AM UTC+12, Jan-Ivar Bruaroey wrote:
> On 7/29/18 10:39 PM, Chris Pearce wrote:
> > Summary: HTMLMediaElement.allowedToPlay allows web authors to determine in 
> > advance of calling HTMLMediaElement.play() whether the HTMLMediaElement in 
> > its current state would be allowed to play, or would be blocked by the 
> > browser's autoplay blocking policies.
> > 
> > This is useful to web authors as if they can't autoplay they may prefer to 
> > download a poster image instead of paying the price of downloading media 
> > data.
> > 
> > This feature is particularly useful for Firefox, as web authors can poll 
> > HTMLMediaElement.allowedToPlay to determine whether a permission prompt 
> > would show if they were to call play().
> 
> Doesn't this amputate the user flow we just implemented?
> 
> Without this attribute, Netflix queues up rich media, Firefox asks the 
> user if they want autoplay, who answers "Duh, it's Netflix", and levels 
> up to auto-playing Netflix forever.
> 
> With this attribute, Netflix sees HTMLMediaElement.allowedToPlay == 
> false, and downloads a poster image instead. User must click to get 
> engaging media, which now takes longer to load, and they never level up 
> to auto-playing Netflix?
> 
> Doesn't seem like an improvement. Am I missing something?
> 


Without this attribute, sites that are determined to avoid showing the 
doorhanger have no option other than to never autoplay ever in Firefox. With 
this attribute, they can detect when they can "safely" start to autoplay video 
if the user otherwise unblocks autoplay.

To continue your example of Netflix, if the user clicked somewhere, say to 
select their Netflix profile, or click to login or a browse a category or 
side-scroll their catalog, then they'd gesture activate the document and the 
site would be able to autoplay, without a doorhanger.

I think you're basically correct that sites that actively use allowedToPlay to 
avoid the doorhanger would also avoid being whitelisted.

I think the only thing that you're missing is how vehemently some sites are in 
their desire to avoid the doorhanger prompt.

cpearce.

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to