0

我想在文本框中输入一个 url,并能够将该 url 镜像到视频 html。示例网址:http ://www.example.com/video.mp4

我认为这应该可以使用 js。这就是 html 最初的样子

<input type="text" value="" />
<video width="320" height="240">
    <source type="video/mp4" src=""/>
</video>

输入网址后,html 将如下所示。

<input type="text" value="http://www.example.com/video.mp4" />
<video width="320" height="240">
    <source type="video/mp4" src="http://www.example.com/video.mp4"/>
</video>

然后,我将扩展它以支持具有三个文本字段的所有三种视频格式。

4

0 回答 0