I am having track from one source, mute, and I\'d like to play background music over it using element. The tracks contain some time critical elements.
What would be th
Mikko Ohtamaa provided a solution in a comment, which I actually think is the best option here - it doesn't require a framework, and it doesn't require you to edit your video files.
Essentially, just grab the current time from the video element when it is "unmuted", and apply that time to the audio element. Some code might look like this:
function unmute() {
var vid = document.getElementById("video");
var aud = document.getElementById("audio");
aud.currentTime = vid.currentTime;
aud.play();
}