在html中加入Google Drive上的视频流

BabbleDay posted @ 2015年7月15日 23:55 in Web Development with tags Google Drive video stream html , 1346 阅读

当然,在网页中加入媒体可以使用静态文件

 

<video controls>
        <source src="{% static "video/video_name.m4v" %}">
</video>

 

要加入Google Drive上的视频流就要先把视频上传到Google Drive,然后把访问权限调整为public(任何人均能访问),必要时需将所在文件夹也设为public。

之后就是要获得视频流的url了。Google Drive直接分享的链接并不是直接的视频文件,但是却包含了视频文件的ID:

https://drive.google.com/open?id=blabla

我们需要记录下这个ID,然后在html文件中写:

 

<video controls>
        <source src="https://www.googledrive.com/host/the_ID_you_copied"/>
        Your browser does not support the video tag.
</video>

注意,url的https不能省略,否则就无法加载出视频。

Avatar_small
Click Here To Know M 说:
2022年3月25日 21:33

I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy.

Avatar_small
Business Development 说:
2022年8月01日 21:39

Business development executive is one of the most critical roles for any organization. This role demands high communication skills and strategical thinking in order to build business proposals, client connections for business development. Business Development Executive Any Business structure of a company will have a segment or department for Business development for company’s growth and sustainable development. This is a strategic department with high ability in building client business connections and customer trust relationships. Business development executive is one of the most critical roles for any organization. This role demands high communication skills and strategical thinking in order to build business proposals.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter