Consume user activation when requesting PiP · w3c/picture-in-picture@16fd99e
beaufortfran
·
2026-02-23
·
via Recent Commits to picture-in-picture:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -197,9 +197,10 @@ the user agent MUST run the following steps:
|
197 | 197 | these steps. |
198 | 198 | 5. If |video|'s {{HTMLVideoElement/disablePictureInPicture}} is true, |
199 | 199 | the user agent MAY throw an {{InvalidStateError}} and abort these steps. |
200 | | -6. If {{pictureInPictureElement}} is `null` and the <a>relevant global object</a> |
201 | | - of <a>this</a> does not have <a>transient activation</a>, throw a |
202 | | -{{NotAllowedError}} and abort these steps. |
| 200 | +6. If {{pictureInPictureElement}} is `null`: |
| 201 | + 1. If <a>this</a>'s <a>relevant global object</a> does not have |
| 202 | +<a>transient activation</a>, throw a {{NotAllowedError}} and abort these steps. |
| 203 | + 2. [=Consume user activation=] given <a>this</a>'s <a>relevant global object</a>. |
203 | 204 | 7. If |video| is {{pictureInPictureElement}}, abort these steps. |
204 | 205 | 8. Set {{pictureInPictureElement}} to |video|. |
205 | 206 | 9. Let <dfn>Picture-in-Picture window</dfn> be a new instance of |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。