Audio not autoplaying


(Carey) #1

Hello! The audio for this scene is not autoplaying and I’m not sure why. The code works in a bunch of other scenes, but not in this one

window.myAudio = hypeDocument.getElementById('ch3_01');
myAudio.addEventListener('timeupdate', syncTimelines);
myAudio.play();

function syncTimelines() {
    audioTime = myAudio.currentTime;
    hypeDocument.goToTimeInTimelineNamed(audioTime, 'Main Timeline');

    if (!myAudio.paused) {
    hypeDocument.continueTimelineNamed('Main Timeline');
    }
    else if (myAudio.paused) {
    hypeDocument.pauseTimelineNamed('Main Timeline');    
    }