//全屏打开声音
$(window).on('resize',function(e){
var explorer = window.navigator.userAgent.toLowerCase();
if(explorer.indexOf('chrome')>0){//webkit
if ($('#video').height() === window.screen.height && $('#video').width() === window.screen.width) {
$('#video')[0].muted=false;
} else {
$('#video')[0].muted=true;
}
}else{//IE 9+ fireFox
console.log(window.outerHeight)
if (window.outerHeight === window.screen.height && window.outerWidth === window.screen.width) {
$('#video')[0].muted=false;
} else {
$('#video')[0].muted=true;
}
}
console.log($('#video').width(),window.screen.width,document.body.scrollWidth)
console.log($('#video').height(),window.screen.height,document.body.scrollHeight)
if ($('#video').height() === window.screen.height && $('#video').width() === window.screen.width) {
$('#video')[0].muted=false;
}
else{
$('#video')[0].muted=true;
}
})
//默认关掉声音
$('#video')[0].muted=true;