1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-02 06:32:07 +02:00

@misteroneill restore videojs.formatTime. closes #2420

This commit is contained in:
Pat O'Neill 2015-08-10 14:59:47 -04:00 committed by David LaPalomento
parent 8c6c7d6e27
commit a02e3609ab
2 changed files with 14 additions and 0 deletions

View File

@ -88,6 +88,7 @@ CHANGELOG
* @gkatsev always use emulated TextTrackLists so tracks survive tech switches ([view](https://github.com/videojs/video.js/pull/2425))
* @misteroneill restore Html5.Events ([view](https://github.com/videojs/video.js/pull/2421))
* @misteroneill removed the deprecated Component init method ([view](https://github.com/videojs/video.js/pull/2427))
* @misteroneill restore videojs.formatTime ([view](https://github.com/videojs/video.js/pull/2420))
--------------------

View File

@ -13,6 +13,7 @@ import * as Fn from './utils/fn.js';
import assign from 'object.assign';
import { createTimeRange } from './utils/time-ranges.js';
import formatTime from './utils/format-time.js';
import log from './utils/log.js';
import xhr from './xhr.js';
import * as Dom from './utils/dom.js';
@ -396,6 +397,18 @@ videojs.log = log;
*/
videojs.createTimeRange = createTimeRange;
/**
* Format seconds as a time string, H:MM:SS or M:SS
* Supplying a guide (in seconds) will force a number of leading zeros
* to cover the length of the guide
*
* @param {Number} seconds Number of seconds to be turned into a string
* @param {Number} guide Number (in seconds) to model the string after
* @return {String} Time formatted as H:MM:SS or M:SS
* @method formatTime
*/
videojs.formatTime = formatTime;
/**
* Simple http request for retrieving external files (e.g. text tracks)
*