Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit ba04b38

Browse files
authored
Merge pull request #223 from Orange-OpenSource/hls-start-time
Add support for start time for HLS (native playback on Safari)
2 parents ca019d6 + d27d829 commit ba04b38

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app/js/hls/HlsStream.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,9 @@ Hls.dependencies.HlsStream = function() {
488488
},
489489

490490
load: function(url) {
491+
if (initialStartTime >= 0) {
492+
url += '#t=' + initialStartTime;
493+
}
491494
this.videoModel.setSource(url);
492495
},
493496

app/js/streaming/StreamController.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ MediaPlayer.dependencies.StreamController = function() {
404404
stream.setDefaultAudioLang(defaultAudioLang);
405405
stream.setDefaultSubtitleLang(defaultSubtitleLang);
406406
stream.enableSubtitles(subtitlesEnabled);
407+
stream.setInitialStartTime(source.startTime);
407408
streams.push(stream);
408409
activeStream = stream;
409410
attachVideoEvents.call(this, activeStream.getVideoModel());

0 commit comments

Comments
 (0)