Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Embedding a video via tag versus

$
0
0

I've sucessfully embedded a youTube video before via an <iframe>, but I am having difficulty embedding a video through a <script> tag. The third party video platform that I am having to go through only offers this method of embedding so I am stuck with trying to come up with a workaround.

 

Here's my code (inserted into document.compositionReady):

 

var familyVideo = document.createElement('script');
familyVideo.type = "text/javascript";
familyVideo.src = "URL HERE"// note: URL is propietary so I cannot share that with the forum
sym.$("familyVideoWrap").append(familyVideo);

 

 

I know that with youTube videos, the code is something as follows:

 

var youtubevid = $("<iframe/>");
sym.getSymbol("intro2").$("videoContainer").append(youtubevid);
youtubevid.attr('type', 'text/html');
youtubevid.attr('width', '387');
youtubevid.attr('height', '218');
youtubevid.attr('src', 'URL HERE');
youtubevid.attr('frameborder', '0');
youtubevid.attr('allowfullscreen', '0');

 

I've tried both methods (swapping <iframe> with <script> in the second method), and neither seem to work. Is there some sort of hold up that I am not aware of that allows us to embed <iframes> into our Edge elements, but not <script> tags? Any help is greatly appreciated.


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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