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

Commit f20fc3b

Browse files
committed
MediaPlayer:
- getPosition() should return current time for live streams - update jsdoc for load function and startTime stream parameter
1 parent 39c40be commit f20fc3b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

app/js/streaming/MediaPlayer.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ MediaPlayer = function () {
840840
<pre>
841841
{
842842
url : "[manifest url]",
843-
startTime : [start time in seconds (optional)],
843+
startTime : [start time in seconds (optional, only for static streams)],
844844
protocol : "[protocol type]", // 'HLS' to activate native support on Safari/OSx
845845
protData : {
846846
// one entry for each key system ('com.microsoft.playready' or 'com.widevine.alpha')
@@ -1065,11 +1065,7 @@ MediaPlayer = function () {
10651065
*/
10661066
getPosition: function () {
10671067
_isPlayerInitialized();
1068-
if (!this.isLive()) {
1069-
return videoModel.getCurrentTime();
1070-
} else {
1071-
return undefined;
1072-
}
1068+
return videoModel.getCurrentTime();
10731069
},
10741070

10751071
/**

0 commit comments

Comments
 (0)