如何流式传输存储在Google云存储桶中的视频?

编程入门 行业动态 更新时间:2024-10-09 00:43:57
本文介绍了如何流式传输存储在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云存储桶中的视频?

本文发布于:2023-11-24 14:05:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1625520.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:流式   视频   Google

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!