use of android.support.v7.media.RemotePlaybackClient.ItemActionCallback in project cw-omnibus by commonsguy.
the class PlaybackFragment method play.
private void play() {
logToTranscript(getActivity().getString(R.string.play_requested));
ItemActionCallback playCB = new ItemActionCallback() {
@Override
public void onResult(Bundle data, String sessionId, MediaSessionStatus sessionStatus, String itemId, MediaItemStatus itemStatus) {
logToTranscript(getActivity().getString(R.string.playing));
isPlaying = true;
getActivity().supportInvalidateOptionsMenu();
}
@Override
public void onError(String error, int code, Bundle data) {
logToTranscript(getActivity().getString(R.string.play_error) + error);
}
};
client.play(Uri.parse("http://misc.commonsware.com/ed_hd_512kb.mp4"), "video/mp4", null, 0, null, playCB);
}
use of android.support.v7.media.RemotePlaybackClient.ItemActionCallback in project cw-omnibus by commonsguy.
the class PlaybackFragment method play.
private void play() {
logToTranscript(getActivity().getString(R.string.play_requested));
ItemActionCallback playCB = new ItemActionCallback() {
@Override
public void onResult(Bundle data, String sessionId, MediaSessionStatus sessionStatus, String itemId, MediaItemStatus itemStatus) {
logToTranscript(getActivity().getString(R.string.playing));
isPlaying = true;
updateMenu();
}
@Override
public void onError(String error, int code, Bundle data) {
logToTranscript(getActivity().getString(R.string.play_error) + error);
}
};
client.play(Uri.parse("http://misc.commonsware.com/ed_hd_512kb.mp4"), "video/mp4", null, 0, null, playCB);
}
Aggregations