﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <title></title>
    <script>
        var theIntervalCount = 0;
        var interval = setInterval(function videoTagFinder() {
            console.log("检查video");
            var videoTags = window.parent.document.querySelectorAll("video");
            if (videoTags.length > 0 || theIntervalCount > 10) {
                clearInterval(interval);
            } else {
                theIntervalCount++;
            }
            for (var index = 0; index < videoTags.length; index++) {
                videoTags[index].pause();
                videoTags[index].addEventListener("play", onVideoPlayEvent, true);
                console.log("检查video_" + videoTags[index].src);
            }
        
            function onVideoPlayEvent(e) {
                this.pause();
                e.stopPropagation();
            }
        }, 300);
    </script>
</head>
<body>
</body>
</html>