iOS implementation

This commit is contained in:
Ryan Heise 2019-12-01 02:28:17 +11:00
parent 8569c34ce2
commit 687553c875
13 changed files with 554 additions and 19 deletions

View file

@ -34,7 +34,7 @@ public class AudioPlayer implements MethodCallHandler, MediaPlayer.OnCompletionL
}
};
private final long id;
private final String id;
private final MediaPlayer player;
private PlaybackState state;
private PlaybackState stateBeforeSeek;
@ -42,7 +42,7 @@ public class AudioPlayer implements MethodCallHandler, MediaPlayer.OnCompletionL
private int updatePosition;
private Integer seekPos;
public AudioPlayer(final Registrar registrar, final long id) {
public AudioPlayer(final Registrar registrar, final String id) {
this.registrar = registrar;
this.id = id;
methodChannel = new MethodChannel(registrar.messenger(), "com.ryanheise.just_audio.methods." + id);

View file

@ -24,7 +24,7 @@ public class JustAudioPlugin implements MethodCallHandler {
public void onMethodCall(MethodCall call, Result result) {
switch (call.method) {
case "init":
long id = (Long)call.arguments;
String id = (String)call.arguments;
new AudioPlayer(registrar, id);
result.success(null);
break;