mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Handle both media3-cues and 'raw' vtt
This commit is contained in:
parent
74885558e4
commit
9e3c64866e
@ -355,7 +355,11 @@ public class PlayerActivity extends AppCompatActivity
|
|||||||
int size,
|
int size,
|
||||||
int offset,
|
int offset,
|
||||||
@Nullable CryptoData cryptoData) {
|
@Nullable CryptoData cryptoData) {
|
||||||
if (format != null && Objects.equals(format.sampleMimeType, MimeTypes.APPLICATION_MP4VTT)) {
|
if (format != null
|
||||||
|
&& (Objects.equals(format.sampleMimeType, MimeTypes.APPLICATION_MP4VTT)
|
||||||
|
|| (Objects.equals(format.sampleMimeType, MimeTypes.APPLICATION_MEDIA3_CUES)
|
||||||
|
&& format.codecs != null
|
||||||
|
&& format.codecs.contains(MimeTypes.APPLICATION_MP4VTT)))) {
|
||||||
flags |= C.BUFFER_FLAG_KEY_FRAME;
|
flags |= C.BUFFER_FLAG_KEY_FRAME;
|
||||||
}
|
}
|
||||||
super.sampleMetadata(timeUs, flags, size, offset, cryptoData);
|
super.sampleMetadata(timeUs, flags, size, offset, cryptoData);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user