Skip to content

Commit

Permalink
Bump cast sdk version and remove workaround for live duration
Browse files Browse the repository at this point in the history
The fix for b/171657375 (internal) has been shipped with 21.1.0 already (see https://developers.google.com/cast/docs/release-notes#august-8,-2022).

PiperOrigin-RevId: 491583727
  • Loading branch information
marcbaechinger authored and rohitjoins committed Nov 29, 2022
1 parent 51d1c0b commit 04f031d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extensions/cast/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"

dependencies {
api 'com.google.android.gms:play-services-cast-framework:21.0.1'
api 'com.google.android.gms:play-services-cast-framework:21.2.0'
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
implementation project(modulePrefix + 'library-common')
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
/** Utility methods for Cast integration. */
/* package */ final class CastUtils {

/** The duration returned by {@link MediaInfo#getStreamDuration()} for live streams. */
// TODO: Remove once [Internal ref: b/171657375] is fixed.
private static final long LIVE_STREAM_DURATION = -1000;

/**
* Returns the duration in microseconds advertised by a media info, or {@link C#TIME_UNSET} if
* unknown or not applicable.
Expand All @@ -42,9 +38,7 @@ public static long getStreamDurationUs(@Nullable MediaInfo mediaInfo) {
return C.TIME_UNSET;
}
long durationMs = mediaInfo.getStreamDuration();
return durationMs != MediaInfo.UNKNOWN_DURATION && durationMs != LIVE_STREAM_DURATION
? Util.msToUs(durationMs)
: C.TIME_UNSET;
return durationMs != MediaInfo.UNKNOWN_DURATION ? Util.msToUs(durationMs) : C.TIME_UNSET;
}

/**
Expand Down

0 comments on commit 04f031d

Please sign in to comment.