iOS implementation
This commit is contained in:
parent
8569c34ce2
commit
687553c875
13 changed files with 554 additions and 19 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue