<!-- Notice: Codepen requires YouTube embed/video to be muted if using autoplay which adwire adds automatically for seamless user experience. This won't be required on your website. -->

<div class="adwire-responsive">
	<iframe loading="lazy" width="560" height="315" src="https://clips.twitch.tv/embed?clip=BashfulHelpfulSalamanderPrimeMe&tt_medium=clips_api&tt_content=embed&muted=true&parent=cdpn.io&parent=codepen.io&parent=www.adwire.dev&parent=localhost" frameborder="0" scrolling="no" allowfullscreen="true" data-poster="https://clips-media-assets2.twitch.tv/AT-cm%7C473231368-preview-480x272.jpg" referrerpolicy="no-referrer"></iframe>
</div>
@charset "utf-8";

.adwire {
	--adwire-play-button-background-color-on-hover: #9146ff;
}

.adwire-responsive {
	position: relative;
	padding-bottom: 56.25%;
}

.adwire-responsive > iframe, /* original YouTube iframe */
.adwire-responsive .adwire-iframe,
.adwire-responsive .adwire {
	position: absolute;
}

.adwire-responsive > iframe, /* original YouTube iframe */
.adwire-responsive .adwire-iframe,
.adwire-responsive .adwire,
.adwire-responsive .adwire .adwire-ad,
.adwire-responsive .adwire .adwire-ad > *,
.adwire-responsive .adwire .adwire-ad iframe,
.adwire-responsive .adwire .adwire-ad video {
	width: 100% !important;
	height: 100% !important;
}
"use strict";

const AD_TAG_URL =
	"https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=";

const target = document.querySelector(
	"iframe[src^='https://clips.twitch.tv/embed?clip=']"
);

new Adwire({
	adTagUrl: AD_TAG_URL,
	cookies: true,
	mode: Adwire.Mode.INSTREAM_IFRAME_TWITCH,
	poster: target.dataset.poster,
	private: true,
	terms: true
}).run(target);

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css
  2. https://cdn.adwire.dev/latest/adwire.min.css

External JavaScript

  1. https://imasdk.googleapis.com/js/sdkloader/ima3.js
  2. https://cdn.adwire.dev/latest/adwire.min.js