Move hide/unhide player to util
This commit is contained in:
parent
51ea4ce594
commit
775a6752bb
2 changed files with 27 additions and 27 deletions
|
|
@ -793,29 +793,3 @@ function handleMediaUpdate(data) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function hidePlayer() {
|
||||
if(!PLAYER)
|
||||
return;
|
||||
|
||||
if(!/(chrome|MSIE)/ig.test(navigator.userAgent))
|
||||
return;
|
||||
|
||||
PLAYER.size = {
|
||||
width: $("#ytapiplayer").attr("width"),
|
||||
height: $("#ytapiplayer").attr("height")
|
||||
};
|
||||
$("#ytapiplayer").attr("width", 1)
|
||||
.attr("height", 1);
|
||||
}
|
||||
|
||||
function unhidePlayer() {
|
||||
if(!PLAYER)
|
||||
return;
|
||||
|
||||
if(!/(chrome|MSIE)/ig.test(navigator.userAgent))
|
||||
return;
|
||||
|
||||
$("#ytapiplayer").attr("width", PLAYER.size.width)
|
||||
.attr("height", PLAYER.size.height);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue