0

I'm fetching data from the vimeo api and using the data.embed.html data for iframes. How would I go about changing the 'autopause=0' to 'autopause=1' after fetching the iframe?

example of an object from the vimeo api. I am getting all the html objects.

 "data": [
  {
  "embed": 
    {
     "html": "<iframe src=\"https://player.vimeo.com/video/75658473?badge=0&autopause=0&player_id=0\" 
             width=\"640\" height=\"360\" frameborder=\"0\" title=\"Vimeo Ugly Face Competition\" 
             webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>"
        },

as you can see from the object above the 'autopause' is set to 0, I want this set to 1. I'm using nodejs to get all objects from the user (100+ videos).

How would I go about changing the 'autopause' from 0 to 1 on every single iframe that I'v fetched? Whether it is on the server side (node.js) or client (angularjs) does not matter.

Kuja
  • 449
  • 6
  • 20
  • You could try using `ng-src` and looking at [this related question](http://stackoverflow.com/questions/20045150/how-to-set-an-iframe-src-attribute-from-a-variable-in-angularjs?rq=1) for how to use it. – Scott May 15 '16 at 19:22
  • I'm using the entire iframe fetched from the vimeo-api, so this wouldn't work since this assume I'm inserting src into the iframe. – Kuja May 15 '16 at 19:28

0 Answers0