如何使嵌入标签显示视频而不是下载它们?

huangapple go评论57阅读模式
英文:

How do I get my embed tag to display videos instead of downloading them?

问题

我的嵌入标签一直在下载视频而非显示它。

我尝试过更改标签的文件类型,但它只是以不同格式下载。我想让标签显示视频。以下是我的代码。

<embed type="video/mp4" src="videos/ymcaHome.mp4" width="400" height="300">
英文:

My embed tag keeps downloading the video instead of displaying it.

I have tried changing the file type of the tag, but it just downloads it in a different format. I want the tag to display the video. Here's my code below.

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

&lt;embed type=&quot;video/mp4&quot; src=&quot;videos/ymcaHome.mp4&quot; width=&quot;400&quot; height=&quot;300&quot;&gt;

<!-- end snippet -->

答案1

得分: 0

你可以通过将视频的 URL 或路径指定为 src 属性值来实现。就像这样:

<embed src="your_video_file_url.mp4" type="video/mp4" width="640" height="360">
英文:

You can do so by specifying the video url or the path as the src attribute value. Like this:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

&lt;embed src=&quot;your_video_file_url.mp4&quot; type=&quot;video/mp4&quot; with=&quot;640&quot; height=&quot;360&quot;&gt;

<!-- end snippet -->

huangapple
  • 本文由 发表于 2023年6月1日 20:41:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/76381970.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定