time display change, chapter length check fix
This commit is contained in:
parent
b0b9ab1e19
commit
180d47f04b
2 changed files with 8 additions and 3 deletions
|
@ -684,9 +684,14 @@ _V_.ChapterMenuItem = _V_.MenuItem.extend({
|
|||
function ticks_to_human(str) {
|
||||
|
||||
var in_seconds = (str / 10000000);
|
||||
var hours = '0'+Math.floor(in_seconds/3600);
|
||||
var hours = 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(":");
|
||||
var time = '';
|
||||
|
||||
if (hours > 0) time += hours+":";
|
||||
time += minutes.substr(-2) + ":" +seconds.substr(-2);
|
||||
|
||||
return time;
|
||||
};
|
|
@ -258,7 +258,7 @@ var videoJSextension = {
|
|||
_V_.merge( _V_.ControlBar.prototype.options.components, { ResolutionSelectorButton : {} } );
|
||||
|
||||
//chceck if chapters exist and add chapter selector
|
||||
if (item.Chapters.length > 0) {
|
||||
if (item.Chapters && item.Chapters.length) {
|
||||
// Put together the videojs source arrays for each available chapter
|
||||
$.each( item.Chapters, function( i, chapter ) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue