html - 使用 .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>
解决方案
Google Drive API 允许您创建利用 Google Drive 云存储的应用程序。您可以开发与 Google Drive 集成的应用程序,并使用 Google Drive API 在您的应用程序中创建强大的功能。
Google drive API 不适合用作文件服务器。它只是一个文件存储系统。你正在尝试做的事情是行不通的。您将无法授权单击该链接的人访问该文件。
您应该考虑将文件存储在您自己的文件服务器上。
推荐阅读
- google-maps-api-3 - 如何使用 Google Geocoding API 自动缩放以查看多个标记?
- lua - 罗布洛克斯 LUA。在物体附近按下某个键
- c++ - glm 如何避免在另一个(未连接的?)文件中声明一个函数内联并内联定义它?
- c# - 对 I/O 绑定操作使用异步函数
- python - 调试 NumPy 类型错误?[从以前的 ValueError 编辑]
- java - java.lang.String android.net.Uri.toString() 在空对象引用上,LogCat 在第 202 行显示此错误
- python - 如何在不继承属性值的情况下在 Python 中的 for 循环内创建对象列表
- java - Java比较创建的链表
- google-cloud-platform - GCP 上的无服务器架构和数据驻留问题
- python - 从 Python 函数调用 `dt.` 类型