mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'dev' of https://github.com/MediaBrowser/MediaBrowser into dev
This commit is contained in:
commit
d82b5e81ed
4 changed files with 59 additions and 16 deletions
|
@ -162,6 +162,10 @@
|
|||
.videoControls .nowPlayingText {
|
||||
max-width: 160px;
|
||||
}
|
||||
|
||||
#mediaPlayer .nowPlayingImage {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 960px), all and (max-height: 550px) {
|
||||
|
@ -184,8 +188,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 500px) {
|
||||
#mediaPlayer .previousTrackButton, #mediaPlayer .nextTrackButton {
|
||||
@media all and (max-width: 555px) {
|
||||
#mediaPlayer .videoControls .previousTrackButton, #mediaPlayer .videoControls .nextTrackButton {
|
||||
display: none!important;
|
||||
}
|
||||
.videoTopControlsLogo {
|
||||
|
@ -199,7 +203,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 1200px) {
|
||||
@media all and (min-width: 1300px) {
|
||||
#videoPlayer .nowPlayingInfo img {
|
||||
height: auto !important;
|
||||
max-width: 150px;
|
||||
|
|
|
@ -1166,8 +1166,7 @@
|
|||
//show stop button
|
||||
$('#video-playButton', videoControls).hide();
|
||||
$('#video-pauseButton', videoControls).show();
|
||||
$('#video-previousTrackButton', videoControls).hide();
|
||||
$('#video-nextTrackButton', videoControls).hide();
|
||||
$('.videoTrackControl').hide();
|
||||
|
||||
var videoElement = $('#videoElement', mediaPlayerContainer).prepend(html);
|
||||
|
||||
|
@ -1329,6 +1328,32 @@
|
|||
|
||||
return video[0];
|
||||
};
|
||||
|
||||
self.updatePlaylistUi = function () {
|
||||
var index = self.currentPlaylistIndex(null),
|
||||
length = self.playlist.length,
|
||||
requiresNativeControls = !self.canAutoPlayVideo(),
|
||||
controls = $(requiresNativeControls ? '.videoAdvancedControls' : '.videoControls');
|
||||
|
||||
if (length < 2) {
|
||||
$('.videoTrackControl').hide();
|
||||
return;
|
||||
}
|
||||
|
||||
if (index === 0) {
|
||||
$('.previousTrackButton', controls).attr('disabled', 'disabled');
|
||||
} else {
|
||||
$('.previousTrackButton', controls).removeAttr('disabled');
|
||||
}
|
||||
|
||||
if ((index + 1) >= length) {
|
||||
$('.nextTrackButton', controls).attr('disabled', 'disabled');
|
||||
} else {
|
||||
$('.nextTrackButton', controls).removeAttr('disabled');
|
||||
}
|
||||
|
||||
$('.videoTrackControl', controls).show();
|
||||
};
|
||||
}
|
||||
|
||||
createVideoPlayer(MediaPlayer);
|
||||
|
|
|
@ -507,8 +507,7 @@
|
|||
if (options.startPositionTicks || firstItem.MediaType !== 'Video' || !self.canAutoPlayVideo()) {
|
||||
|
||||
self.playInternal(firstItem, options.startPositionTicks, function () {
|
||||
self.playlist = items;
|
||||
currentPlaylistIndex = 0;
|
||||
self.setPlaylistState(0, items);
|
||||
});
|
||||
|
||||
return;
|
||||
|
@ -518,8 +517,7 @@
|
|||
|
||||
items = intros.Items.concat(items);
|
||||
self.playInternal(items[0], options.startPositionTicks, function () {
|
||||
self.playlist = items;
|
||||
currentPlaylistIndex = 0;
|
||||
self.setPlaylistState(0, items);
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -721,10 +719,23 @@
|
|||
var newItem = self.playlist[i];
|
||||
|
||||
self.playInternal(newItem, 0, function () {
|
||||
currentPlaylistIndex = i;
|
||||
self.setPlaylistState(i);
|
||||
});
|
||||
};
|
||||
|
||||
// Set currentPlaylistIndex and playlist. Using a method allows for overloading in derived player implementations
|
||||
self.setPlaylistState = function (i, items) {
|
||||
if (!isNaN(i)) {
|
||||
currentPlaylistIndex = i;
|
||||
}
|
||||
if (items) {
|
||||
self.playlist = items;
|
||||
}
|
||||
if (self.updatePlaylistUi) {
|
||||
self.updatePlaylistUi();
|
||||
}
|
||||
};
|
||||
|
||||
self.nextTrack = function () {
|
||||
|
||||
var newIndex = currentPlaylistIndex + 1;
|
||||
|
@ -735,7 +746,7 @@
|
|||
console.log('playing next track');
|
||||
|
||||
self.playInternal(newItem, 0, function () {
|
||||
currentPlaylistIndex = newIndex;
|
||||
self.setPlaylistState(newIndex);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -747,7 +758,7 @@
|
|||
|
||||
if (newItem) {
|
||||
self.playInternal(newItem, 0, function () {
|
||||
currentPlaylistIndex = newIndex;
|
||||
self.setPlaylistState(newIndex);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1399,10 +1399,13 @@ $(function () {
|
|||
videoPlayerHtml += '<div class="videoTopControlsLogo"></div>';
|
||||
videoPlayerHtml += '<div class="videoAdvancedControls">';
|
||||
|
||||
videoPlayerHtml += '<button class="imageButton mediaButton videoAudioButton" title="Audio tracks" type="button" data-icon="audiocd" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonAudioTracks') + '</button>';
|
||||
videoPlayerHtml += '<button class="mediaButton videoTrackControl previousTrackButton" title="Previous video" type="button" onclick="MediaPlayer.previousTrack();" data-icon="previous-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPreviousTrack') + '</button>';
|
||||
videoPlayerHtml += '<button class="mediaButton videoTrackControl nextTrackButton" title="Next video" type="button" onclick="MediaPlayer.nextTrack();" data-icon="next-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonNextTrack') + '</button>';
|
||||
|
||||
videoPlayerHtml += '<button class="mediaButton videoAudioButton" title="Audio tracks" type="button" data-icon="audiocd" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonAudioTracks') + '</button>';
|
||||
videoPlayerHtml += '<div data-role="popup" class="videoAudioPopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
|
||||
|
||||
videoPlayerHtml += '<button class="imageButton mediaButton videoSubtitleButton" title="Subtitles" type="button" data-icon="subtitles" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonFullscreen') + '</button>';
|
||||
videoPlayerHtml += '<button class="mediaButton videoSubtitleButton" title="Subtitles" type="button" data-icon="subtitles" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonFullscreen') + '</button>';
|
||||
videoPlayerHtml += '<div data-role="popup" class="videoSubtitlePopup videoPlayerPopup" data-history="false" data-theme="b"></div>';
|
||||
|
||||
videoPlayerHtml += '<button class="mediaButton videoChaptersButton" title="Scenes" type="button" data-icon="video" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonScenes') + '</button>';
|
||||
|
@ -1419,10 +1422,10 @@ $(function () {
|
|||
// Create controls
|
||||
videoPlayerHtml += '<div class="videoControls hiddenOnIdle">';
|
||||
|
||||
videoPlayerHtml += '<button id="video-previousTrackButton" class="mediaButton previousTrackButton" title="Previous Track" type="button" onclick="MediaPlayer.previousTrack();" data-icon="previous-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPreviousTrack') + '</button>';
|
||||
videoPlayerHtml += '<button id="video-previousTrackButton" class="mediaButton previousTrackButton videoTrackControl" title="Previous Track" type="button" onclick="MediaPlayer.previousTrack();" data-icon="previous-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPreviousTrack') + '</button>';
|
||||
videoPlayerHtml += '<button id="video-playButton" class="mediaButton" title="Play" type="button" onclick="MediaPlayer.unpause();" data-icon="play" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPlay') + '</button>';
|
||||
videoPlayerHtml += '<button id="video-pauseButton" class="mediaButton" title="Pause" type="button" onclick="MediaPlayer.pause();" data-icon="pause" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonPause') + '</button>';
|
||||
videoPlayerHtml += '<button id="video-nextTrackButton" class="mediaButton nextTrackButton" title="Next Track" type="button" onclick="MediaPlayer.nextTrack();" data-icon="next-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonNextTrack') + '</button>';
|
||||
videoPlayerHtml += '<button id="video-nextTrackButton" class="mediaButton nextTrackButton videoTrackControl" title="Next Track" type="button" onclick="MediaPlayer.nextTrack();" data-icon="next-track" data-iconpos="notext" data-inline="true">' + Globalize.translate('ButtonNextTrack') + '</button>';
|
||||
|
||||
videoPlayerHtml += '<div class="positionSliderContainer sliderContainer">';
|
||||
videoPlayerHtml += '<input type="range" class="mediaSlider positionSlider slider" step=".001" min="0" max="100" value="0" style="display:none;" data-mini="true" data-theme="a" data-highlight="true" />';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue