Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/407.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用html5或javascript禁用iframe中的自动播放_Javascript_Jquery_Html - Fatal编程技术网

使用html5或javascript禁用iframe中的自动播放

使用html5或javascript禁用iframe中的自动播放,javascript,jquery,html,Javascript,Jquery,Html,如何使用javascript/jquery或属性HTML5禁用iframe中的自动播放,我已经禁用了iframe中的自动播放 代码: <div id="vds" class="embed-responsive embed-responsive-16by9" style="margin-top: -100px;"> <iframe class="embed-responsive-item" {% if profil.pageAccueil %}{%if pro

如何使用javascript/jquery或属性HTML5禁用iframe中的自动播放,我已经禁用了iframe中的自动播放

代码:

  <div id="vds" class="embed-responsive embed-responsive-16by9" style="margin-top: -100px;">
        <iframe class="embed-responsive-item" {% if profil.pageAccueil %}{%if profil.pageAccueil.video!=""%}src="{{profil.pageAccueil.video}}"{%else%} {{pageAccueil.video}} {%endif%}{%endif%}></iframe>
  </div>

更改您的

<div id="vds" class="embed-responsive embed-responsive-16by9" style="margin-top: -100px;">
<iframe class="embed-responsive-item" {% if profil.pageAccueil %}{%if profil.pageAccueil.video!=""%}src="{{profil.pageAccueil.video}}"{%else%} {{pageAccueil.video}} {%endif%}{%endif%}></iframe>
</div>


type=“视频/mp4”>

您能显示您的代码吗?请阅读我编辑我的问题,我让我的代码尝试使用视频标签代替iframe。使用视频标签我有这个问题
  <div id="vds" class="embed-responsive embed-responsive-16by9" style="margin-top: -100px;"> 
      <video class="class="embed-responsive-item"" width="600" height="400">
          <source {% if profil.pageAccueil %}{%if profil.pageAccueil.video!=""%}src="{{profil.pageAccueil.video}}"{%else%} {{pageAccueil.video}} {%endif%}{%endif%}> type="video/mp4">
      </video>
  </div>