|
10 | 10 | ## Table of contents |
11 | 11 |
|
12 | 12 | - [Table of contents](#table-of-contents) |
13 | | -- [Project description](#project-description) |
14 | | -- [Getting started](#getting-started) |
15 | | - - [Installation](#installation) |
16 | | - - [Method #1: requirejs](#method-1-requirejs) |
17 | | - - [Method #2: typescript](#method-2-typescript) |
18 | | - - [Method #2: simple include in a javascript project](#method-2-simple-include-in-a-javascript-project) |
19 | | -- [Documentation](#documentation) |
20 | | - - [Instantiation](#instantiation) |
21 | | - - [Ads](#ads) |
22 | | - - [Methods](#methods) |
23 | | - - [Full example](#full-example) |
24 | | - - [Control an existing embedded player using the SDK](#control-an-existing-embedded-player-using-the-sdk) |
| 13 | + - [Project description](#project-description) |
| 14 | + - [Getting started](#getting-started) |
| 15 | + - [Installation](#installation) |
| 16 | + - [Method #1: requirejs](#method-1-requirejs) |
| 17 | + - [Method #2: typescript](#method-2-typescript) |
| 18 | + - [Method #2: simple include in a javascript project](#method-2-simple-include-in-a-javascript-project) |
| 19 | + - [Documentation](#documentation) |
| 20 | + - [Instantiation](#instantiation) |
| 21 | + - [Ads](#ads) |
| 22 | + - [Methods](#methods) |
| 23 | + - [Full example](#full-example) |
| 24 | + - [Control an existing embedded player using the SDK](#control-an-existing-embedded-player-using-the-sdk) |
25 | 25 |
|
26 | 26 | <!--</documentation_excluded>--> |
27 | 27 |
|
@@ -116,25 +116,26 @@ The PlayerSdk constructor takes 2 parameters: |
116 | 116 | - `targetSelector: string | Element` a CSS selector targeting the DOM element in which you want to create the player (eg. "#target"), or the DOM element itself |
117 | 117 | - `options: SdkOptions` an object containing the player options. The available options are the following: |
118 | 118 |
|
119 | | -| Option name | Mandatory | Type | Description | |
120 | | -| -------------: | --------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | |
121 | | -| id | **yes** | string | the id of the video (videoId or liveStreamId) | |
122 | | -| token | yes for private video | string | the [private video](https://api.video/blog/tutorials/tutorial-private-videos/) url token | |
123 | | -| privateSession | no | string | the [private video](https://api.video/blog/tutorials/tutorial-private-videos/) session id if needed | |
124 | | -| live | no (default: false) | boolean | indicate that the video is a live one | |
125 | | -| autoplay | no (default: false) | boolean | start playing the video as soon as it is loaded | |
126 | | -| muted | no (default: false) | boolean | the video is muted | |
127 | | -| metadata | no (default: empty) | object | object containing [metadata](https://api.video/blog/tutorials/dynamic-metadata/) (see **Full example** below) | |
128 | | -| hideControls | no (default: false) | boolean | the controls are hidden (except unmute button if the video starts muted) | |
129 | | -| chromeless | no (default: false) | boolean | chromeless mode: all controls are hidden | |
130 | | -| hideTitle | no (default: false) | boolean | the video title is hidden | |
131 | | -| hidePoster | no (default: false) | boolean | the poster image isn't displayed | |
132 | | -| showSubtitles | no (default: false) | boolean | the video subtitles are shown by default | |
133 | | -| loop | no (default: false) | boolean | once the video is finished it automatically starts again | |
134 | | -| playbackRate | no (default: 1) | number | the playback rate of the video: 1 for normal, 2 for x2, etc. | |
135 | | -| sequence | no | {start: number, end: number} | define a sequence of the video to play. The video will start at the `start` timecode and end at the `end` timecode. The timecodes are in seconds. | |
136 | | -| ads | no | {adTagUrl: string} | see below [ads](#ads) | |
137 | | -| customDomain | no | string | if you've enabled Custom Domains for your account, the complete 'embed' domain (eg. embed.mydomain.com) | |
| 119 | +| Option name | Mandatory | Type | Description | |
| 120 | +| -------------: | --------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 121 | +| id | **yes** | string | the id of the video (videoId or liveStreamId) | |
| 122 | +| token | yes for private video | string | the [private video](https://api.video/blog/tutorials/tutorial-private-videos/) url token | |
| 123 | +| privateSession | no | string | the [private video](https://api.video/blog/tutorials/tutorial-private-videos/) session id if needed | |
| 124 | +| live | no (default: false) | boolean | indicate that the video is a live one | |
| 125 | +| autoplay | no (default: false) | boolean | start playing the video as soon as it is loaded | |
| 126 | +| muted | no (default: false) | boolean | the video is muted | |
| 127 | +| metadata | no (default: empty) | object | object containing [metadata](https://api.video/blog/tutorials/dynamic-metadata/) (see **Full example** below) | |
| 128 | +| hideControls | no (default: false) | boolean | the controls are hidden (except unmute button if the video starts muted) | |
| 129 | +| chromeless | no (default: false) | boolean | chromeless mode: all controls are hidden | |
| 130 | +| hideTitle | no (default: false) | boolean | the video title is hidden | |
| 131 | +| hidePoster | no (default: false) | boolean | the poster image isn't displayed | |
| 132 | +| showSubtitles | no (default: false) | boolean | the video subtitles are shown by default | |
| 133 | +| loop | no (default: false) | boolean | once the video is finished it automatically starts again | |
| 134 | +| playbackRate | no (default: 1) | number | the playback rate of the video: 1 for normal, 2 for x2, etc. | |
| 135 | +| sequence | no | `{start: number, end: number}` | define a sequence of the video to play. The video will start at the `start` timecode and end at the `end` timecode. The timecodes are in seconds. | |
| 136 | +| ads | no | `{adTagUrl: string}` | see below [ads](#ads) | |
| 137 | +| customDomain | no | string | if you've enabled Custom Domains for your account, the complete 'embed' domain (eg. embed.mydomain.com) | |
| 138 | +| hotkeys | no (default: true) | boolean | if false, deactivate the player's hotkeys to prevent it from capturing focus, which can be beneficial in certain scenarios | |
138 | 139 |
|
139 | 140 | The sdk instance can be used to control the video playback, and to listen to player events. |
140 | 141 |
|
|
0 commit comments