0
說,我有一個vtt文件,我想從中獲取所有提示及其相關屬性,如startjit,endTime等。從nodejs的vtt文件中獲取所有提示及其屬性
我已經用所有關鍵字搜索過了,例如'javascript解析vtt文件',但結果都是關於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 --> 00:00:24.000
Which is why we are bringing TV, internet and phone together in <c.highlight>one</c> super package
6
00:00:24.500 --> 00:00:26.000
<c.highlight>One</c> simple way to get everything
7
00:00:26.500 --> 00:00:27.500 L:12%
UPC
8
00:00:28.000 --> 00:00:30.000 L:75%
Simply for <u>everyone</u>