diff --git a/mobile/libs/CastCompanionLibrary-debug.aar b/mobile/libs/CastCompanionLibrary-debug.aar index c26e8d61b..150bc7350 100644 Binary files a/mobile/libs/CastCompanionLibrary-debug.aar and b/mobile/libs/CastCompanionLibrary-debug.aar differ diff --git a/mobile/src/main/java/com/example/android/uamp/CastPlayback.java b/mobile/src/main/java/com/example/android/uamp/CastPlayback.java index 9ce3f3468..c9351f2c6 100644 --- a/mobile/src/main/java/com/example/android/uamp/CastPlayback.java +++ b/mobile/src/main/java/com/example/android/uamp/CastPlayback.java @@ -24,6 +24,7 @@ import com.example.android.uamp.utils.LogHelper; import com.example.android.uamp.utils.MediaIDHelper; import com.google.android.gms.cast.ApplicationMetadata; +import com.google.android.gms.cast.CastStatusCodes; import com.google.android.gms.cast.MediaInfo; import com.google.android.gms.cast.MediaMetadata; import com.google.android.gms.cast.MediaStatus; @@ -358,8 +359,8 @@ private OnMediaLoadedStatusListener(VideoCastManager manager, boolean play) { } @Override - public void onMediaLoadRequestStatus(boolean success, Integer failureCode) { - if (success) { + public void onMediaLoadResult(int statusCode) { + if (statusCode == CastStatusCodes.SUCCESS) { // Remove the listener as soon as we're done with the action. mCastManager.removeVideoCastConsumer(this); @@ -375,7 +376,7 @@ public void onMediaLoadRequestStatus(boolean success, Integer failureCode) { LogHelper.e(TAG, e, "Exception pausing stream"); } } else { - LogHelper.e(TAG, "Error calling loadMedia with status ", failureCode); + LogHelper.e(TAG, "Error calling loadMedia with status ", statusCode); } } }