ogplayer 1.2.1 → 1.2.2

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
@@ -64,17 +64,28 @@ el.config = {
64
64
  };
65
65
  ```
66
66
 
67
+ ## Keyboard shortcuts
68
+
69
+ While the player has focus (it takes focus on any click) the keys viewers
70
+ expect just work: `Space`/`K` play-pause, `←`/`→` and `J`/`L` seek by the seek
71
+ increment, `↑`/`↓` volume, `M` mute, `F` fullscreen, `C` subtitles, `0`–`9` jump
72
+ to 0–90 % on VOD, `Home`/`End` start/end (live edge on live), `Esc` leaves
73
+ fullscreen. Seek keys obey the live rules and stay inert during ads; modifier
74
+ chords and unmapped keys reach the page untouched. Turn it off with
75
+ `el.config = { keyboardShortcuts: false }` or change single keys with
76
+ `el.config = { keymap: { m: null, p: "toggleMute" } }`.
77
+
67
78
  ## How it ships
68
79
 
69
80
  1. **npm** (the web's Maven Central): `npm install ogplayer` — ESM module
70
81
  with TypeScript types, hls.js pulled in as a dependency. Publishing is one
71
- `npm publish` from CI; scoped to the `@ogplayer` org.
82
+ `scripts/release.sh <version>` run (build, tests, tarball guard, `npm publish`).
72
83
  2. **CDN script tag** for no-build websites: `dist/ogplayer.global.js` is a
73
84
  single self-contained file (hls.js included) exposing `window.OGPlayerSDK`.
74
- Hosted on our own domain (e.g. `cdn.ogplayer.tv`) or jsDelivr once public.
85
+ Served straight from the npm package via unpkg (or any CDN mirror of npm).
75
86
 
76
87
  ```html
77
- <script src="https://cdn.ogplayer.tv/0.1.0/ogplayer.global.js"></script>
88
+ <script src="https://unpkg.com/ogplayer@1.2.2/dist/ogplayer.global.js"></script>
78
89
  <script>
79
90
  const player = new OGPlayerSDK.OGPlayer();
80
91
  document.querySelector("og-player").player = player;
package/dist/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export { OGPlayerElement, defineOGPlayerElement, hidingAllControls, type OGUICon
14
14
  export { VerticalFeedPlayerPool, defaultVerticalFeedConfig, type OGVerticalFeedItem, type OGVerticalFeedConfig, type RailAction, type SplitAudioSource, type TextPlacement, type VerticalFeedContentFit, } from "./core/vertical-feed.js";
15
15
  export { OGVerticalFeedElement, defineOGVerticalFeedElement } from "./ui/og-vertical-feed.js";
16
16
  export type { OGControlColors, OGControlDimens } from "./ui/tokens.js";
17
+ export { DEFAULT_KEYMAP, type OGKeyAction, type OGKeymap } from "./ui/keymap.js";
17
18
  export { defaultColors, embeddedDimens, fullscreenDimens } from "./ui/tokens.js";
18
19
  /** Build timestamp of this bundle (diagnosing stale caches). */
19
20
  export declare const OGPLAYER_BUILD: string;