我想用我的#play
自定義按鈕播放我的iframe視頻。我已經將iframe放入引導響應式嵌入div中。我在看iframe中的正確內容嗎?我無法獲得使用jQuery播放的iframe視頻
JS:
$(document).ready(function ($) {
$('#play').click(function() { //custom button id
$('iframe').contents().find('#wistia_video').get(0).play();
$('.row.grey, .row.header').hide(); //hides elements over htevideo
});
});
HTML:
<div class="embed-responsive embed-responsive-4by3">
<iframe src="//fast.wistia.net/embed/iframe/b4nym2w6dx" allowtransparency="true"
frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed"
allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen
msallowfullscreen width="595" height="253"></iframe>
</div>
的iFrame iports它的class和id動態,所以我不能張貼在這裏。
跨域IFRAME? –
是的,這是正確的。 – Dimoff
所以閱讀:http://stackoverflow.com/questions/3076414/ways-to-circumvent-the-same-origin-policy –