Add YouTube Parameters into Shortcode for iFrame Embed

I have a shortcode specifically for adding YouTube embeds that is written like so:

// [iframe src="" scrolling="no" class="dynamicIframe" allowfullscreen="" style=""]
add_shortcode( 'iframe', 'anc_shortcode_iframe' );
function anc_shortcode_iframe( $atts, $content = null ) {

extract(shortcode_atts(array(
    'src'               => '',
    'scrolling'         => '',
    'class'             => '',
    'allowfullscreen'   => '',
    'style'             => ''
), $atts ) );

return '';

}

I’d like to add some default parameters in to all videos and can’t seem to make it work. Something like

?rel=0&list=youtubeplaylistid


Source: stackoverflow-php

How to get links in iframe to open with a function?

I have an iframe that loads a list with links from another domain, and I do not want to change the links adress, but I want to change them so they get a onclick function as below.
Is this possible at all?

The links in the iframe looks like this.

Add JWT token to assets within an iFrame

So I am currently working on merging an old legacy system into a new system. The system loads a .HTML file in an iFrame using an API proxy.

http://{domain}/api/proxy/index.html?token={token}

That is secure and nailed down. The only issue is within the .HTML file none of the assets have the token. So when it tries to load an image it looks like this (without a token).

http://{domain}/api/proxy/thumbnail.jpg

My first answer was to append the token to all URLs within the .HTML file. This worked, however other assets might be loaded in via JavaScripts on the page. So say you have a script called “index.js” it might try and load a file into a div but then that image would not have the token so it return 401.

Is there anyway of intercepting each request between the iFrame and the endpoint to add the token to it?

I am using Laravel/PHP but it doesn’t really matter just as long as the solution is in PHP or JS.

Thanks.


Source: stackoverflow-php

Disable Download flash file popup

I’m building a website and one of my pages has an iframe which contains a flash file.

I’m including this iframe like this :

http://test.com/aflashanimation.html

So in aflashanimation.html there’s a swf object.

But when I the website I’m building with Firefox or IE, a popup appears telling me to download the swf file.

I don’t know how to get rid of that popup.

Thanks for your help !


Source: stackoverflow-javascript