@capgo/capacitor-jw-player 0.0.13 → 0.0.17

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.
@@ -6,67 +6,343 @@ const JwPlayer = core.registerPlugin('JwPlayer', {
6
6
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.JwPlayerWeb()),
7
7
  });
8
8
 
9
+ /// <reference types="jwplayer" />
9
10
  class JwPlayerWeb extends core.WebPlugin {
11
+ constructor() {
12
+ super(...arguments);
13
+ // Track if our overlay is currently displayed
14
+ this.overlayDiv = null;
15
+ // Store JW Player instance
16
+ this.jwPlayerInstance = null;
17
+ }
18
+ // Generate a UUID that works in all browsers
19
+ generateUUID() {
20
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
21
+ const r = Math.random() * 16 | 0;
22
+ const v = c === 'x' ? r : (r & 0x3 | 0x8);
23
+ return v.toString(16);
24
+ });
25
+ }
10
26
  async initialize(options) {
11
27
  console.log('INITIALIZE', options);
28
+ if (!options.playerUrl) {
29
+ throw new Error('playerUrl is required for web implementation');
30
+ }
31
+ const playerUrl = options.playerUrl;
32
+ await new Promise((resolve, reject) => {
33
+ const script = document.createElement('script');
34
+ script.src = playerUrl;
35
+ script.onload = () => resolve(null);
36
+ script.onerror = () => reject(new Error('Failed to load JW Player script'));
37
+ document.head.appendChild(script);
38
+ });
39
+ // Check if jwplayer() is available globally
40
+ if (typeof window.jwplayer !== 'function') {
41
+ throw new Error('JW Player script failed to load properly - jwplayer() function not found');
42
+ }
43
+ }
44
+ async play(options) {
45
+ if (!window.jwplayer) {
46
+ throw new Error('JW Player script failed to load properly - jwplayer() function not found');
47
+ }
48
+ // Create fullscreen overlay div
49
+ if (this.overlayDiv) {
50
+ // Remove existing overlay if it exists
51
+ document.body.removeChild(this.overlayDiv);
52
+ this.overlayDiv = null;
53
+ }
54
+ // Create new overlay div (this will be our red background container)
55
+ this.overlayDiv = document.createElement('div');
56
+ // Style the outer overlay to take up 100% of screen
57
+ Object.assign(this.overlayDiv.style, {
58
+ position: 'fixed',
59
+ top: '0',
60
+ left: '0',
61
+ width: '100%',
62
+ height: '100%',
63
+ zIndex: '9999',
64
+ display: 'flex',
65
+ });
66
+ // Create the inner div for the player
67
+ const playerDiv = document.createElement('div');
68
+ const uniqueId = this.generateUUID();
69
+ const id = `jw-player-${uniqueId}`;
70
+ playerDiv.id = id;
71
+ // Style the inner player div
72
+ Object.assign(playerDiv.style, {
73
+ width: '100%',
74
+ height: '100%',
75
+ margin: '0 auto'
76
+ });
77
+ // Create close (X) button
78
+ const closeButton = document.createElement('button');
79
+ closeButton.textContent = 'X';
80
+ Object.assign(closeButton.style, {
81
+ position: 'absolute',
82
+ top: '10px',
83
+ left: '10px',
84
+ background: 'rgba(0, 0, 0, 0.5)',
85
+ color: 'white',
86
+ border: 'none',
87
+ borderRadius: '50%',
88
+ width: '30px',
89
+ height: '30px',
90
+ fontSize: '16px',
91
+ fontWeight: 'bold',
92
+ cursor: 'pointer',
93
+ zIndex: '10000',
94
+ display: 'flex',
95
+ justifyContent: 'center',
96
+ alignItems: 'center',
97
+ padding: '0'
98
+ });
99
+ // Add click handler to close button
100
+ closeButton.addEventListener('click', () => {
101
+ if (this.jwPlayerInstance) {
102
+ this.jwPlayerInstance.remove();
103
+ this.jwPlayerInstance = null;
104
+ }
105
+ if (this.overlayDiv && this.overlayDiv.parentNode) {
106
+ document.body.removeChild(this.overlayDiv);
107
+ this.overlayDiv = null;
108
+ this.notifyListeners('playerDismissed', {});
109
+ }
110
+ });
111
+ // Append inner div to the red overlay
112
+ this.overlayDiv.appendChild(playerDiv);
113
+ // Append close button to overlay
114
+ this.overlayDiv.appendChild(closeButton);
115
+ // Append outer div to body
116
+ document.body.appendChild(this.overlayDiv);
117
+ // Setup player on the inner div
118
+ this.jwPlayerInstance = jwplayer(id).setup({
119
+ playlist: options.mediaType === 'playlist' ? options.mediaUrl : [{ file: options.mediaUrl, title: 'Video' }],
120
+ width: '100%',
121
+ height: '100%',
122
+ autostart: options.autostart || false,
123
+ controls: true,
124
+ displaytitle: false,
125
+ });
126
+ // Add unified event handlers to match iOS and Android
127
+ this.setupEventHandlers();
12
128
  return;
13
129
  }
