Skip to content

Commit 7686637

Browse files
committed
fix: Use infiniteLiveStreamDuration equal to true in Safari 17 or above (#7901)
Fixes #7899
1 parent 064b9a5 commit 7686637

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

externs/shaka/player.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,10 +1800,12 @@ shaka.extern.LiveSyncConfiguration;
18001800
* <br>
18011801
* Defaults to <code>0.5</code>.
18021802
* @property {boolean} infiniteLiveStreamDuration
1803-
* If <code>true</code>, the media source live duration
1804-
* set as a<code>Infinity</code>
1803+
* If <code>true</code>, the media source duration of livestreams will be set
1804+
* to <code>Infinity</code>. Otherwise, it will be set to a high but
1805+
* non-infinite number (2^32).
18051806
* <br>
1806-
* Defaults to <code>false</code>.
1807+
* Defaults to <code>false</code> except on Safari 17 or above whose default
1808+
* value is <code>true</code>.
18071809
* @property {number} preloadNextUrlWindow
18081810
* The window of time at the end of the presentation to begin preloading the
18091811
* next URL, such as one specified by a urn:mpeg:dash:chaining:2016 element

lib/util/player_configuration.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@ shaka.util.PlayerConfiguration = class {
276276
shaka.util.Platform.isTizen(),
277277
};
278278

279+
const safariVersion = shaka.util.Platform.safariVersion();
280+
if (safariVersion && safariVersion >= 17) {
281+
streaming.infiniteLiveStreamDuration = true;
282+
}
283+
279284
// WebOS, Tizen, Chromecast and Hisense have long hardware pipelines
280285
// that respond slowly to seeking.
281286
// Therefore we should not seek when we detect a stall

0 commit comments

Comments
 (0)