Skip to content

Commit 314f1c5

Browse files
authored
Merge pull request #176979 from diberry/diberry/1021-content-fixes
JS Correction for Media Player API methods
2 parents eb714f5 + 48af40e commit 314f1c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/media-services/azure-media-player/azure-media-player-api-methods.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To use the API functions, you need access to the player object. Luckily it is ea
2626

2727
The time it takes Azure Media Player to set up the video and API will vary depending on the playback technology being used. HTML5 will often be much faster to load than Flash or Silverlight. For that reason, the player's 'ready' function should be used to trigger any code that requires the player's API.
2828

29-
```javacript
29+
```javascript
3030
amp("vid_1").ready(function(){
3131
var myPlayer = this;
3232

@@ -37,7 +37,7 @@ The time it takes Azure Media Player to set up the video and API will vary depen
3737

3838
OR
3939

40-
```javacript
40+
```javascript
4141
var myPlayer = amp("vid_1", myOptions, function(){
4242
//this is the ready function and will only execute after the player is loaded
4343
});
@@ -47,7 +47,7 @@ OR
4747

4848
Now that you have access to a ready player, you can control the video, get values, or respond to video events. The Azure Media Player API function names attempt to follow the [HTML5 media API](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html). The main difference is that getter/setter functions are used for video properties.
4949

50-
```javacript
50+
```javascript
5151
// setting a property on a bare HTML5 video element
5252
myVideoElement.currentTime = 120;
5353

@@ -58,7 +58,7 @@ Now that you have access to a ready player, you can control the video, get value
5858
## Registering for events ##
5959
Events should be registered directly after initializing the player for the first time to ensure all events are appropriately reported to the application, and should be done outside of the ready event.
6060

61-
```javacript
61+
```javascript
6262
var myPlayer = amp("vid_1", myOptions, function(){
6363
//this is the ready function and will only execute after the player is loaded
6464
});

0 commit comments

Comments
 (0)