Skip to content

Commit

Permalink
Merge branch 'release/v3.33.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Jan 24, 2024
2 parents dc33c89 + 902947d commit fe46689
Show file tree
Hide file tree
Showing 48 changed files with 2,178 additions and 963 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## v3.33.0 (2024-01-24)

### Features

- Add `getLivePosition` RxPlayer method [#1300]
- Add `startAt.fromLivePosition` `loadVideo` option [#1300]
- Add the possibility to set a new `keySystems` option on the `reload` API [#1308]

### Bug fixes

- Fix subtitles "blinking" in some specific conditions, especially with some DASH low-latency contents [#1314]
- DASH: Fix Period overlap resolution logic for when the first Period is removed [#1311]
- TTML: Fix handling of the `tts:lineHeight` attribute [#1320]
- Fix import of the `LOCAL_MANIFEST` experimental feature
- Avoid very rarely skipping segments which initially were too big to be pushed due to memory limitations [#1323]
- Fix issue arising when using track APIs at the exact last possible position of a Period with no consecutive Period [#1337]
- Starting at the end (through a `startAt` `loadVideo` option) or reloading at the end led to the restart of the content [#1338]
- DRM/Safari: also perform Safari DRM work-arounds when the page is launched from the dock [#1351, #1356]

### Other improvements

- DASH: rely on SCTE214 `supplementalCodecs` instead of `codecs` if it's supported to better support backward compatible Dolby Vision contents [#1307]
- DASH: Provide better support of the `availabilityTimeOffset` attribute [#1300]
- DEBUG_ELEMENT: Add unsupported and undecipherable bitrates to the debug element [#1321]
- DEBUG_ELEMENT: update buffer graph maximum size so it becomes more readable for lengthy contents [#1316]
- DEBUG_ELEMENT: always synchronize inventory of segments before rendering it [#1317]
- Remove remaining RxPlayer dependency removing possibility of some application-side bundling errors [#1312]
- Add exception to text Garbage collection logic to avoid unnecessarily reload text segments frequently [#1325]
- Avoid logging too much the buffer's content when our debugging UI or the demo is used [#1341]
- Demo: Fix reporting of live position in demo page [#1313]


## v3.32.1 (2023-10-19)

### Features
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.32.1
3.33.0
8 changes: 5 additions & 3 deletions demo/full/scripts/controllers/ControlBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function ControlBar({
const isStopped = useModuleState(player, "isStopped");
const liveGap = useModuleState(player, "liveGap");
const lowLatencyMode = useModuleState(player, "lowLatencyMode");
const livePosition = useModuleState(player, "livePosition");
const maximumPosition = useModuleState(player, "maximumPosition");
const playbackRate = useModuleState(player, "playbackRate");

Expand Down Expand Up @@ -79,15 +80,16 @@ function ControlBar({
const isAtLiveEdge = isLive && isCloseToLive && !isCatchingUp;

const onLiveDotClick = React.useCallback(() => {
if (maximumPosition == null) {
const livePos = livePosition ?? maximumPosition;
if (livePos == null) {
/* eslint-disable-next-line no-console */
console.error("Cannot go back to live: live position not found");
return;
}
if (!isAtLiveEdge) {
player.actions.seek(maximumPosition - (lowLatencyMode ? 4 : 10));
player.actions.seek(livePos - (lowLatencyMode ? 4 : 10));
}
}, [isAtLiveEdge, player, maximumPosition, lowLatencyMode]);
}, [isAtLiveEdge, player, livePosition, maximumPosition, lowLatencyMode]);

return (
<div className="controls-bar-container">
Expand Down
3 changes: 2 additions & 1 deletion demo/full/scripts/controllers/ProgressBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function ProgressBar({
const isContentLoaded = useModuleState(player, "isContentLoaded");
const isLive = useModuleState(player, "isLive");
const minimumPosition = useModuleState(player, "minimumPosition");
const livePosition = useModuleState(player, "livePosition");
const maximumPosition = useModuleState(player, "maximumPosition");

const [timeIndicatorVisible, setTimeIndicatorVisible] = React.useState(false);
Expand Down Expand Up @@ -189,7 +190,7 @@ function ProgressBar({
onMouseMove={onMouseMove}
position={currentTime}
minimumPosition={minimumPosition}
maximumPosition={maximumPosition}
maximumPosition={livePosition ?? maximumPosition}
bufferGap={bufferGap}
/>
}
Expand Down
10 changes: 5 additions & 5 deletions demo/full/scripts/modules/player/catchUp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ export default class CatchUpModeController {
this._state.updateBulk({ isCatchingUp: false, playbackRate: 1 });
} else {
const checkCatchUp = () => {
const maximumPosition = this._rxPlayer.getMaximumPosition();
if (maximumPosition === null) {
const livePos = this._rxPlayer.getLivePosition() ??
this._rxPlayer.getMaximumPosition();
if (livePos === null) {
this._rxPlayer.setPlaybackRate(1);
this._state.updateBulk({ isCatchingUp: false, playbackRate: 1 });
return;
}
const position = this._rxPlayer.getPosition();
const liveGap = maximumPosition - position;
const liveGap = livePos - position;
if (liveGap >= CATCH_UP_SEEKING_STEP) {
// If we're too far from the live to just change the playback rate,
// seek directly close to live
this._rxPlayer
.seekTo(maximumPosition - LIVE_GAP_GOAL_WHEN_CATCHING_UP);
this._rxPlayer.seekTo(livePos - LIVE_GAP_GOAL_WHEN_CATCHING_UP);
this._rxPlayer.setPlaybackRate(1);
this._state.updateBulk({ isCatchingUp: false, playbackRate: 1 });
return;
Expand Down
11 changes: 8 additions & 3 deletions demo/full/scripts/modules/player/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,24 @@ function linkPlayerEventsToState(
const position = player.getPosition();
const duration = player.getVideoDuration();
const videoTrack = player.getVideoTrack();
const livePosition = player.getLivePosition();
const maximumPosition = player.getMaximumPosition();
let bufferGap = player.getVideoBufferGap();
bufferGap = !isFinite(bufferGap) || isNaN(bufferGap) ?
0 :
bufferGap;

const livePos = livePosition ?? maximumPosition;
state.updateBulk({
currentTime: player.getPosition(),
wallClockDiff: player.getWallClockTime() - position,
bufferGap,
duration: Number.isNaN(duration) ? undefined : duration,
livePosition,
minimumPosition: player.getMinimumPosition(),
maximumPosition: player.getMaximumPosition(),
liveGap: typeof maximumPosition === "number" ?
maximumPosition - player.getPosition() :
maximumPosition,
liveGap: typeof livePos === "number" ?
livePos - player.getPosition() :
undefined,
playbackRate: player.getPlaybackRate(),
videoTrackHasTrickMode: videoTrack !== null &&
Expand Down Expand Up @@ -210,6 +214,7 @@ function linkPlayerEventsToState(
stateUpdates.duration = undefined;
stateUpdates.minimumPosition = undefined;
stateUpdates.maximumPosition = undefined;
stateUpdates.livePosition = undefined;
break;
}

Expand Down
2 changes: 2 additions & 0 deletions demo/full/scripts/modules/player/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export interface IPlayerModuleState {
liveGap: number | undefined;
loadedVideo: ILoadVideoOptions | null;
lowLatencyMode: boolean;
livePosition: null | undefined | number;
maximumPosition: null | undefined | number;
minimumPosition: null | undefined | number;
playbackRate: number;
Expand Down Expand Up @@ -185,6 +186,7 @@ const PlayerModule = declareModule(
liveGap: undefined,
loadedVideo: null,
lowLatencyMode: false,
livePosition: undefined,
maximumPosition: undefined,
minimumPosition: undefined,
playbackRate: 1,
Expand Down
Binary file modified dist/mpd-parser.wasm
Binary file not shown.
Loading

0 comments on commit fe46689

Please sign in to comment.