Skip to content

Commit

Permalink
Update README.md dependency and RxPlayer documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Feb 4, 2024
1 parent 59c3eae commit 43126be
Show file tree
Hide file tree
Showing 14 changed files with 118 additions and 136 deletions.
4 changes: 2 additions & 2 deletions doc/.docConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"favicon": {
"srcPath": "./static/img/favicon.png"
},
"otherVersionsLink": "https://developers.canal-plus.com/rx-player/documentation_pages_by_version.html",
"linksLeft": [
{
"type": "local-doc",
Expand Down Expand Up @@ -43,7 +42,8 @@
"link": "https://github.com/canalplus/rx-player"
},
{
"type": "version"
"type": "version",
"link": "https://developers.canal-plus.com/rx-player/documentation_pages_by_version.html"
}
]
}
4 changes: 2 additions & 2 deletions doc/Getting_Started/Glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ Example of such types are:
### Chunk

Depending on the context, a chunk can be either a sub-part of a
[Media Segment](#media_segment) or the Media segment itself.
[Media Segment](#media-segment) or the Media segment itself.

### Initialization segment

An initialization segment is a specific type of [media segment](#media_segment), which
An initialization segment is a specific type of [media segment](#media-segment), which
includes metadata necessary to initialize the browser's internal decoder.

Those are sometimes needed before we can actually begin to push any "real" media segment
Expand Down
9 changes: 5 additions & 4 deletions doc/Getting_Started/Migration_From_v3/Bitrate_Selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,11 @@ As for the `Representation` objects themselves, they can for example be obtained

- The [`videoTrackChange`](../../api/Player_Events.md#videotrackchange),
[`audioTrackChange`](../../api/Player_Events.md#audiotrackchange),
[`availableVideoTracksChange`](../../api/Player_Events.md#availablevideotracks) and
[`availableAudioTracksChange`](../../api/Player_Events.md#availableaudiotracks) player
events which respectively emit data similar to the `getVideoTrack`, `getAudioTrack`,
`getAvailableVideoTracks` and `getAvailableAudioTracks` methods.
[`availableVideoTracksChange`](../../api/Player_Events.md#availablevideotrackschange)
and
[`availableAudioTracksChange`](../../api/Player_Events.md#availableaudiotrackschange)
player events which respectively emit data similar to the `getVideoTrack`,
`getAudioTrack`, `getAvailableVideoTracks` and `getAvailableAudioTracks` methods.

### Global idea to replace the previous API

Expand Down
2 changes: 1 addition & 1 deletion doc/Getting_Started/Migration_From_v3/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ playback issues, allowing us to more effectively work-around specific bugs.

This means that you now have to make sure that state is considered. You can see more
information on the `"RELOADING"` state
[in the player state page](../../api/Player_States.md#the_reloading_state). Thankfully, it
[in the player state page](../../api/Player_States.md#the-reloading-state). Thankfully, it
is now possible to perform more operations under that state, such as switching tracks and
qualities.

Expand Down
5 changes: 3 additions & 2 deletions doc/Getting_Started/Migration_From_v3/loadVideo_Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,9 @@ Both undocumented, the `audioRobustnesses` and `videoRobustnesses` properties of
encrypted content.

They have now been replaced by the much more powerful
[`audioCapabilitiesConfig`](../../api/Decryption_Options.md#audiocapabilitiesconfig) and
[`videoCapabilitiesConfig`](../../api/Decryption_Options.md#videocapabilitiesconfig)
[`audioCapabilitiesConfig`](../../api/Decryption_Options.md#videocapabilitiesconfig--audiocapabilitiesconfig)
and
[`videoCapabilitiesConfig`](../../api/Decryption_Options.md#videocapabilitiesconfig--audiocapabilitiesconfig)
respectively.

What was previously written:
Expand Down
14 changes: 7 additions & 7 deletions doc/api/Decryption_Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ If this callback throws or rejects, the RxPlayer will either:

If we have no Representation to fallback to anymore, we will throw a MediaError with a
`NO_PLAYABLE_REPRESENTATION` code, as documented
[in the errors documentation](./Player_Errors.md#types-media_error).
[in the errors documentation](./Player_Errors.md#media_error).

If the `getLicense` call throws/rejects, you can add any of the following properties (none
are mandatory) to configure the behavior of the RxPlayer relative to that failure:
Expand Down Expand Up @@ -147,7 +147,7 @@ are mandatory) to configure the behavior of the RxPlayer relative to that failur
rather try to fallback on other Representations (e.g. qualities) which might have a
different decryption key. If no Representation is left, we will throw a MediaError with
a `NO_PLAYABLE_REPRESENTATION` code, as documented
[in the errors documentation](./Player_Errors.md#types-media_error).
[in the errors documentation](./Player_Errors.md#media_error).

This option is thus only useful for contents depending on multiple licenses.

Expand Down Expand Up @@ -354,7 +354,7 @@ or
will be required, optional or not-allowed.

It can be set to any value of the `MediaKeysRequirement` enumeration, as declared
[here in the EME specification](#https://www.w3.org/TR/encrypted-media/#dom-mediakeysrequirement).
[here in the EME specification](https://www.w3.org/TR/encrypted-media/#dom-mediakeysrequirement).
This is not needed for most use cases.

### persistentState
Expand All @@ -373,7 +373,7 @@ value to `"required"` is redundant and therefore unnecessary (as exploiting pers
licenses already necessitate the ability to persist session state).

It can be set to any value of the `MediaKeysRequirement` enumeration, as declared
[here in the EME specification](#https://www.w3.org/TR/encrypted-media/#dom-mediakeysrequirement).
[here in the EME specification](https://www.w3.org/TR/encrypted-media/#dom-mediakeysrequirement).
This is not needed for most use cases.

### onKeyOutputRestricted
Expand All @@ -393,7 +393,7 @@ default one if not is defined being `"error"`:
status. This is the default behavior.

The error emitted in that case should be an
[EncryptedMediaError](./Player_Errors.md#encryptedmediaerror) with a
[EncryptedMediaError](./Player_Errors.md#encrypted_media_error) with a
`KEY_STATUS_CHANGE_ERROR` `code` property with a set `keyStatuses` property containing
at least one string set to `"output-restricted"`.

Expand Down Expand Up @@ -426,7 +426,7 @@ default one if not is defined being `"error"`:
status. This is the default behavior.

The error emitted in that case should be an
[EncryptedMediaError](./Player_Errors.md#encryptedmediaerror) with a
[EncryptedMediaError](./Player_Errors.md#encrypted_media_error) with a
`KEY_STATUS_CHANGE_ERROR` `code` property with a set `keyStatuses` property containing
at least one string set to `"internal-error"`.

Expand Down Expand Up @@ -468,7 +468,7 @@ default one if not is defined being `"error"`:
default behavior.

The error emitted in that case should be an
[EncryptedMediaError](./Player_Errors.md#encryptedmediaerror) with a
[EncryptedMediaError](./Player_Errors.md#encrypted_media_error) with a
`KEY_STATUS_CHANGE_ERROR` `code` property with a set `keyStatuses` property containing
at least one string set to `"expired"`.

Expand Down
2 changes: 1 addition & 1 deletion doc/api/Loading_a_Content.md
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ Note that there is a risk of us losing synchronization when leap seconds are
added/substracted to unix time. However we consider those situations rare enough (and the
effect should be relatively weak) to let this as is for the moment. For a complete
explanation, you can look at the
[corresponding chapter of the low-latency documentation](./Miscellaneous/Low_Latency.md#note-time-sync).
[corresponding chapter of the low-latency documentation](./Miscellaneous/Low_Latency.md#note-about-time-synchronization).

### referenceDateTime

Expand Down
2 changes: 1 addition & 1 deletion doc/api/Miscellaneous/Local_Contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ rxPlayer.loadVideo({
});
```

More infos on the `manifestLoader` can be found [here](./plugins.md#manifestLoader).
More infos on the `manifestLoader` can be found [here](./plugins.md#manifestloader).

## How to import this feature

Expand Down
2 changes: 1 addition & 1 deletion doc/api/Miscellaneous/Local_Manifest_v0.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ rxPlayer.loadVideo({
});
```

More infos on the `manifestLoader` can be found [here](./plugins.md#manifestLoader).
More infos on the `manifestLoader` can be found [here](./plugins.md#manifestloader).

## How to import this feature

Expand Down
2 changes: 1 addition & 1 deletion doc/api/Miscellaneous/MetaPlaylist.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ player.loadVideo({
});
```

More infos on the `manifestLoader` can be found [here](./plugins.md#manifestLoader).
More infos on the `manifestLoader` can be found [here](./plugins.md#manifestloader).

### Defining an initial position for a dynamic MetaPlaylist

Expand Down
32 changes: 14 additions & 18 deletions doc/api/Player_Errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ Among its properties, you have:
### MEDIA_ERROR

Error related to the media itself. It can both come from the player itself
([Manifest](../Getting_Started/Glossary.md#structure_of_a_manifest_object) parsing) or
from the browser itself (content playback).
([Manifest](../Getting_Started/Glossary.md#manifest) parsing) or from the browser itself
(content playback).

They all have a `type` property equal to `"MEDIA_ERROR"`.

Expand Down Expand Up @@ -125,8 +125,7 @@ An error of `type` `MEDIA_ERROR` can have the following codes (`code` property):
that codec by inspecting the error's `tracksInfo` property, described below.

- `"MANIFEST_PARSE_ERROR"`: Generic error to signal than the
[Manifest](../Getting_Started/Glossary.md#structure_of_a_manifest_object) could not be
parsed.
[Manifest](../Getting_Started/Glossary.md#manifest) could not be parsed.

- `"MANIFEST_UNSUPPORTED_ADAPTATION_TYPE"`: One of the
[Adaptation](../Getting_Started/Glossary.md#adaptation) has a type (e.g. "audio", "text"
Expand Down Expand Up @@ -170,16 +169,14 @@ An error of `type` `MEDIA_ERROR` can have the following codes (`code` property):
found in the corresponding media.

- `"MEDIA_TIME_BEFORE_MANIFEST"`: The current time in the media is behind what is
currently declared in the
[Manifest](../Getting_Started/Glossary.md#structure_of_a_manifest_object). This can lead
to stalling indefinitely as the player won't be able to download new segments arround
the current time.
currently declared in the [Manifest](../Getting_Started/Glossary.md#manifest). This can
lead to stalling indefinitely as the player won't be able to download new segments
arround the current time.

- `"MEDIA_TIME_AFTER_MANIFEST"`: The current time in the media is after what is currently
declared in the
[Manifest](../Getting_Started/Glossary.md#structure_of_a_manifest_object). This can lead
to stalling indefinitely as the player won't be able to download new segments arround
the current time.
declared in the [Manifest](../Getting_Started/Glossary.md#manifest). This can lead to
stalling indefinitely as the player won't be able to download new segments arround the
current time.

- `"DISCONTINUITY_ENCOUNTERED"`: A discontinuity (i.e. a hole in the media buffer) has
been encontered and seeked over.
Expand Down Expand Up @@ -465,14 +462,13 @@ They all have a `type` property equal to `"OTHER_ERROR"`.

An error of `type` `OTHER_ERROR` can have the following codes (`code` property):

- `"PIPELINE_LOAD_ERROR"`: The
[Manifest](../Getting_Started/Glossary.md#structure_of_a_manifest_object) or segment
request failed and the request has been done through a given callback (i.e. not the
RxPlayer's XMLHttpRequest implementation).
- `"PIPELINE_LOAD_ERROR"`: The [Manifest](../Getting_Started/Glossary.md#manifest) or
segment request failed and the request has been done through a given callback (i.e. not
the RxPlayer's XMLHttpRequest implementation).

- `"PIPELINE_PARSE_ERROR"`: The RxPlayer's
[Manifest](../Getting_Started/Glossary.md#structure_of_a_manifest_object) or segment
parsing logic failed. This is most likely due to a malformed Manifest or segment.
[Manifest](../Getting_Started/Glossary.md#manifest) or segment parsing logic failed.
This is most likely due to a malformed Manifest or segment.

- `"INTEGRITY_ERROR"`: An integrity-checking mechanism in the RxPlayer detected that there
was an error with some loaded data. Such mechanism can be triggered for example when the
Expand Down
13 changes: 5 additions & 8 deletions doc/reference/API_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ events and so on.

## Constructor options

- [`videoElement`](../api/Creating_a_Player.md#videoElement): specifies the media element
- [`videoElement`](../api/Creating_a_Player.md#videoelement): specifies the media element
on which the content will play.

- [`baseBandwidth`](../api/Creating_a_Player.md#basebandwidth): Base value for the
Expand Down Expand Up @@ -48,7 +48,7 @@ events and so on.
- [`url`](../api/Loading_a_Content.md#url): URL to the content (e.g. DASH's MPD, Smooth's
Manifest etc.)

- [`keySystems`](../api/Decryption_Options.md#loadvideo_%60keysystems%60_options): DRM
- [`keySystems`](../api/Decryption_Options.md#loadvideo-keysystems-options): DRM
configuration for the content.

- [`keySystems[].type`](../api/Decryption_Options.md#type): Name of the DRM technology
Expand All @@ -63,7 +63,7 @@ events and so on.
- [`keySystems[].serverCertificate`](../api/Decryption_Options.md#servercertificate):
Eventual certificate encrypting exchanges between the CDM and license server.

- [`keySystems[].persistentLicenseConfig`](../api/Decryption_Options.md#persistentLicenseConfig):
- [`keySystems[].persistentLicenseConfig`](../api/Decryption_Options.md#persistentlicenseconfig):
Allows to ask for the DRM session to persist the license.

- [`keySystems[].onKeyExpiration`](../api/Decryption_Options.md#onkeyexpiration):
Expand Down Expand Up @@ -98,12 +98,12 @@ events and so on.
[persistentState](https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemconfiguration-persistentstate)
property.

- [`keySystems[].audioCapabilitiesConfig`](../api/Decryption_Options.md#videocapabilitiesconfigaudiocapabilitiesconfig):
- [`keySystems[].audioCapabilitiesConfig`](../api/Decryption_Options.md#videocapabilitiesconfig--audiocapabilitiesconfig):
Allows the configuration of the
[`audioCapabilities`](https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemconfiguration-audiocapabilities)
property.

- [`keySystems[].videoCapabilitiesConfig`](../api/Decryption_Options.md#videocapabilitiesconfigaudiocapabilitiesconfig):
- [`keySystems[].videoCapabilitiesConfig`](../api/Decryption_Options.md#videocapabilitiesconfig--audiocapabilitiesconfig):
Allows the configuration of the
[`videoCapabilities`](https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemconfiguration-videocapabilities)
property.
Expand Down Expand Up @@ -450,9 +450,6 @@ events and so on.
- [`brokenRepresentationsLock`](../api/Player_Events.md#brokenrepresentationslock):
Representations previously being locked was automatically unlocked by the RxPlayer.

- [`autoTrackSwitch`](../api/Player_Events.md#autotrackswitch): A track previously set was
automatically changed by the RxPlayer.

- [`play`](../api/Player_Events.md#play): Emitted when playback is no longer consider
paused.

Expand Down
Loading

0 comments on commit 43126be

Please sign in to comment.