VideoPlayer with multiple audio track

Anyone have experience playing video with multiple audio tracks on WebOS?
My code works fine in Internet Explorer 11:

selectAudio: function (id) {
var audioTracks = this.$.player.getVideo().node.audioTracks;
for (var i = 0; i < audioTracks.length; i++) {
audioTracks[i].enabled = Boolean(audioTracks[i].id == id);
}
},

But in WebOS 2.0 audioTracks.length always returns zero for the same file.
I think it can be done, because you can switch audio tracks in the SmartShare application, which uses the same moon.VideoPlayer by the look of it.

Comments

  • To answer my own question, it probably won't work this way on WebOS 2.0
    Although AudioTrackList should be supported according to the API list, AudioTrack isn't, so you cannot enable/disable individual tracks.
    It looks like they implemented it in WebOS 3.0 though.
Sign In or Register to comment.