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().

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1478208

Spec: being developed here https://github.com/whatwg/html/issues/3617

Platform coverage: All

Target release: The same release as block autoplay, so 63, or soon after.

Preference: None

Support in other engines: There is consensus in the WhatWG github issue, but no 
explicit commitments from other implementors yet. We decided we should push 
ahead with this for Firefox because of our strategy of prompting the user for 
permission makes this feature particularly useful for us, as this feature 
provides a way for sites to avoid the prompt if desired.

Secure Context: No. HTMLMediaElement is already shipping elsewhere outside a 
secure context.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to