cordova-plugin-media3 1.1.3 → 1.1.4
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 +1 -1
- package/src/android/Player.java +7 -7
package/package.json
CHANGED
package/src/android/Player.java
CHANGED
|
@@ -41,9 +41,9 @@ import androidx.appcompat.widget.ContentFrameLayout;
|
|
|
41
41
|
import androidx.media3.common.*;
|
|
42
42
|
import androidx.media3.exoplayer.*;
|
|
43
43
|
import androidx.media3.exoplayer.source.*;
|
|
44
|
-
import androidx.media3.exoplayer.
|
|
45
|
-
import androidx.media3.exoplayer.
|
|
46
|
-
import androidx.media3.exoplayer.
|
|
44
|
+
import androidx.media3.exoplayer.dash.*;
|
|
45
|
+
import androidx.media3.exoplayer.hls.*;
|
|
46
|
+
import androidx.media3.exoplayer.smoothstreaming.*;
|
|
47
47
|
import androidx.media3.ui.*;
|
|
48
48
|
import androidx.media3.datasource.*;
|
|
49
49
|
import androidx.media3.common.util.*;
|
|
@@ -83,7 +83,7 @@ public class Player {
|
|
|
83
83
|
this.audioManager = (AudioManager) activity.getSystemService(Context.AUDIO_SERVICE);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
private Player.Listener playerEventListener = new Player.Listener() {
|
|
86
|
+
private androidx.media3.common.Player.Listener playerEventListener = new androidx.media3.common.Player.Listener() {
|
|
87
87
|
@Override
|
|
88
88
|
public void onIsLoadingChanged(boolean isLoading) {
|
|
89
89
|
JSONObject payload = Payload.loadingEvent(Player.this.exoPlayer, isLoading);
|
|
@@ -104,14 +104,14 @@ public class Player {
|
|
|
104
104
|
@Override
|
|
105
105
|
public void onPlaybackStateChanged(int playbackState) {
|
|
106
106
|
if (config.getShowBuffering()) {
|
|
107
|
-
LayoutProvider.setBufferingVisibility(exoView, activity, playbackState == Player.STATE_BUFFERING);
|
|
107
|
+
LayoutProvider.setBufferingVisibility(exoView, activity, playbackState == androidx.media3.common.Player.STATE_BUFFERING);
|
|
108
108
|
}
|
|
109
109
|
JSONObject payload = Payload.stateEvent(Player.this.exoPlayer, playbackState, Player.this.controllerVisibility == View.VISIBLE);
|
|
110
110
|
new CallbackResponse(Player.this.callbackContext).send(PluginResult.Status.OK, payload, true);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
@Override
|
|
114
|
-
public void onPositionDiscontinuity(@NonNull Player.PositionInfo oldPosition, @NonNull Player.PositionInfo newPosition, int reason) {
|
|
114
|
+
public void onPositionDiscontinuity(@NonNull androidx.media3.common.Player.PositionInfo oldPosition, @NonNull androidx.media3.common.Player.PositionInfo newPosition, int reason) {
|
|
115
115
|
JSONObject payload = Payload.positionDiscontinuityEvent(Player.this.exoPlayer, reason);
|
|
116
116
|
new CallbackResponse(Player.this.callbackContext).send(PluginResult.Status.OK, payload, true);
|
|
117
117
|
}
|
|
@@ -592,7 +592,7 @@ public class Player {
|
|
|
592
592
|
|
|
593
593
|
public JSONObject getPlayerState() {
|
|
594
594
|
return Payload.stateEvent(exoPlayer,
|
|
595
|
-
null != exoPlayer ? exoPlayer.getPlaybackState() : Player.STATE_ENDED,
|
|
595
|
+
null != exoPlayer ? exoPlayer.getPlaybackState() : androidx.media3.common.Player.STATE_ENDED,
|
|
596
596
|
Player.this.controllerVisibility == View.VISIBLE);
|
|
597
597
|
}
|
|
598
598
|
|