mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update osd
This commit is contained in:
parent
7c5dabe06d
commit
7d8f6339a2
3 changed files with 170 additions and 86 deletions
|
@ -1,12 +1,23 @@
|
|||
define(['dom', 'fullscreenManager'], function (dom, fullscreenManager) {
|
||||
'use strict';
|
||||
|
||||
dom.addEventListener(window, 'dblclick', function () {
|
||||
function isTargetValid(target) {
|
||||
|
||||
if (fullscreenManager.isFullScreen()) {
|
||||
fullscreenManager.exitFullscreen();
|
||||
} else {
|
||||
fullscreenManager.requestFullscreen();
|
||||
if (dom.parentWithTag(target, ['BUTTON', 'INPUT', 'TEXTAREA'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
dom.addEventListener(window, 'dblclick', function (e) {
|
||||
|
||||
if (isTargetValid(e.target)) {
|
||||
if (fullscreenManager.isFullScreen()) {
|
||||
fullscreenManager.exitFullscreen();
|
||||
} else {
|
||||
fullscreenManager.requestFullscreen();
|
||||
}
|
||||
}
|
||||
|
||||
}, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue