diff --git a/_posts/2015-09-01-player.html b/_posts/2015-09-01-player.html index 2f2467f..be708e5 100644 --- a/_posts/2015-09-01-player.html +++ b/_posts/2015-09-01-player.html @@ -160,7 +160,16 @@
- + +viewer.callMethod('cc', 1); //enable the closed caption with index 1
viewer.callMethod('cc', -1); //disables the closed caption
Sets the audio language of the stream. Requires one argument:
+audioIndex
key from the received audio tracks array in audio
eventviewer.callMethod('audio', 1); //select audio track with index 1
+
Read a property of the embed player. This method is asynchronous, the data will be passed to a callback function, given as argument.
Accessible properties by getProperty
:
Fired when there are multiple audio tracks.
+Returns an array containing audio tracks as objects.
+index
(integer) unique index of the audio tracklabel
(string) label of the audiolanguage
(string) language code of the audiocountry
(string) country code of the audioactive
(booelan)viewer.addListener('audio', callBack);
+ // example audio object
+[
+ { "index": 0, "label": "English (US)", "language": "en", "country": "US", "active": true },
+ { "index": 1, "label": "French", "language": "fr", "country": "00", "active": false }
+]
+
Called when a the player content changes for some reason. Same data as received in getProperty('content')
Received arguments: data
(object)