随机小姐姐视频

网络代码!手机端浏览器有BUG,QQ,微信和电脑能正常观看

代码展示:

HTML:

<body>
    <section id="main">
	<video id="player" src="video.php?lx=video" controls autoplay webkit-playsinline playsinline></video>	
    </section>
    <section id="buttons">
        <button id="switch">连续: 开</button>
        <button id="next">播放下一个</button>
    </section>
   	 
</body>

CSS:

#main {
    display: flex;
    justify-content: center;
    align-items: center;
}

#player {
    width: 100%;
    height: auto;
    max-height: 100%;
}

#buttons {
display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    height: 60px;
    padding: 10px;
}
#switch,
#next,
#qh {
    background: #FFC0CB;
    color: #000000;
    font-size: 16px;
    font-weight: bold;
    height: 40px;
    padding: 0px 20px;
    margin: 0px 5px;
    border-radius: 20px;
}

JavaScript:

(function (window, document) {
        if (top != self) {
            window.top.location.replace(self.location.href);
        }
        var get = function (id) {
            return document.getElementById(id);
        }
        var bind = function (element, event, callback) {
            return element.addEventListener(event, callback);
        }
        var auto = true;
		var type = true;
        var player = get('player');
        var randomm = function () {
            player.src = 'video.php?lx=video';
            player.play();
        }
        bind(get('next'), 'click', randomm);
        bind(player, 'error', function () {
            randomm();
        });
        bind(get('switch'), 'click', function () {
            auto = !auto;
            this.innerText = '连续: ' + (auto ? '开' : '关');
        });	
        bind(player, 'ended', function () {
            if (auto) randomm();
        });
    })(window, document);

PHP:

<?php
if($_GET['lx']=="video"){
$content = file_get_contents("http://api.xiao-xin.top/API/kuaishou.php?type=json");
$json = json_decode($content,true);
header("Location: {$json['video_url']}");}
   if($_GET['lx']!="video"){
   $content = file_get_contents("http://api.xiao-xin.top/API/kuaishou_png.php?type=json");
$json = json_decode($content,true);
header("Location: {$json['png_url']}");}
© 版权声明
THE END
喜欢就支持一下吧
点赞491赞赏 分享
评论 共6条

请登录后发表评论