use of com.google.android.exoplayer2.source.hls.playlist.HlsMultivariantPlaylist in project ExoPlayer by google.
the class HlsMultivariantPlaylistParserTest method testIFrameVariant.
@Test
public void testIFrameVariant() throws IOException {
HlsMultivariantPlaylist playlist = parseMultivariantPlaylist(PLAYLIST_URI, PLAYLIST_WITH_IFRAME_VARIANTS);
assertThat(playlist.variants).hasSize(5);
for (int i = 0; i < 4; i++) {
assertThat(playlist.variants.get(i).format.roleFlags).isEqualTo(0);
}
Variant iFramesOnlyVariant = playlist.variants.get(4);
assertThat(iFramesOnlyVariant.format.bitrate).isEqualTo(1313400);
assertThat(iFramesOnlyVariant.format.roleFlags & C.ROLE_FLAG_TRICK_PLAY).isEqualTo(C.ROLE_FLAG_TRICK_PLAY);
}
Aggregations