mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
video player chapter button and flyout fixes, added time to chapter title in flyout
This commit is contained in:
parent
a701c6615b
commit
f250bd54b1
3 changed files with 33 additions and 1 deletions
|
@ -837,6 +837,20 @@ progress {
|
|||
background: none !important;
|
||||
}
|
||||
|
||||
.vjs-chapter-button div {
|
||||
background-position: -100px -75px !important;
|
||||
}
|
||||
.vjs-chapter-button.vjs-menu-button ul {
|
||||
width: auto;
|
||||
max-width: 25em;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.vjs-chapter-button.vjs-menu-button ul li {
|
||||
width: auto;
|
||||
white-space: nowrap;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
@media all and (min-width: 650px) {
|
||||
|
||||
.itemVideo {
|
||||
|
|
|
@ -680,3 +680,13 @@ _V_.ChapterMenuItem = _V_.MenuItem.extend({
|
|||
}
|
||||
});
|
||||
|
||||
//convert Ticks to human hr:min:sec format
|
||||
function ticks_to_human(str) {
|
||||
|
||||
var in_seconds = (str / 10000000);
|
||||
var hours = '0'+Math.floor(in_seconds/3600);
|
||||
var minutes = '0'+Math.floor((in_seconds-(hours*3600))/60);
|
||||
var seconds = '0'+Math.round(in_seconds-(hours*3600)-(minutes*60));
|
||||
|
||||
return [hours.substr(-2),minutes.substr(-2),seconds.substr(-2)].join(":");
|
||||
};
|
|
@ -169,6 +169,14 @@
|
|||
|
||||
videoJSextension.setup_video( $( '#videoWindow' ), item );
|
||||
|
||||
(this).addEvent("loadstart",function(){
|
||||
$(".vjs-remaining-time-display").hide();
|
||||
});
|
||||
|
||||
(this).addEvent("durationchange",function(){
|
||||
if ((this).duration() != "Infinity")
|
||||
$(".vjs-remaining-time-display").show();
|
||||
});
|
||||
});
|
||||
|
||||
return $('video', nowPlayingBar)[0];
|
||||
|
@ -243,7 +251,7 @@ var videoJSextension = {
|
|||
vjs_chapters[i] = [];
|
||||
|
||||
vjs_chapter = {};
|
||||
vjs_chapter.Name = chapter.Name;
|
||||
vjs_chapter.Name = chapter.Name + " (" + ticks_to_human(chapter.StartPositionTicks) + ")";
|
||||
vjs_chapter.StartPositionTicks = chapter.StartPositionTicks;
|
||||
vjs_chapter.vid_id = vid_id;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue