Skip to content

Commit 244c2b5

Browse files
authored
Merge pull request #13 from codeit-ninja/v2.5.10
v2.5.10
2 parents d9b7b48 + 5a34c78 commit 244c2b5

File tree

4 files changed

+6
-15
lines changed

4 files changed

+6
-15
lines changed

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
# 💐 Add support for SRT subtitles in HTML5 video elements
22

3+
> ✅ This package uses **0** external dependencies!
4+
35
Officially only VTT files are supported by the HTML5 track element.
46
This package will convert your SRT subtitles on the fly to VTT subtitles.
57

6-
### 👉 What's new in v2?
7-
- Updated code base to modern JavaScript
8-
- Added [TextDecoder](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder?retiredLocale=nl) to support all kinds of encodings
9-
- SRT can be encoded in [multiple formats](https://en.wikipedia.org/wiki/SubRip#Text_encoding), while WebVTT should only be [encoded in UTF-8](https://www.w3.org/TR/webvtt1/#file-structure) format.
10-
- Does not break the TextTrack selection in video elements
11-
- The previous version broke the TextTrack selection in the captions' menu. So when you had multiple captions you could not switch between them.
12-
- Is available as a package (ES module) or as a ready to use script
13-
- No external dependencies
14-
- More functionality included
15-
- TypeScript support
16-
178
### Installation
189

1910
As a NPM package, works both in the browser and NodeJS

bun.lockb

18.3 KB
Binary file not shown.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
<track label="English" kind="subtitles" srclang="en" src="assets/subtitle.srt" default />
1212
</video>
1313
</div>
14-
<script type="module" src="main.js"></script>
14+
<script type="module" src="browser.js"></script>
1515
</body>
1616
</html>

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "srt-support-for-html5-videos",
3-
"version": "2.4.10",
3+
"version": "2.5.10",
44
"repository": "https://github.com/codeit-ninja/SRT-Support-for-HTML5-videos",
55
"type": "module",
66
"main": "main.js",
@@ -20,7 +20,7 @@
2020
},
2121
"devDependencies": {
2222
"rollup-plugin-cleanup": "^3.2.1",
23-
"typescript": "^4.9.4",
24-
"vite": "^3.0.0"
23+
"typescript": "^5.3.3",
24+
"vite": "^5.1.1"
2525
}
2626
}

0 commit comments

Comments
 (0)