mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Video player "menu" button added
Toggles display of all appropriate video controls for video player sizes < 100%
This commit is contained in:
parent
a61b36b74c
commit
8216e6d956
5 changed files with 99 additions and 16 deletions
|
@ -22,6 +22,7 @@
|
|||
var fullscreenExited = false;
|
||||
var idleState = true;
|
||||
var remoteFullscreen = false;
|
||||
var videoMenuVisible = false;
|
||||
|
||||
self.initVideoPlayer = function () {
|
||||
video = playVideo(item, mediaSource, startPosition, user);
|
||||
|
@ -139,6 +140,21 @@
|
|||
}
|
||||
};
|
||||
|
||||
self.toggleVideoPlayerMenu = function () {
|
||||
|
||||
var mediaPlayer = $("#mediaPlayer");
|
||||
|
||||
if (videoMenuVisible) {
|
||||
$(mediaPlayer).removeClass("showVideoMenu");
|
||||
} else {
|
||||
$(mediaPlayer).addClass("showVideoMenu");
|
||||
}
|
||||
|
||||
videoMenuVisible = !videoMenuVisible;
|
||||
|
||||
console.log("show vid click");
|
||||
};
|
||||
|
||||
$(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange', function (e) {
|
||||
|
||||
var videoControls = $('#videoControls');
|
||||
|
@ -831,9 +847,9 @@
|
|||
if (mediaStreams.filter(function (i) {
|
||||
return i.Type == "Subtitle";
|
||||
}).length) {
|
||||
$('#video-subtitleButton', videoControls).show();
|
||||
$('#video-subtitleButton', videoControls).show().prop("disabled", false);
|
||||
} else {
|
||||
$('#video-subtitleButton', videoControls).hide();
|
||||
$('#video-subtitleButton', videoControls).hide().prop("disabled", true);;
|
||||
}
|
||||
|
||||
if (item.Chapters && item.Chapters.length) {
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
self.updateVolumeButtons = function (vol) {
|
||||
|
||||
if (vol) {
|
||||
self.muteButton.show();
|
||||
self.unmuteButton.hide();
|
||||
self.muteButton.show().prop("disabled", false);
|
||||
self.unmuteButton.hide().prop("disabled", true);
|
||||
} else {
|
||||
self.muteButton.hide();
|
||||
self.unmuteButton.show();
|
||||
self.muteButton.hide().prop("disabled", true);
|
||||
self.unmuteButton.show().prop("disabled", false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1367,6 +1367,8 @@ $(function () {
|
|||
|
||||
videoPlayerHtml += '<button onclick="MediaPlayer.showSendMediaMenu();" id="video-sendMediaButton" class="mediaButton sendMediaButton" title="Remote" type="button" data-icon="wireless" data-iconpos="notext" data-inline="true">Remote</button>';
|
||||
|
||||
videoPlayerHtml += '<button onclick="MediaPlayer.toggleVideoPlayerMenu();" id="video-videoPlayerMenuButton" class="mediaButton videoPlayerMenuButton" title="Menu" type="button" data-icon="bars" data-iconpos="notext" data-inline="true">Menu</button>';
|
||||
|
||||
videoPlayerHtml += '</div>'; // videoControls
|
||||
|
||||
videoPlayerHtml += '</div>'; // videoPlayer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue