首页 > 解决方案 > 使用 .txt 文件作为文本文件位于 Google Drive 上的字幕中的文本源?

问题描述

我想使用位于 Google Drive 上的 .txt 文件作为字幕的文本源。我无法弄清楚完成此任务的正确方法。我想用我的源文件替换以下代码中的静态文本。

<html>
<head>


     <meta name="viewport" content="width=device-width">
</head>
<!-- CSS Code -->
<style>
.GeneratedMarquee {
font-family:Helvetica, sans-serif;
font-size:2em;
line-height:1.3em;
color:#ffffff;
background-color:#000000;
padding:.2em;

}
</style>
<body style="background-color:black">
<!-- HTML Code -->
    <video autoplay loop muted playsinline width="90%" height="90%" name="media" class="center">
    <source src="https://drive.google.com/uc?export=download&id=1d5M6i3z0mI5L1mu0kgqdGGi3tiGqHASJ" type='video/mp4'>
    </video>

    <marquee class="GeneratedMarquee" direction="left" scrollamount="8" behavior="scroll">Replace this with txt file on Google Drive</marquee>

</body>
</html>

标签: htmlgoogle-drive-apimarquee

解决方案


Google Drive API 允许您创建利用 Google Drive 云存储的应用程序。您可以开发与 Google Drive 集成的应用程序,并使用 Google Drive API 在您的应用程序中创建强大的功能。

Google drive API 不适合用作文件服务器。它只是一个文件存储系统。你正在尝试做的事情是行不通的。您将无法授权单击该链接的人访问该文件。

您应该考虑将文件存储在您自己的文件服务器上。


推荐阅读