Created
September 23, 2022 17:19
-
-
Save camila314/5422245a33008622360bb64171c8313e to your computer and use it in GitHub Desktop.
Edgenuity video auto-advance and alert for prompts
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
// Run in the stageFrame iframe | |
var currentFrame = 0; | |
var frameInterval = setInterval(function() { | |
let idx = API.FrameChain.framesStatus.indexOf("incomplete"); | |
if (idx == 0) { | |
currentFrame = 0; | |
} else if (idx > window.currentFrame) { | |
currentFrame = idx; | |
API.FrameChain.nextFrame(); | |
if (API.Frame.StackProgress.length > 0) { | |
new Audio('https://commondatastorage.googleapis.com/codeskulptor-assets/sounddogs/explosion.mp3').play(); | |
} | |
} | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment