diff --git a/src/controller/audio-stream-controller.js b/src/controller/audio-stream-controller.js index 430460b724d..6644a695e5b 100644 --- a/src/controller/audio-stream-controller.js +++ b/src/controller/audio-stream-controller.js @@ -7,7 +7,7 @@ import BufferHelper from '../helper/buffer-helper'; import Demuxer from '../demux/demuxer'; import Event from '../events'; import * as LevelHelper from '../helper/level-helper'; -import TimeRanges from '../utils/timeRanges'; +import TimeRanges from '../utils/time-ranges'; import {ErrorTypes, ErrorDetails} from '../errors'; import {logger} from '../utils/logger'; import { findFragWithCC } from '../utils/discontinuities'; diff --git a/src/controller/stream-controller.js b/src/controller/stream-controller.js index cfcce120f53..7f5fda1cad0 100644 --- a/src/controller/stream-controller.js +++ b/src/controller/stream-controller.js @@ -9,7 +9,7 @@ import Event from '../events'; import {FragmentState} from '../helper/fragment-tracker'; import Fragment from '../loader/fragment'; import * as LevelHelper from '../helper/level-helper'; -import TimeRanges from '../utils/timeRanges'; +import TimeRanges from '../utils/time-ranges'; import {ErrorTypes, ErrorDetails} from '../errors'; import {logger} from '../utils/logger'; import { alignDiscontinuities } from '../utils/discontinuities'; @@ -639,13 +639,13 @@ class StreamController extends TaskLoop { this.flushMainBuffer(0,Number.POSITIVE_INFINITY); } - /* - on immediate level switch end, after new fragment has been buffered : - - nudge video decoder by slightly adjusting video currentTime (if currentTime buffered) - - resume the playback if needed - */ + /** + * on immediate level switch end, after new fragment has been buffered: + * - nudge video decoder by slightly adjusting video currentTime (if currentTime buffered) + * - resume the playback if needed + */ immediateLevelSwitchEnd() { - let media = this.media; + const media = this.media; if (media && media.buffered.length) { this.immediateSwitch = false; if(BufferHelper.isBuffered(media,media.currentTime)) { @@ -658,13 +658,14 @@ class StreamController extends TaskLoop { } } + /** + * try to switch ASAP without breaking video playback: + * in order to ensure smooth but quick level switching, + * we need to find the next flushable buffer range + * we should take into account new segment fetch time + */ nextLevelSwitch() { - /* try to switch ASAP without breaking video playback : - in order to ensure smooth but quick level switching, - we need to find the next flushable buffer range - we should take into account new segment fetch time - */ - let media = this.media; + const media = this.media; // ensure that media is defined and that metadata are available (to retrieve currentTime) if (media && media.readyState) { let fetchdelay, fragPlayingCurrent, nextBufferedFrag; diff --git a/src/controller/subtitle-track-controller.js b/src/controller/subtitle-track-controller.js index a45bc2d01a3..c317fb49d04 100644 --- a/src/controller/subtitle-track-controller.js +++ b/src/controller/subtitle-track-controller.js @@ -28,6 +28,10 @@ class SubtitleTrackController extends EventHandler { this.tracks = []; this.trackId = -1; this.media = undefined; + + /** + * @member {boolean} subtitleDisplay Enable/disable subtitle display rendering + */ this.subtitleDisplay = false; }