init
This commit is contained in:
27
twitchvideo/video.php
Executable file
27
twitchvideo/video.php
Executable file
@@ -0,0 +1,27 @@
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
|
||||
<iframe id="videobox" width="560" height="315" src="" frameborder="0" allow="autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
function loop(){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "url.txt",
|
||||
cache: false,
|
||||
async: true,
|
||||
success: function(data){
|
||||
if(data+"?autoplay=1"!=$('#videobox').attr('src')){
|
||||
$("#videobox").attr("src",data+"?autoplay=1");
|
||||
$('#videobox').attr('src', $('#videobox').attr('src'));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
window.onload = setInterval(loop,2000);
|
||||
</script>
|
||||
</body>
|
||||
Reference in New Issue
Block a user