You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdks/player/apivideo-player-sdk.md
+67-60Lines changed: 67 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,10 @@ title: api.video Player SDK
3
3
meta:
4
4
description: The official api.video Player SDK for api.video. [api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
5
5
---
6
+
<!--
7
+
THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT!
8
+
IF YOU NEED TO CHANGE THIS FILE, CREATE A PR IN THE SOURCE REPOSITORY.
9
+
-->
6
10
7
11
# api.video Player SDK
8
12
@@ -108,88 +112,87 @@ The PlayerSdk constructor takes 2 parameters:
108
112
109
113
The sdk instance can be used to control the video playback, and to listen to player events.
110
114
111
-
### Ads
115
+
####Ads
112
116
Ads can be displayed in the player. To do so, you need to pass the `ads` option to the sdk constructor. In the `ads` object, pass the `adTagUrl` property with the url of the ad tag. The ad tag must be a VAST 2.0 or 3.0 url. For more information about VAST, check the [IAB documentation](https://www.iab.com/guidelines/vast/).
113
117
114
118
Note: ads are displayed using the [Google IMA SDK](https://developers.google.com/interactive-media-ads/docs/sdks/html5/quickstart).
115
119
116
-
## Methods
120
+
###Methods
117
121
118
-
The SDK instance has the following methods:
122
+
The sdk instance has the following methods:
119
123
120
-
-`loadConfig(options: SdkOptions)`
121
-
Load a new video in the same instance of the player. Available options are the same as the ones passed to the SDK nstructor (see available).
122
-
Example:
124
+
**`loadConfig(options: SdkOptions)`**
125
+
126
+
Load a new video in the same instance of the player. Available options are the same as the ones passed to the SDK constructor (see available).
If no value is provided for the "controls" parameter, all controls will be hidden.
163
+
> If no value is provided for the "controls" parameter, all controls will be hidden.
158
164
159
165
**Note**: the only control that can still be visible is the unmute button if the video as started muted. To hide all controls, including this one, use the setChromeless() method
160
166
161
167
Example:
162
168
```javascript
163
169
player.hideControls();
164
170
```
165
-
166
-
If a list of control names if provided, the associated controls will be hidden.
171
+
> If a list of control names if provided, the associated controls will be hidden.
167
172
168
173
Example:
169
174
```javascript
170
175
player.showControls(); // display all controls ...
171
176
player.hideControls(["download", "subtitles"]); // ... except "download" and "subtitles"
0 commit comments