Created
January 12, 2019 21:04
-
-
Save jamesmundy/2029eab33cbc4868a66d7bcfaba8abde to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function playSoundAtPoint(video, currentSecond, secondToPlay, trackNumber, listen, pauseVideo) { | |
if (currentSecond >= secondToPlay) { | |
if (pauseVideo === true) { | |
video.pause(); | |
} | |
playTrack(trackNumber, listen); | |
return true; | |
} | |
} | |
function beginListeningAtPoint(video, currentSecond, secondToPlay, pauseVideo) { | |
if (currentSecond >= secondToPlay) { | |
if (pauseVideo === true) { | |
video.pause(); | |
} | |
beginListening(); | |
return true; | |
} | |
} | |
//Monitor video and listen at certain point | |
_wq.push( | |
{ | |
id: city_1, | |
onReady: function (video) { | |
video.bind("secondchange", | |
function (s) { | |
if (beginListeningAtPoint(video, s, 13, false)) { | |
return video.unbind; | |
} | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment