I'm trying to create a cross-browser way to change the audio track of an HTML5 video that plays in my web-app. I know that audioTracks
video property is not supported in all browsers so I've been digging into an alternate way to do it. I came across this stack overflow question that lead me to the AudioContext
class in Javascript. I was able to get the default audio (the audio that is embedded in the video) to play through the AudioContext
but I'm at a loss for how to programmatically map a new sound through the same AudioContext
instance that is connected to the HTML5 element.
Is it at all possible to change the audio from an HTML5 video element to another audio track that is external (mp3,wav, acc, etc...)?
the basic premise is for an end-user to be able to change the video's audio to a different language.