mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update unveils
This commit is contained in:
parent
8c2b65740f
commit
95a647e0df
63 changed files with 745 additions and 584 deletions
|
@ -1178,23 +1178,28 @@
|
|||
var index = self.currentPlaylistIndex(null);
|
||||
var length = self.playlist.length;
|
||||
var requiresNativeControls = !self.enableCustomVideoControls();
|
||||
var controls = $(requiresNativeControls ? '.videoAdvancedControls' : '.videoControls');
|
||||
|
||||
if (length < 2) {
|
||||
$('.videoTrackControl').hide();
|
||||
return;
|
||||
}
|
||||
|
||||
var controls = requiresNativeControls ? '.videoAdvancedControls' : '.videoControls';
|
||||
controls = document.getElementsByClassName(controls)[0];
|
||||
|
||||
var previousTrackButton = controls.getElementsByClassName('previousTrackButton')[0];
|
||||
var nextTrackButton = controls.getElementsByClassName('nextTrackButton')[0];
|
||||
|
||||
if (index === 0) {
|
||||
$('.previousTrackButton', controls).attr('disabled', 'disabled');
|
||||
previousTrackButton.setAttribute('disabled', 'disabled');
|
||||
} else {
|
||||
$('.previousTrackButton', controls).removeAttr('disabled');
|
||||
previousTrackButton.removeAttribute('disabled');
|
||||
}
|
||||
|
||||
if ((index + 1) >= length) {
|
||||
$('.nextTrackButton', controls).attr('disabled', 'disabled');
|
||||
nextTrackButton.setAttribute('disabled', 'disabled');
|
||||
} else {
|
||||
$('.nextTrackButton', controls).removeAttr('disabled');
|
||||
nextTrackButton.removeAttribute('disabled');
|
||||
}
|
||||
|
||||
$('.videoTrackControl', controls).show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue