我的需要
html5 video 元素加载保存在不同域中的视频和 vtt 文件。
问题
vtt 未加载和错误 Text track from origin has been blocked from loading: Not at same origin as the document, and parent of track element does not have a 'crossorigin' attribute.
我的调查
我知道需要使用 CORS,以便 vtt 可以成功加载到 html5 中。
我已经在服务器端为来自任何域的请求启用了 CORS。
一些文章说添加crossorigin或添加crossorigin="anonymous"到` 元素可以完成这项工作,但它不起作用。视频根本没有加载或出现不同的错误
我把我的代码放在下面
<body>
<div class="container">
<video id="myvideo" controls preload="auto" width="640" height="264" autoplay>
<source src=http://video.dublearn.net/-KqIgE-3roMSBbiHUmLI/video.mp4 type="video/mp4"></source>
<track kind="captions" label="English" srclang="en" src=http://video.dublearn.net/-KqIgE-3roMSBbiHUmLI/video.vtt default>
</video>
</body>Run Code Online (Sandbox Code Playgroud)
我想使用FFMPEG来传输多个音频和一个视频.
材料是:
要求是:
要求如下所示.
< - short-clip-1.3gp持续时间 - > < - short-clip-2.3gp持续时间 - >
<-------------------------------------- 1.mp3 -------- --------------------------------------------->
<-------------------------------------- 1.mp4 -------- --------------------------------------------->
我使用的命令如下,但它不能按预期工作.
ffmpeg -i 1.mp4 -i 1.3gp -itsoffset 00:00:10 -i 2.3gp -i 1.mp3 -map 0:v -map 1:a -map 2:a -map 3:a -c:v copy -c:a copy result.mp4
任何提示都表示赞赏!
说,我有一个 vtt 文件,我想从中获取 nodejs 环境中的所有提示及其相关属性,例如 startTime、endTime 等。
我已经搜索了所有我能想到的关键字,比如'parse vtt file by javascript',但结果都是关于mozilla/vtt.js。但是我不需要与浏览器/窗口交互,它只是一个静态的 vtt 文件,我需要通过 JavaScript 从中提取数据。
有人能给我一些提示吗?谢谢!
示例 vtt 内容:
WEBVTT FILE
1
00:00:03.500 --> 00:00:05.000 D:vertical A:start
Everyone wants the most from life
2
00:00:06.000 --> 00:00:09.000 A:start
Like internet experiences that are rich <b>and</b> entertaining
3
00:00:11.000 --> 00:00:14.000 A:end
Phone conversations where people truly <c.highlight>connect</c>
4
00:00:14.500 --> 00:00:18.000
Your favourite TV programmes ready to watch at the touch of a button
5
00:00:19.000 --> …Run Code Online (Sandbox Code Playgroud) 我users在 Firebase 中有一个节点,用于存储每个用户的信息,但不包括 displayName andfirebase auth 数据库中的 email`。
有一天,我意识到我也需要用户displayName和email信息。例如,在另一个用户创建的页面中,我想显示该用户的 displayName 和电子邮件。
鉴于
displayName并且email不存储在users节点下, 是否可以从 firebase auth 数据库(普通用户或管理员)检索用户的displayName和email?或者我应该为已经在 firebase 中创建的用户做什么?
感谢:D
我使用下面的代码片段System.DirectoryServices.AccountManagement在 ActiveDirectory 中搜索用户。
在user.Name成功返回,但我怎么能检索其他属性从AD用户,喜欢msExchRecipientTypeDetails,因为它不是在VisualStudio中2015年的情报显示?
using (PrincipalContext adPrincipalContext = new PrincipalContext(ContextType.Domain, DOMAIN, USERNAME, PASSWORD))
{
UserPrincipal userPrincipal = new UserPrincipal(adPrincipalContext);
userPrincipal.SamAccountName = "user-ID";
PrincipalSearcher search = new PrincipalSearcher(userPrincipal);
foreach (var user in search.FindAll())
{
Console.WriteLine("hei " + user.Name);
// how to retrive other properties from AD like msExchRecipientTypeDetails??
}
}
Run Code Online (Sandbox Code Playgroud)