stormcloud-video-player 0.1.2 → 0.1.4

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/README.md CHANGED
@@ -27,6 +27,31 @@ npm install stormcloud-video-player hls.js
27
27
 
28
28
  This library targets modern browsers (ES2020) and expects a DOM environment.
29
29
 
30
+ ### CDN Usage
31
+
32
+ You can also use the library directly from CDN without npm:
33
+
34
+ ```html
35
+ <!-- Use latest version (recommended for development) -->
36
+ <script src="https://cdn.jsdelivr.net/npm/stormcloud-video-player/dist/stormcloud-vp.min.js"></script>
37
+
38
+ <script>
39
+ // The library is available as window.StormcloudVideoPlayer
40
+ const { StormcloudVideoPlayer } = window.StormcloudVideoPlayer;
41
+
42
+ const video = document.getElementById("video");
43
+ const player = new StormcloudVideoPlayer({
44
+ videoElement: video,
45
+ src: "https://example.com/live/playlist.m3u8",
46
+ autoplay: true,
47
+ muted: true,
48
+ allowNativeHls: false,
49
+ });
50
+
51
+ player.load();
52
+ </script>
53
+ ```
54
+
30
55
  ---
31
56
 
32
57
  ## Quick start