cordova-plugin-media3 1.1.25 → 1.1.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-media3",
3
- "version": "1.1.025",
3
+ "version": "1.1.026",
4
4
  "description": "Media player for Cordova using Google's media3 ExoPlayer framework",
5
5
  "cordova": {
6
6
  "id": "cordova-plugin-media3",
@@ -108,14 +108,14 @@ public class Player {
108
108
  @Override
109
109
  public void onPlaybackStateChanged(int playbackState) {
110
110
  if (config.getShowBuffering()) {
111
- LayoutProvider.setBufferingVisibility(exoView, activity, playbackState == androidx.media3.common.Player.STATE_BUFFERING);
111
+ LayoutProvider.setBufferingVisibility(exoView, activity, playbackState == ExoPlayer.STATE_BUFFERING);
112
112
  }
113
113
  JSONObject payload = Payload.stateEvent(Player.this.exoPlayer, playbackState, Player.this.controllerVisibility == View.VISIBLE);
114
114
  new CallbackResponse(Player.this.callbackContext).send(PluginResult.Status.OK, payload, true);
115
115
  }
116
116
 
117
117
  @Override
118
- public void onPositionDiscontinuity(@NonNull androidx.media3.common.Player.PositionInfo oldPosition, @NonNull androidx.media3.common.Player.PositionInfo newPosition, int reason) {
118
+ public void onPositionDiscontinuity(@NonNull ExoPlayer.PositionInfo oldPosition, @NonNull ExoPlayer.PositionInfo newPosition, int reason) {
119
119
  JSONObject payload = Payload.positionDiscontinuityEvent(Player.this.exoPlayer, reason);
120
120
  new CallbackResponse(Player.this.callbackContext).send(PluginResult.Status.OK, payload, true);
121
121
  }
@@ -231,8 +231,8 @@ public class Player {
231
231
  public void createPlayer() {
232
232
  Log.i(TAG, "Playing " + config.getUri());
233
233
 
234
- String mediaUrl = config.getUri(); // Your method to get the URL
235
- if (mediaUrl != null && URLUtil.isValidUrl(mediaUrl)) {
234
+ // String mediaUrl = config.getUri(); // Your method to get the URL
235
+ // if (mediaUrl != null && URLUtil.isValidUrl(mediaUrl)) {
236
236
  // Proceed with ExoPlayer setup using mediaUrl
237
237
  if (config.useInlineView()) {
238
238
  // Using a dialog doesn't work for us, as controls are drawn in HTML view (cordova ui)
@@ -247,11 +247,11 @@ public class Player {
247
247
  if (config.useInlineView()) {
248
248
  setController(config.getController());
249
249
  }
250
- } else {
251
- // Handle invalid or null URL: e.g., show an error message, log the issue, or use a placeholder.
252
- Log.e("ExoPlayerDebug", "Invalid media URL: " + mediaUrl);
253
- sendError("Invalid media URL: " + uri);
254
- }
250
+ // } else {
251
+ // // Handle invalid or null URL: e.g., show an error message, log the issue, or use a placeholder.
252
+ // Log.e("ExoPlayerDebug", "Invalid media URL: " + mediaUrl);
253
+ // sendError("Invalid media URL: " + mediaUrl);
254
+ // }
255
255
  }
256
256
 
257
257
  public void createDialog() {