cordova-plugin-media3 1.1.3 → 1.1.5
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/plugin.xml +4 -0
- package/src/android/Player.java +11 -7
package/package.json
CHANGED
package/plugin.xml
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
<platform name="android">
|
|
22
22
|
<framework src="androidx.media3:media3-exoplayer:1.2.1"/>
|
|
23
|
+
<framework src="androidx.media3:media3-exoplayer-hls:1.2.1"/>
|
|
24
|
+
<framework src="androidx.media3:media3-exoplayer-dash:1.2.1"/>
|
|
25
|
+
<framework src="androidx.media3:media3-exoplayer-smoothstreaming:1.2.1"/>
|
|
26
|
+
<framework src="androidx.media3:media3-exoplayer-progressive:1.2.1"/>
|
|
23
27
|
<framework src="androidx.media3:media3-ui:1.2.1"/>
|
|
24
28
|
<framework src="androidx.media3:media3-common:1.2.1"/>
|
|
25
29
|
<framework src="androidx.media3:media3-datasource:1.2.1"/>
|
package/src/android/Player.java
CHANGED
|
@@ -41,9 +41,13 @@ 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
|
+
import androidx.media3.exoplayer.progressive.*;
|
|
48
|
+
import androidx.media3.exoplayer.dash.DashMediaSource;
|
|
49
|
+
import androidx.media3.exoplayer.hls.HlsMediaSource;
|
|
50
|
+
import androidx.media3.exoplayer.smoothstreaming.SsMediaSource;
|
|
47
51
|
import androidx.media3.ui.*;
|
|
48
52
|
import androidx.media3.datasource.*;
|
|
49
53
|
import androidx.media3.common.util.*;
|
|
@@ -83,7 +87,7 @@ public class Player {
|
|
|
83
87
|
this.audioManager = (AudioManager) activity.getSystemService(Context.AUDIO_SERVICE);
|
|
84
88
|
}
|
|
85
89
|
|
|
86
|
-
private Player.Listener playerEventListener = new Player.Listener() {
|
|
90
|
+
private androidx.media3.common.Player.Listener playerEventListener = new androidx.media3.common.Player.Listener() {
|
|
87
91
|
@Override
|
|
88
92
|
public void onIsLoadingChanged(boolean isLoading) {
|
|
89
93
|
JSONObject payload = Payload.loadingEvent(Player.this.exoPlayer, isLoading);
|
|
@@ -104,14 +108,14 @@ public class Player {
|
|
|
104
108
|
@Override
|
|
105
109
|
public void onPlaybackStateChanged(int playbackState) {
|
|
106
110
|
if (config.getShowBuffering()) {
|
|
107
|
-
LayoutProvider.setBufferingVisibility(exoView, activity, playbackState == Player.STATE_BUFFERING);
|
|
111
|
+
LayoutProvider.setBufferingVisibility(exoView, activity, playbackState == androidx.media3.common.Player.STATE_BUFFERING);
|
|
108
112
|
}
|
|
109
113
|
JSONObject payload = Payload.stateEvent(Player.this.exoPlayer, playbackState, Player.this.controllerVisibility == View.VISIBLE);
|
|
110
114
|
new CallbackResponse(Player.this.callbackContext).send(PluginResult.Status.OK, payload, true);
|
|
111
115
|
}
|
|
112
116
|
|
|
113
117
|
@Override
|
|
114
|
-
public void onPositionDiscontinuity(@NonNull Player.PositionInfo oldPosition, @NonNull Player.PositionInfo newPosition, int reason) {
|
|
118
|
+
public void onPositionDiscontinuity(@NonNull androidx.media3.common.Player.PositionInfo oldPosition, @NonNull androidx.media3.common.Player.PositionInfo newPosition, int reason) {
|
|
115
119
|
JSONObject payload = Payload.positionDiscontinuityEvent(Player.this.exoPlayer, reason);
|
|
116
120
|
new CallbackResponse(Player.this.callbackContext).send(PluginResult.Status.OK, payload, true);
|
|
117
121
|
}
|
|
@@ -592,7 +596,7 @@ public class Player {
|
|
|
592
596
|
|
|
593
597
|
public JSONObject getPlayerState() {
|
|
594
598
|
return Payload.stateEvent(exoPlayer,
|
|
595
|
-
null != exoPlayer ? exoPlayer.getPlaybackState() : Player.STATE_ENDED,
|
|
599
|
+
null != exoPlayer ? exoPlayer.getPlaybackState() : androidx.media3.common.Player.STATE_ENDED,
|
|
596
600
|
Player.this.controllerVisibility == View.VISIBLE);
|
|
597
601
|
}
|
|
598
602
|
|