<script>
var
videoALL = document.getElementById(
'videoALL'
),
videobox = document.getElementById(
'videobox'
),
btn = document.getElementById(
'btn'
),
videoend = document.getElementById(
'videoend'
);
var
clientWidth = document.documentElement.clientWidth;
var
clientHeight = document.documentElement.clientHeight;
videoALL.style.width = clientWidth +
'px'
;
videoALL.style.height =
'auto'
;
document.addEventListener(
'touchmove'
,
function
(e){e.preventDefault()}, false);
function
stylep(pId){
pId.style.width = clientWidth +
'px'
;
pId.style.height = clientHeight +200+
'px'
;
}
stylep(videobox);
stylep(videoend);
var
u = navigator.userAgent;
var
isAndroid = u.indexOf(
'Android'
) > -1 || u.indexOf(
'Adr'
) > -1;
var
isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
function
playcontr(){
if
(isAndroid) {
videoALL.style.width = window.screen.width +
'px'
;
videoALL.style.height = window.screen.height +
'px'
;
}
videobox.style.display =
"block"
;
videoALL.play();
btn.style.display =
"none"
;
videoend.style.display =
"none"
;
};
videoALL.addEventListener(
'pause'
,
function
(){
videoALL.style.width = clientWidth +
'px'
;
btn.style.display =
"block"
;
})
videoALL.addEventListener(
"ended"
,
function
(){
videoALL.pause();
videobox.style.display =
"none"
;
videoend.style.display =
"block"
;
});
</script>