1 2 3 4 5 6 7 8 9 10 11 12
<!DOCTYPE html> <meta charset="utf-8"> <title>Activation delegation test</title> <video id=video src="../bear.webm"></video> <iframe id=frame allow="autoplay *"></iframe> <script> function attemptPlay() { return document.getElementById('video').play() .then(() => true) .catch(() => false); } </script>