@capgo/capacitor-jw-player 0.0.38 → 7.0.13

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.
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.author = package['author']
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
13
  s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
14
- s.ios.deployment_target = '14.0'
14
+ s.ios.deployment_target = '15.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.dependency 'JWPlayerKit', '>= 4.22.0'
17
17
  s.dependency 'google-cast-sdk', '>= 4.8.1'
package/Package.swift CHANGED
@@ -8,14 +8,14 @@ struct GoogleCastMetadata {
8
8
 
9
9
  let package = Package(
10
10
  name: "CapgoCapacitorJwPlayer",
11
- platforms: [.iOS(.v14)],
11
+ platforms: [.iOS(.v15)],
12
12
  products: [
13
13
  .library(
14
14
  name: "CapgoCapacitorJwPlayer",
15
15
  targets: ["JwPlayerPlugin"])
16
16
  ],
17
17
  dependencies: [
18
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", exact: "7.2.0"),
18
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", exact: "7.4.2"),
19
19
  .package(url: "https://github.com/jwplayer/JWPlayerKit-package.git", .upToNextMajor(from: "4.22.0"))
20
20
  ],
21
21
  targets: [
package/README.md CHANGED
@@ -6,10 +6,10 @@
6
6
  <h2><a href="https://capgo.app/consulting/?ref=plugin"> Missing a feature? We’ll build the plugin for you 💪</a></h2>
7
7
  </div>
8
8
 
9
- WIP: do not use it yet it's in dev
10
-
11
9
  Play videos from jwplayer.com with a fullscreen player interface. The plugin provides a comprehensive API for controlling JW Player playback, playlists, and tracks.
12
10
 
11
+ The latest version of the player require a min version of IOS 15
12
+
13
13
  ## Key Features
14
14
 
15
15
  - Always fullscreen player
@@ -76,7 +76,7 @@ dependencies {
76
76
  implementation 'com.android.volley:volley:1.2.1'
77
77
  implementation 'androidx.recyclerview:recyclerview:1.3.0'
78
78
  implementation 'androidx.mediarouter:mediarouter:1.7.0'
79
- implementation 'androidx.media:media:1.7.0'
79
+ implementation 'androidx.media:media:1.7.1'
80
80
 
81
81
  testImplementation "junit:junit:$junitVersion"
82
82
  androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
@@ -107,13 +107,13 @@ public class PlayerActivity
107
107
 
108
108
  // Setup Close Button
109
109
  mCloseButton = findViewById(R.id.close_button);
110
- mCloseButton.setOnClickListener(v -> finish());
110
+ mCloseButton.setOnClickListener((v) -> finish());
111
111
 
112
112
  ControlbarViewModel controlbarViewModel = (ControlbarViewModel) mPlayer.getViewModelForUiGroup(UiGroup.CONTROLBAR);
113
113
 
114
114
  controlbarViewModel
115
115
  .isUiLayerVisible()
116
- .observe(this, isVisible -> {
116
+ .observe(this, (isVisible) -> {
117
117
  if (isInPictureInPictureMode()) {
118
118
  mCloseButton.setVisibility(View.GONE);
119
119
  return;
@@ -124,7 +124,7 @@ public class PlayerActivity
124
124
  // Set the static instance reference in the plugin
125
125
  JwPlayerPlugin.setStaticPlayerInstance(mPlayer);
126
126
 
127
- mPlayerView.setOnClickListener(v -> toggleSystemUI());
127
+ mPlayerView.setOnClickListener((v) -> toggleSystemUI());
128
128
 
129
129
  // Initialize JW Player license (ensure this is also done in Plugin if needed)
130
130
  // new LicenseUtil().setLicenseKey(this, "YOUR_LICENSE_KEY"); // Ideally get from Intent or Plugin
@@ -201,7 +201,8 @@ public class PlayerActivity
201
201
  protected void onPause() {
202
202
  super.onPause();
203
203
  Log.d(TAG, "onPause");
204
- if (mPlayer != null && !isInPictureInPictureMode()) { // Don't pause if entering PiP
204
+ if (mPlayer != null && !isInPictureInPictureMode()) {
205
+ // Don't pause if entering PiP
205
206
  // mPlayer.pause();
206
207
  }
207
208
  }
@@ -420,11 +421,11 @@ public class PlayerActivity
420
421
  View decorView = getWindow().getDecorView();
421
422
  decorView.setSystemUiVisibility(
422
423
  View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
423
- View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
424
- View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
425
- View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
426
- View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
427
- View.SYSTEM_UI_FLAG_FULLSCREEN
424
+ View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
425
+ View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
426
+ View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
427
+ View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
428
+ View.SYSTEM_UI_FLAG_FULLSCREEN
428
429
  );
429
430
  }
430
431
  }
@@ -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","/// <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 var _a;\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.remove();\n this.jwPlayerInstance = null;\n }\n if ((_a = this.overlayDiv) === null || _a === void 0 ? void 0 : _a.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 var _a;\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.remove();\n this.jwPlayerInstance = null;\n if ((_a = this.overlayDiv) === null || _a === void 0 ? void 0 : _a.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:\n 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,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eAAe,EAAE;AACpE,YAAY,OAAO,EAAE,QAAQ,EAAE;AAC/B;AACA,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;AAC5C;AACA,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACnC,YAAY,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE;AACpE,YAAY,OAAO,EAAE,KAAK,EAAE;AAC5B;AACA,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;AAC5C;AACA,IAAI,MAAM,kBAAkB,CAAC,OAAO,EAAE;AACtC,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACnC,YAAY,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC;AACnE,YAAY;AACZ;AACA,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;AAC5C;AACA,IAAI,MAAM,eAAe,GAAG;AAC5B,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACnC,YAAY,OAAO,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE;AACtD;AACA,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;AAC5C;AACA,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACnC,YAAY,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE;AACxC;AACA,YAAY;AACZ;AACA,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;AAC5C;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 var _a;\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.remove();\n this.jwPlayerInstance = null;\n }\n if ((_a = this.overlayDiv) === null || _a === void 0 ? void 0 : _a.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 var _a;\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.remove();\n this.jwPlayerInstance = null;\n if ((_a = this.overlayDiv) === null || _a === void 0 ? void 0 : _a.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:\n 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,IAAI;AACJ;AACA,IAAI,YAAY,GAAG;AACnB,QAAQ,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;AACpF,YAAY,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC;AAC9C,YAAY,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG;AACrD,YAAY,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;AACjC,QAAQ,CAAC,CAAC;AACV,IAAI;AACJ,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,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,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;AAC5C,IAAI;AACJ,IAAI,MAAM,kBAAkB,CAAC,OAAO,EAAE;AACtC,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACnC,YAAY,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC;AACnE,YAAY;AACZ,QAAQ;AACR,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;AAC5C,IAAI;AACJ,IAAI,MAAM,eAAe,GAAG;AAC5B,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACnC,YAAY,OAAO,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE;AACtD,QAAQ;AACR,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;AAC5C,IAAI;AACJ,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACnC,YAAY,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE;AACxC;AACA,YAAY;AACZ,QAAQ;AACR,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;AAC5C,IAAI;AACJ;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.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 var _a;\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.remove();\n this.jwPlayerInstance = null;\n }\n if ((_a = this.overlayDiv) === null || _a === void 0 ? void 0 : _a.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 var _a;\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.remove();\n this.jwPlayerInstance = null;\n if ((_a = this.overlayDiv) === null || _a === void 0 ? void 0 : _a.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:\n 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":["registerPl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,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;IAC5C;IACA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.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 var _a;\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.remove();\n this.jwPlayerInstance = null;\n }\n if ((_a = this.overlayDiv) === null || _a === void 0 ? void 0 : _a.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 var _a;\n if (this.jwPlayerInstance) {\n this.jwPlayerInstance.remove();\n this.jwPlayerInstance = null;\n if ((_a = this.overlayDiv) === null || _a === void 0 ? void 0 : _a.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:\n 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,UAAC,QAAQ,GAAGA,mBAAc,CAAC,UAAU,EAAE;IAC5C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;;ICHD;IAEO,MAAM,WAAW,SAASC,cAAS,CAAC;IAC3C,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC;IAC3B;IACA,QAAQ,IAAI,CAAC,UAAU,GAAG,IAAI;IAC9B;IACA,QAAQ,IAAI,CAAC,gBAAgB,GAAG,IAAI;IACpC,IAAI;IACJ;IACA,IAAI,YAAY,GAAG;IACnB,QAAQ,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;IACpF,YAAY,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC;IAC9C,YAAY,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,IAA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AQ;IACR,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;IAC5C,IAAI;IACJ,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;IACnC,YAAY,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE;IACpE,YAAY,OAAO,EAAE,KAAK,EAAE;IAC5B,QAAQ;IACR,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;IAC5C,IAAI;IACJ,IAAI,MAAM,kBAAkB,CAAC,OAAO,EAAE;IACtC,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;IACnC,YAAY,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC;IACnE,YAAY;IACZ,QAAQ;IACR,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;IAC5C,IAAI;IACJ,IAAI,MAAM,eAAe,GAAG;IAC5B,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;IACnC,YAAY,OAAO,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE;IACtD,QAAQ;IACR,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;IAC5C,IAAI;IACJ,IAAI,MAAM,MAAM,GAAG;IACnB,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;IACnC,YAAY,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE;IACxC;IACA,YAAY;IACZ,QAAQ;IACR,QAAQ,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC;IAC5C,IAAI;IACJ;;;;;;;;;;;;;;;"}
@@ -177,7 +177,7 @@ extension LinkedList: Collection {
177
177
  public struct Index: Comparable {
178
178
  public var node: Node<Value>?
179
179
 
180
- public static func ==(lhs: Index, rhs: Index) -> Bool {
180
+ public static func == (lhs: Index, rhs: Index) -> Bool {
181
181
  switch (lhs.node, rhs.node) {
182
182
  case let (left?, right?):
183
183
  return left === right
@@ -188,7 +188,7 @@ extension LinkedList: Collection {
188
188
  }
189
189
  }
190
190
 
191
- public static func <(lhs: Index, rhs: Index) -> Bool {
191
+ public static func < (lhs: Index, rhs: Index) -> Bool {
192
192
  guard lhs != rhs else {
193
193
  return false
194
194
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-jw-player",
3
- "version": "0.0.38",
3
+ "version": "7.0.13",
4
4
  "description": "Playes videos from jwplayer.com",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",