diff --git a/src/clappr-dash-shaka-playback.js b/src/clappr-dash-shaka-playback.js index 2d53266..d27a147 100644 --- a/src/clappr-dash-shaka-playback.js +++ b/src/clappr-dash-shaka-playback.js @@ -203,6 +203,10 @@ class DashShakaPlayback extends HTML5Video { return this.isReady && this._player.getTextTracks() } + get audioLanguages () { + return this.isReady && this._player.getAudioLanguages(); + } + get audioTracks () { return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('audio/')) } @@ -215,6 +219,10 @@ class DashShakaPlayback extends HTML5Video { return (this.isReady && this._player.isLive() ? 'live' : 'vod') || '' } + selectAudioLanguage (language, role=null) { + this._player.selectAudioLanguage(language, role); + } + selectTrack (track) { if (track.type === 'text') { this._player.selectTextTrack(track) @@ -449,6 +457,7 @@ class DashShakaPlayback extends HTML5Video { bandwidth: activeVideo.bandwidth, width: activeVideo.width, height: activeVideo.height, + language: activeVideo.language, level: activeVideo.id, bitrate: activeVideo.videoBandwidth })