use of guichaguri.trackplayer.player.Playback in project react-native-track-player by react-native-kit.
the class MediaWrapper method skip.
public void skip(final String id, final Promise promise) {
Playback pb = manager.getPlayback();
if (pb == null)
return;
pb.skip(id, promise);
}
use of guichaguri.trackplayer.player.Playback in project react-native-track-player by react-native-kit.
the class MediaWrapper method getPosition.
public void getPosition(final Promise callback) {
Playback pb = manager.getPlayback();
if (checkPlayback(pb, callback))
return;
Utils.resolveCallback(callback, Utils.toSeconds(pb.getPosition()));
}
use of guichaguri.trackplayer.player.Playback in project react-native-track-player by react-native-kit.
the class MediaWrapper method remove.
public void remove(final List<String> ids, final Promise promise) {
Playback pb = manager.getPlayback();
if (pb == null)
return;
pb.remove(ids, promise);
}
use of guichaguri.trackplayer.player.Playback in project react-native-track-player by react-native-kit.
the class MediaWrapper method getTrack.
public void getTrack(final String id, final Promise callback) {
Playback pb = manager.getPlayback();
if (checkPlayback(pb, callback))
return;
for (Track track : pb.getQueue()) {
if (track.id.equals(id)) {
Utils.resolveCallback(callback, Arguments.fromBundle(track.toBundle()));
return;
}
}
Utils.rejectCallback(callback, "track", "No track found");
}
use of guichaguri.trackplayer.player.Playback in project react-native-track-player by react-native-kit.
the class MediaWrapper method play.
public void play() {
Playback pb = manager.getPlayback();
if (pb == null)
return;
pb.play();
}