本文介绍了如何流式传输存储在Google云存储桶中的视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已将视频存储在Google云存储浏览器中.我想在前端播放这些视频.为此,我需要视频URL.但是问题是,每当我导航到该URL时,文件都会被下载.
I have stored videos on google cloud storage browser. I want to play these videos on my frontend. For that I need the video URL. But the problem is, whenever I navigate to that URL, the file gets downloaded.
我该怎么做才能获取存储对象的流式视频URL?
What do I need to do to get the streaming video URL of my stored object?
推荐答案我使用video.js做到了这一点.
I accomplished this using video.js.
<html> <head> <link href="unpkg/video.js/dist/video-js.css" rel="stylesheet"> <style> .video-js { width: 600px; height: 600px; } </style> </head> <body> <video-js controls data-setup="{}"> <source src="storage.cloud.google/bucketName/folderName/recordingName.flv" type="video/flv"> </video-js> <script src="unpkg/video.js/dist/video.min.js"></script> <script src="unpkg/videojs-flash/dist/videojs-flash.min.js"></script> </body> </html>
更多推荐
如何流式传输存储在Google云存储桶中的视频?
发布评论