use of androidx.media3.datasource.DefaultDataSource in project media by androidx.
the class DefaultDataSourceTest method openRtmpDataSpec_instantiatesRtmpDataSourceViaReflection.
@Test
public void openRtmpDataSpec_instantiatesRtmpDataSourceViaReflection() throws IOException {
DefaultDataSource dataSource = new DefaultDataSource(ApplicationProvider.getApplicationContext(), "userAgent", /* allowCrossProtocolRedirects= */
false);
DataSpec dataSpec = new DataSpec(Uri.parse("rtmp://test.com/stream"));
try {
dataSource.open(dataSpec);
} catch (UnsatisfiedLinkError e) {
// RtmpDataSource was successfully instantiated (test run using Gradle).
} catch (UnsupportedOperationException e) {
// RtmpDataSource was successfully instantiated (test run using Blaze).
}
}
Aggregations