14
- async play(_options) {
15
- throw this.unimplemented('JW Player is not available in web.');
130
+ // Setup unified event handlers to match iOS and Android
131
+ setupEventHandlers() {
132
+ if (!this.jwPlayerInstance)
133
+ return;
134
+ // Ready event
135
+ this.jwPlayerInstance.on('ready', () => {
136
+ this.notifyListeners('ready', {});
137
+ });
138
+ // Error event
139
+ this.jwPlayerInstance.on('error', (error) => {
140
+ this.notifyListeners('error', {
141
+ message: (error === null || error === void 0 ? void 0 : error.message) || 'Unknown error',
142
+ code: (error === null || error === void 0 ? void 0 : error.code) || -1
143
+ });
144
+ });
145
+ // Play event
146
+ this.jwPlayerInstance.on('play', () => {
147
+ this.notifyListeners('play', { reason: 'external' });
148
+ });
149
+ // Pause event
150
+ this.jwPlayerInstance.on('pause', () => {
151
+ this.notifyListeners('pause', { reason: 'external' });
152
+ });
153
+ // Complete event
154
+ this.jwPlayerInstance.on('complete', () => {
155
+ this.notifyListeners('complete', {});
156
+ });
157
+ // Seek event
158
+ this.jwPlayerInstance.on('seek', (event) => {
159
+ this.notifyListeners('seek', {
160
+ position: event.position,
161
+ offset: event.offset
162
+ });
163
+ });
164
+ // Time event (throttled to not fire too often)
165
+ let lastTimeUpdate = 0;
166
+ this.jwPlayerInstance.on('time', (event) => {
167
+ const now = Date.now();
168
+ // Throttle to once per second max
169
+ if (now - lastTimeUpdate > 1000) {
170
+ this.notifyListeners('time', {
171
+ position: event.position,
172
+ duration: event.duration
173
+ });
174
+ lastTimeUpdate = now;
175
+ }
176
+ });
177
+ // Playlist item event
178
+ this.jwPlayerInstance.on('playlistItem', (event) => {
179
+ var _a;
180
+ this.notifyListeners('playlistItem', {
181
+ index: event.index,
182
+ title: ((_a = event.item) === null || _a === void 0 ? void 0 : _a.title) || ''
183
+ });
184
+ });
185
+ // Playlist complete event
186
+ this.jwPlayerInstance.on('playlistComplete', () => {
187
+ this.notifyListeners('playlistComplete', {});
188
+ });
189
+ // Controls visibility event
190
+ this.jwPlayerInstance.on('controls', (event) => {
191
+ this.notifyListeners('controlsChanged', {
192
+ visible: event.controls
193
+ });
194
+ });
16
195
  }
17
196
  async pause() {
18
- throw this.unimplemented('JW Player is not available in web.');
197
+ if (this.jwPlayerInstance) {
198
+ this.jwPlayerInstance.pause();
199
+ // Event is fired by the event handler
200
+ return;
201
+ }
202
+ throw new Error('Player not active');
19
203
  }
20
204
  async stop() {
21
- throw this.unimplemented('JW Player is not available in web.');
205
+ if (this.jwPlayerInstance) {
206
+ this.jwPlayerInstance.remove();
207
+ this.jwPlayerInstance = null;
208
+ if (this.overlayDiv && this.overlayDiv.parentNode) {
209
+ document.body.removeChild(this.overlayDiv);
210
+ this.overlayDiv = null;
211
+ }
212
+ // The complete event will be triggered by the JW Player event handler,
213
+ // but since we're removing the player instance, we need to send it manually here
214
+ this.notifyListeners('playerDismissed', {});
215
+ return;
216
+ }
217
+ throw new Error('Player not active');
22
218
  }
23
- async seekTo(_options) {
24
- throw this.unimplemented('JW Player is not available in web.');
219
+ async seekTo(options) {
220
+ if (this.jwPlayerInstance) {
221
+ this.jwPlayerInstance.seek(options.time);
222
+ return;
223
+ }
224
+ throw new Error('Player not active');
25
225
  }
26
- async setVolume(_options) {
27
- throw this.unimplemented('JW Player is not available in web.');
226
+ async setVolume(options) {
227
+ if (this.jwPlayerInstance) {
228
+ this.jwPlayerInstance.setVolume(options.volume);
229
+ return;
230
+ }
231
+ throw new Error('Player not active');
28
232
  }
29
233
  async getPosition() {
30
- throw this.unimplemented('JW Player is not available in web.');
234
+ if (this.jwPlayerInstance) {
235
+ return { position: this.jwPlayerInstance.getPosition() };
236
+ }
237
+ throw new Error('Player not active');
31
238
  }
32
239
  async getState() {
33
- throw this.unimplemented('JW Player is not available in web.');
240
+ if (!this.jwPlayerInstance) {
241
+ // IDLE (no player)
242
+ return { state: 0 };
243
+ }
244
+ // Convert JW Player state to our state format
245
+ // jwplayer: BUFFERING(3), IDLE(0), COMPLETE(4), PAUSED(2), PLAYING(1)
246
+ // our API: IDLE(0), BUFFERING(1), PLAYING(2), PAUSED(3), COMPLETE(4)
247
+ const jwState = this.jwPlayerInstance.getState();
248
+ let state = 0;
249
+ switch (jwState) {
250
+ case 'buffering':
251
+ state = 1;
252
+ break;
253
+ case 'playing':
254
+ state = 2;
255
+ break;
256
+ case 'paused':
257
+ state = 3;
258
+ break;
259
+ default: state = 0; // idle
260
+ }
261
+ return { state };
34
262
  }
35
- async setSpeed(_options) {
36
- throw this.unimplemented('JW Player is not available in web.');
263
+ async setSpeed(options) {
264
+ if (this.jwPlayerInstance) {
265
+ this.jwPlayerInstance.setPlaybackRate(options.speed);
266
+ return;
267
+ }
268
+ throw new Error('Player not active');
37
269
  }
38
- async setPlaylistIndex(_options) {
39
- throw this.unimplemented('JW Player is not available in web.');
270
+ async setPlaylistIndex(options) {
271
+ if (this.jwPlayerInstance) {
272
+ this.jwPlayerInstance.playlistItem(options.index);
273
+ return;
274
+ }
275
+ throw new Error('Player not active');
40
276
  }
41
- async loadPlaylist(_options) {
42
- throw this.unimplemented('JW Player is not available in web.');
277
+ async loadPlaylist(options) {
278
+ if (this.jwPlayerInstance) {
279
+ this.jwPlayerInstance.load(options.playlistUrl);
280
+ return;
281
+ }
282
+ throw new Error('Player not active');
43
283
  }
44
- async loadPlaylistWithItems(_options) {
45
- throw this.unimplemented('JW Player is not available in web.');
284
+ async loadPlaylistWithItems(options) {
285
+ if (this.jwPlayerInstance) {
286
+ this.jwPlayerInstance.load(options.playlist);
287
+ return;
288
+ }
289
+ throw new Error('Player not active');
46
290
  }
47
291
  async getAudioTracks() {
48
- throw this.unimplemented('JW Player is not available in web.');
292
+ if (this.jwPlayerInstance) {
293
+ const tracks = this.jwPlayerInstance.getAudioTracks();
294
+ return { tracks };
295
+ }
296
+ throw new Error('Player not active');
49
297
  }
50
298
  async getCurrentAudioTrack() {
51
- throw this.unimplemented('JW Player is not available in web.');
299
+ if (this.jwPlayerInstance) {
300
+ const index = this.jwPlayerInstance.getCurrentAudioTrack();
301
+ return { index };
302
+ }
303
+ throw new Error('Player not active');
52
304
  }
53
- async setCurrentAudioTrack(_options) {
54
- throw this.unimplemented('JW Player is not available in web.');
305
+ async setCurrentAudioTrack(options) {
306
+ if (this.jwPlayerInstance) {
307
+ this.jwPlayerInstance.setCurrentAudioTrack(options.index);
308
+ return;
309
+ }
310
+ throw new Error('Player not active');
55
311
  }
56
312
  async getCaptions() {
57
- throw this.unimplemented('JW Player is not available in web.');
313
+ if (this.jwPlayerInstance) {
314
+ const captions = this.jwPlayerInstance.getCaptionsList();
315
+ return { captions };
316
+ }
317
+ throw new Error('Player not active');
58
318
  }
59
319
  async getCurrentCaptions() {
60
- throw this.unimplemented('JW Player is not available in web.');
320
+ if (this.jwPlayerInstance) {
321
+ const index = this.jwPlayerInstance.getCurrentCaptions();
322
+ return { index };
323
+ }
324
+ throw new Error('Player not active');
61
325
  }
62
- async setCurrentCaptions(_options) {
63
- throw this.unimplemented('JW Player is not available in web.');
326
+ async setCurrentCaptions(options) {
327
+ if (this.jwPlayerInstance) {
328
+ this.jwPlayerInstance.setCurrentCaptions(options.index);
329
+ return;
330
+ }
331
+ throw new Error('Player not active');
64
332
  }
65
333
  async currentPlaylist() {
66
- throw this.unimplemented('JW Player is not available in web.');
334
+ if (this.jwPlayerInstance) {
335
+ return this.jwPlayerInstance.getPlaylist();
336
+ }
337
+ throw new Error('Player not active');
67
338
  }
68
339
  async resume() {
69
- throw this.unimplemented('JW Player is not available in web.');
340
+ if (this.jwPlayerInstance) {
341
+ this.jwPlayerInstance.play();
342
+ // Event is fired by the event handler
343
+ return;
344
+ }
345
+ throw new Error('Player not active');
70
346
  }
71
347
  }
72
348
 
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst JwPlayer = registerPlugin('JwPlayer', {\n web: () => import('./web').then((m) => new m.JwPlayerWeb()),\n});\nexport * from './definitions';\nexport { JwPlayer };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class JwPlayerWeb extends WebPlugin {\n async initialize(options) {\n console.log('INITIALIZE', options);\n return;\n }\n async play(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async pause() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async stop() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async seekTo(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setVolume(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getPosition() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getState() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setSpeed(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setPlaylistIndex(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async loadPlaylist(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async loadPlaylistWithItems(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getAudioTracks() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getCurrentAudioTrack() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setCurrentAudioTrack(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getCaptions() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async getCurrentCaptions() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async setCurrentCaptions(_options) {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async currentPlaylist() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n async resume() {\n throw this.unimplemented('JW Player is not available in web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,QAAQ,GAAGA,mBAAc,CAAC,UAAU,EAAE;A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AE;AACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;AACtE;AACA,IAAI,MAAM,qBAAqB,CAAC,QAAQ,EAAE;AAC1C,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;AACtE;AACA,IAAI,MAAM,cAAc,GAAG;AAC3B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;AACtE;AACA,IAAI,MAAM,oBAAoB,GAAG;AACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;AACtE;AACA,IAAI,MAAM,oBAAoB,CAAC,QAAQ,EAAE;AACzC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;AACtE;AACA,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;AACtE;AACA,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;AACtE;AACA,IAAI,MAAM,kBAAkB,CAAC,QAAQ,EAAE;AACvC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;AACtE;AACA,IAAI,MAAM,eAAe,GAAG;AAC5B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;AACtE;AACA,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,oCAAoC,CAAC;AACtE;AACA;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst JwPlayer = registerPlugin('JwPlayer', {\n web: () => import('./web').then((m) => new m.JwPlayerWeb()),\n});\nexport * from './definitions';\nexport { JwPlayer };\n//# sourceMappingURL=index.js.map","/// <reference types=\"jwplayer\" />\nimport { WebPlugin } from '@capacitor/core';\nexport class JwPlayerWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n // Track if our overlay is currently displayed\n this.overlayDiv = null;\n // Store JW Player instance\n this.jwPlayerInstance = null;\n }\n // Generate a UUID that works in all browsers\n generateUUID() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n const r = Math.random() * 16 | 0;\n const v = c === 'x' ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n }\n async initialize(options) {\n console.log('INITIALIZE', options);\n if (!options.playerUrl) {\n throw new Error('playerUrl is required for web implementation');\n }\n const playerUrl = options.playerUrl;\n await new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.src = playerUrl;\n script.onload = () => resolve(null);\n script.onerror = () => reject(new Error('Failed to load JW Player script'));\n document.head.appendChild(script);\n });\n // Check if jwplayer() is available globally\n if (typeof window.jwplayer !== 'function') {\n throw new Error('JW Player script failed to load properly - jwplayer() function not found');\n }\n }\n async play(options) {\n if (!window.jwplayer) {\n throw new Error('JW Player script failed to load properly - jwplayer() function not found');\n }\n // Create fullscreen overlay div\n if (this.overlayDiv) {\n // Remove existing overlay if it exists\n document.body.removeChild(this.overlayDiv);\n this.overlayDiv = null;\n }\n // Create new overlay div (this will be our red background container)\n this.overlayDiv = document.createElement('div');\n // Style the outer overlay to take up 100% of screen\n Object.assign(this.overlayDiv.style, {\n position: 'fixed',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n zIndex: '9999',\n display: 'flex',\n });\n // Create the inner div for the player\n const playerDiv = document.createElement('div');\n const uniqueId = this.generateUUID();\n const id = `jw-player-${uniqueId}`;\n playerDiv.id = id;\n // Style the inner player div\n Object.assign(playerDiv.style, {\n width: '100%',\n height: '100%',\n margin: '0 auto'\n });\n // Create close (X) button\n const closeButton = document.createElement('button');\n closeButton.textContent = 'X';\n Object.assign(closeButton.style, {\n position: 'absolute',\n top: '10px',\n left: '10px',\n background: 'rgba(0, 0, 0, 0.5)',\n color: 'white',\n border: 'none',\n borderRadius: '50%',\n width: '30px',\n height: '30px',\n fontSize: '16px',\n fontWeight: 'bold',\n cursor: 'pointer',\n zIndex: '10000',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n padding: '0'\n });\n // Add click handler to close button\n closeButton.addEventListener('click', () => {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.remove();\n this.jwPlayerInstance = null;\n }\n if (this.overlayDiv && this.overlayDiv.parentNode) {\n document.body.removeChild(this.overlayDiv);\n this.overlayDiv = null;\n this.notifyListeners('playerDismissed', {});\n }\n });\n // Append inner div to the red overlay\n this.overlayDiv.appendChild(playerDiv);\n // Append close button to overlay\n this.overlayDiv.appendChild(closeButton);\n // Append outer div to body\n document.body.appendChild(this.overlayDiv);\n // Setup player on the inner div\n this.jwPlayerInstance = jwplayer(id).setup({\n playlist: options.mediaType === 'playlist' ? options.mediaUrl : [{ file: options.mediaUrl, title: 'Video' }],\n width: '100%',\n height: '100%',\n autostart: options.autostart || false,\n controls: true,\n displaytitle: false,\n });\n // Add unified event handlers to match iOS and Android\n this.setupEventHandlers();\n return;\n }\n // Setup unified event handlers to match iOS and Android\n setupEventHandlers() {\n if (!this.jwPlayerInstance)\n return;\n // Ready event\n this.jwPlayerInstance.on('ready', () => {\n this.notifyListeners('ready', {});\n });\n // Error event\n this.jwPlayerInstance.on('error', (error) => {\n this.notifyListeners('error', {\n message: (error === null || error === void 0 ? void 0 : error.message) || 'Unknown error',\n code: (error === null || error === void 0 ? void 0 : error.code) || -1\n });\n });\n // Play event \n this.jwPlayerInstance.on('play', () => {\n this.notifyListeners('play', { reason: 'external' });\n });\n // Pause event\n this.jwPlayerInstance.on('pause', () => {\n this.notifyListeners('pause', { reason: 'external' });\n });\n // Complete event\n this.jwPlayerInstance.on('complete', () => {\n this.notifyListeners('complete', {});\n });\n // Seek event\n this.jwPlayerInstance.on('seek', (event) => {\n this.notifyListeners('seek', {\n position: event.position,\n offset: event.offset\n });\n });\n // Time event (throttled to not fire too often)\n let lastTimeUpdate = 0;\n this.jwPlayerInstance.on('time', (event) => {\n const now = Date.now();\n // Throttle to once per second max\n if (now - lastTimeUpdate > 1000) {\n this.notifyListeners('time', {\n position: event.position,\n duration: event.duration\n });\n lastTimeUpdate = now;\n }\n });\n // Playlist item event\n this.jwPlayerInstance.on('playlistItem', (event) => {\n var _a;\n this.notifyListeners('playlistItem', {\n index: event.index,\n title: ((_a = event.item) === null || _a === void 0 ? void 0 : _a.title) || ''\n });\n });\n // Playlist complete event\n this.jwPlayerInstance.on('playlistComplete', () => {\n this.notifyListeners('playlistComplete', {});\n });\n // Controls visibility event\n this.jwPlayerInstance.on('controls', (event) => {\n this.notifyListeners('controlsChanged', {\n visible: event.controls\n });\n });\n }\n async pause() {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.pause();\n // Event is fired by the event handler\n return;\n }\n throw new Error('Player not active');\n }\n async stop() {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.remove();\n this.jwPlayerInstance = null;\n if (this.overlayDiv && this.overlayDiv.parentNode) {\n document.body.removeChild(this.overlayDiv);\n this.overlayDiv = null;\n }\n // The complete event will be triggered by the JW Player event handler,\n // but since we're removing the player instance, we need to send it manually here\n this.notifyListeners('playerDismissed', {});\n return;\n }\n throw new Error('Player not active');\n }\n async seekTo(options) {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.seek(options.time);\n return;\n }\n throw new Error('Player not active');\n }\n async setVolume(options) {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.setVolume(options.volume);\n return;\n }\n throw new Error('Player not active');\n }\n async getPosition() {\n if (this.jwPlayerInstance) {\n return { position: this.jwPlayerInstance.getPosition() };\n }\n throw new Error('Player not active');\n }\n async getState() {\n if (!this.jwPlayerInstance) {\n // IDLE (no player)\n return { state: 0 };\n }\n // Convert JW Player state to our state format\n // jwplayer: BUFFERING(3), IDLE(0), COMPLETE(4), PAUSED(2), PLAYING(1)\n // our API: IDLE(0), BUFFERING(1), PLAYING(2), PAUSED(3), COMPLETE(4)\n const jwState = this.jwPlayerInstance.getState();\n let state = 0;\n switch (jwState) {\n case 'buffering':\n state = 1;\n break;\n case 'playing':\n state = 2;\n break;\n case 'paused':\n state = 3;\n break;\n default: state = 0; // idle\n }\n return { state };\n }\n async setSpeed(options) {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.setPlaybackRate(options.speed);\n return;\n }\n throw new Error('Player not active');\n }\n async setPlaylistIndex(options) {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.playlistItem(options.index);\n return;\n }\n throw new Error('Player not active');\n }\n async loadPlaylist(options) {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.load(options.playlistUrl);\n return;\n }\n throw new Error('Player not active');\n }\n async loadPlaylistWithItems(options) {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.load(options.playlist);\n return;\n }\n throw new Error('Player not active');\n }\n async getAudioTracks() {\n if (this.jwPlayerInstance) {\n const tracks = this.jwPlayerInstance.getAudioTracks();\n return { tracks };\n }\n throw new Error('Player not active');\n }\n async getCurrentAudioTrack() {\n if (this.jwPlayerInstance) {\n const index = this.jwPlayerInstance.getCurrentAudioTrack();\n return { index };\n }\n throw new Error('Player not active');\n }\n async setCurrentAudioTrack(options) {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.setCurrentAudioTrack(options.index);\n return;\n }\n throw new Error('Player not active');\n }\n async getCaptions() {\n if (this.jwPlayerInstance) {\n const captions = this.jwPlayerInstance.getCaptionsList();\n return { captions };\n }\n throw new Error('Player not active');\n }\n async getCurrentCaptions() {\n if (this.jwPlayerInstance) {\n const index = this.jwPlayerInstance.getCurrentCaptions();\n return { index };\n }\n throw new Error('Player not active');\n }\n async setCurrentCaptions(options) {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.setCurrentCaptions(options.index);\n return;\n }\n throw new Error('Player not active');\n }\n async currentPlaylist() {\n if (this.jwPlayerInstance) {\n return this.jwPlayerInstance.getPlaylist();\n }\n throw new Error('Player not active');\n }\n async resume() {\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.play();\n // Event is fired by the event handler\n return;\n }\n throw new Error('Player not active');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,QAAQ,GAAGA,mBAAc,CAAC,UAAU,EAAE;AAC5C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/D,CAAC;;ACHD;AAEO,MAAM,WAAW,SAASC,cAAS,CAAC;AAC3C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC;AAC3B;AACA,QAAQ,IAAI,CAAC,UAAU,GAAG,IAAI;AAC9B;AACA,QAAQ,IAAI,CAAC,gBAAgB,GAAG,IAAI;AACpC;AACA;AACA,IAAI,YAAY,GAAG;AACnB,QAAQ,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;AACpF,YAAY,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC;AAC5C,YAAY,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AACrD,YAAY,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;AACjC,SAAS,CAAC;AACV;AACA,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;AAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC;AAC1C,QAAQ,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;AAChC,YAAY,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC;AAC3E;AACA,QAAQ,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS;AAC3C,QAAQ,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO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