@instructure/studio-player 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # Test Assets
2
+
3
+ This directory contains static assets used for testing and Storybook development.
4
+
5
+ ## Caption Files
6
+
7
+ The VTT (WebVTT) caption files in this directory are used for testing the Studio Player's caption functionality in a reliable, offline manner.
8
+
9
+ ### Files
10
+
11
+ - `test-captions-en.vtt` - English captions for test videos
12
+ - `test-captions-es.vtt` - Spanish captions for test videos
13
+
14
+ ### Usage
15
+
16
+ These files are served by Storybook via the `staticDirs` configuration and are available at:
17
+ - `/test-captions-en.vtt`
18
+ - `/test-captions-es.vtt`
19
+
20
+ They are used in:
21
+ - [src/StudioPlayer/test/captions.ts](../src/StudioPlayer/test/captions.ts) - For Storybook stories
22
+ - [tests/utils/youtubeCaptions.ts](../tests/utils/youtubeCaptions.ts) - For Playwright tests
23
+
24
+ ### Benefits
25
+
26
+ Using local caption files instead of external CDNs provides:
27
+ 1. **Reliability** - Tests don't fail due to external network issues
28
+ 2. **Speed** - Faster test execution without network latency
29
+ 3. **Offline Development** - Work without internet connectivity
30
+ 4. **Consistency** - Same caption data across all environments
31
+ 5. **CI/CD Stability** - No dependency on third-party availability
32
+
33
+ ### Updating Caption Files
34
+
35
+ If you need to update or add new caption files:
36
+
37
+ 1. Add the `.vtt` file to this directory
38
+ 2. Update the caption metadata in test files to reference the new file path
39
+ 3. Commit the caption file to git
40
+
41
+ ### Format
42
+
43
+ These files use the WebVTT (Web Video Text Tracks) format, which is the standard for HTML5 video captions. Example:
44
+
45
+ ```vtt
46
+ WEBVTT
47
+ Kind: captions
48
+ Language: en
49
+
50
+ 00:00:17.375 --> 00:00:19.458
51
+ Hello, Mr.Snail!
52
+
53
+ 00:00:19.458 --> 00:00:22.333
54
+ Aw, you cute little cornu aspersum.
55
+ ```
56
+
57
+ For more information on the WebVTT format, see: https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API