Stop video when exiting an additional layout


(Chris) #1

I’m using Hype 3 Pro and in the Scene Inspector I do not see an On Scene Unload behavior, only a On Layout Unload. I tried creating a new behavior for On Scene Unload and included the following js function and applied it to the behavior but the audio is not stopping on scene change. Any tips?

function stopHTMLAudio(hypeDocument, element, event) {
var emptyInnerHTML = ‘’;
hypeDocument.getElementById(“video1”).innerHTML = emptyInnerHTML
}

EDIT: The letter T was removed from the code above --@daniel


Custom Video Embedding: Youtube, Vimeo, or hosted video files | Stopping Audio when exiting the scene
Custom Video Embedding: Youtube, Vimeo, or hosted video files | Stopping Audio when exiting the scene
#2

If you have responsive layouts, you’ll need to use Layout Unload. Can you are share your document?


(Ken Heins) #3

Where is Layout Unload?


#4

It shows up in the action area of the Scene Inspector if you are currently on an additional layout.


(Chris) #5

That makes sense Daniel. Thanks. I’ve included the hype document here. The video is on the 3rd scene (accessed via the “watch video” CTA) at the middle breakpoint (300 width) - simulating a medium rectangle ad unit. The video isn’t included in the 720 or 160 breakpoints.