Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] "Remove" manifestUpdateUrl loadVideo option for the v4 #1276

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions doc/Getting_Started/Migration_From_v3/loadVideo_Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ If you still need that option for a valid use case, you are welcomed to open an
issue.


### `transportOptions.manifestUpdateUrl`

The `manifestUpdateUrl` option has been removed without replacement.

It was previously used as a non-standard DASH optimization to be able to refresh
a DASH MPD (its Manifest document) through an URL containing a shorter version
of the full DASH MPD.
As we knew, it was only used at Canal+, though we now use (and we always
preferred) more standard solutions both on the packaging-side (use of repeat
attributes) and on the RxPlayer-side (usage of WebAssembly, internal
optimizations like "unsafeMode").


### `transportOptions.aggressiveMode`

The `aggressiveMode` option has been removed without replacement.
Expand Down
45 changes: 0 additions & 45 deletions doc/api/Loading_a_Content.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,51 +487,6 @@ contents if its request was done immediately before the `loadVideo`
call.


### manifestUpdateUrl

_type_: `string|undefined`

<div class="warning">
This option has no effect in <i>DirectFile</i> mode (see <a href="#transport">
transport option</a>)
</div>

Set a custom Manifest URL for Manifest updates.
This URL can point to another version of the Manifest with a shorter
timeshift window, to lighten the CPU, memory and bandwidth impact of
Manifest updates.

Example:

```js
rxPlayer.loadVideo({
transport: "dash",
url: "https://example.com/full-content.mpd",
manifestUpdateUrl: "https://example.com/content-with-shorter-window.mpd",
});
```

When the RxPlayer plays a live content, it may have to refresh frequently
the Manifest to be aware of where to find new media segments.
It generally uses the regular Manifest URL when doing so, meaning that the
information about the whole content is downloaded again.

This is generally not a problem though: The Manifest is generally short
enough meaning that this process won't waste much bandwidth memory or
parsing time.
However, we found that for huge Manifests (multiple MB uncompressed), this
behavior could be a problem on some low-end devices (some set-top-boxes,
chromecasts) where slowdowns can be observed when Manifest refresh are
taking place.

The `manifestUpdateUrl` will thus allow an application to provide a second
URL, specifically used for Manifest updates, which can represent the same
content with a shorter timeshift window (e.g. using only 5 minutes of
timeshift window instead of 10 hours for the full Manifest). The content
will keep its original timeshift window and the RxPlayer will be able to get
information about new segments at a lower cost.


### representationFilter

_type_: `Function|undefined`
Expand Down
4 changes: 0 additions & 4 deletions doc/reference/API_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ properties, methods, events and so on.
- [`initialManifest`](../api/Loading_a_Content.md#initialmanifest):
Allows to provide an initial Manifest to speed-up the content loading

- [`manifestUpdateUrl`](../api/Loading_a_Content.md#manifestupdateurl):
Provide another URL, potentially to a shorter Manifest, used only for
Manifest updates

- [`representationFilter`](../api/Loading_a_Content.md#representationfilter):
Filter out qualities from the Manifest based on its characteristics.

Expand Down
4 changes: 2 additions & 2 deletions src/core/api/option_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ interface IParsedLoadVideoOptionsBase {
onCodecSwitch : "continue"|"reload";
checkMediaSegmentIntegrity? : boolean | undefined;
manifestLoader?: IManifestLoader | undefined;
manifestUpdateUrl? : string | undefined;
referenceDateTime? : number | undefined;
representationFilter? : IRepresentationFilter | undefined;
segmentLoader? : ISegmentLoader | undefined;
serverSyncInfos? : IServerSyncInfos | undefined;
__priv_manifestUpdateUrl? : string | undefined;
__priv_patchLastSegmentInSidx? : boolean | undefined;
}

Expand Down Expand Up @@ -397,6 +397,7 @@ function parseLoadVideoOptions(
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
return { __priv_patchLastSegmentInSidx: (options as any).__priv_patchLastSegmentInSidx,
__priv_manifestUpdateUrl: (options as any).__priv_manifestUpdateUrl,
/* eslint-enable @typescript-eslint/no-explicit-any */
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
/* eslint-enable @typescript-eslint/no-unsafe-member-access */
Expand All @@ -408,7 +409,6 @@ function parseLoadVideoOptions(
keySystems,
lowLatencyMode,
manifestLoader: options.manifestLoader,
manifestUpdateUrl: options.manifestUpdateUrl,
minimumManifestUpdateInterval,
requestConfig,
onCodecSwitch,
Expand Down
4 changes: 2 additions & 2 deletions src/core/api/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,11 +538,11 @@ class Player extends EventEmitter<IPublicAPIEvent> {
transport,
checkMediaSegmentIntegrity,
manifestLoader,
manifestUpdateUrl,
referenceDateTime,
representationFilter,
segmentLoader,
serverSyncInfos,
__priv_manifestUpdateUrl,
__priv_patchLastSegmentInSidx,
url } = options;

Expand Down Expand Up @@ -574,11 +574,11 @@ class Player extends EventEmitter<IPublicAPIEvent> {
const transportPipelines = transportFn({ lowLatencyMode,
checkMediaSegmentIntegrity,
manifestLoader,
manifestUpdateUrl,
referenceDateTime,
representationFilter,
segmentLoader,
serverSyncInfos,
__priv_manifestUpdateUrl,
__priv_patchLastSegmentInSidx });

/** Interface used to load and refresh the Manifest. */
Expand Down
3 changes: 0 additions & 3 deletions src/public_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ export interface ILoadVideoOptions {
/** Custom implementation for performing Manifest requests. */
manifestLoader? : IManifestLoader;

/** Possible custom URL pointing to a shorter form of the Manifest. */
manifestUpdateUrl? : string;

/** Minimum bound for Manifest updates, in milliseconds. */
minimumManifestUpdateInterval? : number;

Expand Down
2 changes: 1 addition & 1 deletion src/transports/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -795,10 +795,10 @@ export interface ITransportOptions {
checkMediaSegmentIntegrity? : boolean | undefined;
lowLatencyMode : boolean;
manifestLoader?: IManifestLoader | undefined;
manifestUpdateUrl? : string | undefined;
referenceDateTime? : number | undefined;
representationFilter? : IRepresentationFilter | undefined;
segmentLoader? : ICustomSegmentLoader | undefined;
serverSyncInfos? : IServerSyncInfos | undefined;
__priv_manifestUpdateUrl? : string | undefined;
__priv_patchLastSegmentInSidx? : boolean | undefined;
}
Loading