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

Bind Javascript how to?

$
0
0

Never going to say I'm the best programmer out there, but I want to try to figure something out so I can get a script to work.

 

Now, I'm very familiar with script loading via YepNope and similar so you can run various scripts from other webpages. But what about scripts that are meant to be embedded directly on the page?

 

That's my current issue trying to embed the API from Wistia. If you're not familiar with them, they're a video hosting service for businesses. And it's a pretty cool service and their API's offer a lot of functionality.

 

Now there's 3 ways to embed their videos onto a site. The first is via an iFrame, the second is via oEmbed (like for WordPress) and the third is script placed directly in the webpage calling the APi. It looks like this.

 

 

wistiaPlaylist = Wistia.playlist("abcdefgh12345", {

  version: "v1",

  theme: "tab",

  loop: true,

  videoOptions: {

    playButton: false,

    smallPlayButton: false,

    playbar: false,

    fullscreenButton: false,

    autoPlay: true,

    videoWidth: "640",

    videoHeight: "360"

  },

  media_0_0: {

    autoPlay: true,

    controlsVisibleOnLoad: false

  }

});

 

What I'm attempting to accomplish is to take that script and place it directly into my Edge Animate project. I know there's a number of options in the An API for binding a script like this, but I'm unclear as to how to use them. How would I take that code and incorporate it into my project? Would I use bindElementAction? bindTriggerAction? bindAPI? None of these?              


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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