Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 87055

Re: Audio from video won't stop playing in the background

$
0
0

I figured out how to reset the Youtube video upon hiding thanks to Heathrowe's answer and FigFrance's contribution to the thread found here:

 

https://forums.adobe.com/message/4979969#4979969

 

The secret was adding .empty() to my video container.  Here is my functioning button code:


Show Video:

//code to embed youtube into symbol

var youtube = $("<iframe/>");

sym.$("video").empty().append(youtube);

youtube.attr('type', 'text/html');

youtube.attr('width', '640');

youtube.attr('height', '360');

youtube.attr('src', 'https://www.youtube.com/embed/MyFv6UKsW70?rel=0');

youtube.attr('frameborder', '1');

youtube.attr('allowfullscreen', '0');

 

 

// Show an element

sym.$("video").show();

 

 

Hide Video:

sym.$("video").empty();

 

// Hide an element

sym.$("video").hide();

 

Brandon


Viewing all articles
Browse latest Browse all 87055

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>