视频播放器
<pre><code class="language-html"> &lt;video controls=&quot;controls&quot; preload=&quot;auto&quot; height=&quot;500&quot; width=&quot;700&quot;&gt;
&lt;source src=&quot;/upload/video.mp4&quot; type=&quot;video/mp4&quot; /&gt;
&lt;/video&gt;</code></pre>
<p>由于旧的浏览器和Internet Explorer不支持《video》元素,考虑到兼容性,我们必须为这些浏览器找到一个支持Flash文件的解决方案。不幸的是,和HTML 5音频一样,涉及到视频的文件格式,Firefox 和 Safari/Chrome 的支持方式并不相同。因此,如果你想在这个时候使用HTML 5视频,则需要创建三个视频版本。</p>
<pre><code class="language-html">&lt;video controls=&quot;controls&quot; preload=&quot;auto&quot; height=&quot;500&quot; width=&quot;700&quot;&gt;
&lt;!-- Firefox --&gt;
&lt;source src=&quot;mv.ogg&quot; type=&quot;video/ogg&quot; /&gt;
&lt;!-- Safari/Chrome--&gt;
&lt;source src=&quot;/upload/video.mp4&quot; type=&quot;video/mp4&quot; /&gt;
&lt;!-- 如果浏览器不支持video标签,则使用flash --&gt;
&lt;embed src=&quot;/upload/video.flv&quot; type=&quot;application/x-shockwave-flash&quot;
width=&quot;1024&quot; height=&quot;798&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot;&gt; &lt;/embed&gt;
&lt;/video&gt;</code></pre>
<hr />
<p><strong>框架插入视频</strong>
请修改视频地址:/upload/video.mp4</p>
<pre><code class="language-html"> &lt;iframe src=&quot;/upload/video.mp4&quot; scrolling=&quot;no&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;200&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt; </code></pre>
<p><strong>优酷视频</strong></p>
<pre><code class="language-html">&lt;iframe height=498 width=510 src=&quot;http://player.youku.com/embed/XOTA1OTA2NjAw&quot; frameborder=0 allowfullscreen&gt;&lt;/iframe&gt;</code></pre>
<p>获取方法 复制通用代码
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=6f83db7db66147c24d06c6a7ff50841a&amp;file=file.png" alt="" /></p>
<p><strong>腾讯视频</strong></p>
<pre><code class="language-html">&lt;iframe frameborder=0 src=&quot;http://v.qq.com/iframe/player.html?vid=l01480qc099&amp;tiny=0&amp;auto=0&quot; allowfullscreen&gt;&lt;/iframe&gt;</code></pre>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=355dd9aeaebf90cb2e4212375cc38036&amp;file=file.png" alt="" />
获取方法 复制通用代码
粘贴到网页文件当中,如果想自适应手机屏 可写css样式 style="width:100%;height:auto;"</p>