mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Bump cast sdk version and remove workaround for live duration
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 (cherry picked from commit 835d3c89f2099ca66c5b5f7af686eace1ac17eb8)
This commit is contained in:
parent
3bf99706dc
commit
1d082ee9a7
@ -19,6 +19,8 @@
|
|||||||
* Metadata:
|
* Metadata:
|
||||||
* Parse multiple null-separated values from ID3 frames, as permitted by
|
* Parse multiple null-separated values from ID3 frames, as permitted by
|
||||||
ID3 v2.4.
|
ID3 v2.4.
|
||||||
|
* Cast extension
|
||||||
|
* Bump Cast SDK version to 21.2.0.
|
||||||
|
|
||||||
### 1.0.0-beta03 (2022-11-22)
|
### 1.0.0-beta03 (2022-11-22)
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle"
|
apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle"
|
||||||
|
|
||||||
dependencies {
|
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 'androidx.annotation:annotation:' + androidxAnnotationVersion
|
||||||
implementation project(modulePrefix + 'lib-common')
|
implementation project(modulePrefix + 'lib-common')
|
||||||
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
|
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
|
||||||
|
@ -26,10 +26,6 @@ import com.google.android.gms.cast.MediaTrack;
|
|||||||
/** Utility methods for Cast integration. */
|
/** Utility methods for Cast integration. */
|
||||||
/* package */ final class CastUtils {
|
/* 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
|
* Returns the duration in microseconds advertised by a media info, or {@link C#TIME_UNSET} if
|
||||||
* unknown or not applicable.
|
* unknown or not applicable.
|
||||||
@ -42,9 +38,7 @@ import com.google.android.gms.cast.MediaTrack;
|
|||||||
return C.TIME_UNSET;
|
return C.TIME_UNSET;
|
||||||
}
|
}
|
||||||
long durationMs = mediaInfo.getStreamDuration();
|
long durationMs = mediaInfo.getStreamDuration();
|
||||||
return durationMs != MediaInfo.UNKNOWN_DURATION && durationMs != LIVE_STREAM_DURATION
|
return durationMs != MediaInfo.UNKNOWN_DURATION ? Util.msToUs(durationMs) : C.TIME_UNSET;
|
||||||
? Util.msToUs(durationMs)
|
|
||||||
: C.TIME_UNSET;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user