@oddin-gg/havik-player 1.6.0 → 1.6.1
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 +6 -6
- package/dist/havik-player.global.js +1 -1
- package/dist/havik-player.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/examples/vanilla.html +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,9 +52,9 @@ import { createPlayer } from '@oddin-gg/havik-player';
|
|
|
52
52
|
|
|
53
53
|
const player = await createPlayer({
|
|
54
54
|
video: document.querySelector('video')!,
|
|
55
|
-
baseUrl: 'https://
|
|
55
|
+
baseUrl: 'https://feed-dev.oddin-video.gg',
|
|
56
56
|
matchUrn: 'od:match:1234',
|
|
57
|
-
credential: { apiKey: '
|
|
57
|
+
credential: { apiKey: 'pk_test_…' },
|
|
58
58
|
autoplay: true,
|
|
59
59
|
muted: true, // required for reliable autoplay
|
|
60
60
|
waitForLive: true, // arm on an upcoming match, auto-play at go-live
|
|
@@ -101,9 +101,9 @@ The SDK resolves the stream and gives you the DRM header helpers; you own the
|
|
|
101
101
|
```ts
|
|
102
102
|
import { resolveStream, licenseRequestHeaders, getDeviceId } from '@oddin-gg/havik-player';
|
|
103
103
|
|
|
104
|
-
const cred = { apiKey: '
|
|
104
|
+
const cred = { apiKey: 'pk_test_…' };
|
|
105
105
|
const stream = await resolveStream({
|
|
106
|
-
baseUrl: 'https://
|
|
106
|
+
baseUrl: 'https://feed-dev.oddin-video.gg',
|
|
107
107
|
matchUrn: 'od:match:1234',
|
|
108
108
|
credential: cred,
|
|
109
109
|
waitForLive: true,
|
|
@@ -143,8 +143,8 @@ import { mountEmbed } from '@oddin-gg/havik-player';
|
|
|
143
143
|
|
|
144
144
|
const embed = mountEmbed({
|
|
145
145
|
container: document.querySelector('#player')!,
|
|
146
|
-
src: 'https://player.oddin.gg/embed/', // the hosted embed page
|
|
147
|
-
baseUrl: 'https://
|
|
146
|
+
src: 'https://player-dev.oddin-video.gg/embed/', // the hosted embed page
|
|
147
|
+
baseUrl: 'https://feed-dev.oddin-video.gg',
|
|
148
148
|
matchUrn: 'od:match:1234',
|
|
149
149
|
// apiKey is DEV-ONLY here; in production the hosted page injects it server-side.
|
|
150
150
|
onEvent: (msg) => console.log(msg), // { type: 'oddin:ready' | 'oddin:state' | 'oddin:waiting' | 'oddin:stats' | 'oddin:error' }
|