mirror of
https://github.com/androidx/media.git
synced 2025-04-29 22:36:54 +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 offset,
|
||||
@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;
|
||||
}
|
||||
super.sampleMetadata(timeUs, flags, size, offset, cryptoData);
|
||||
|
Loading…
x
Reference in New Issue
Block a user