mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Treat .vtt as Webvtt as well as .webvtt.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=112161960
This commit is contained in:
parent
949317a41a
commit
e3da2cfb40
1 changed files with 4 additions and 2 deletions
|
|
@ -115,7 +115,8 @@ public class HlsChunkSource implements HlsTrackSelector.Output {
|
||||||
private static final String TAG = "HlsChunkSource";
|
private static final String TAG = "HlsChunkSource";
|
||||||
private static final String AAC_FILE_EXTENSION = ".aac";
|
private static final String AAC_FILE_EXTENSION = ".aac";
|
||||||
private static final String MP3_FILE_EXTENSION = ".mp3";
|
private static final String MP3_FILE_EXTENSION = ".mp3";
|
||||||
private static final String VTT_FILE_EXTENSION = ".webvtt";
|
private static final String VTT_FILE_EXTENSION = ".vtt";
|
||||||
|
private static final String WEBVTT_FILE_EXTENSION = ".webvtt";
|
||||||
private static final float BANDWIDTH_FRACTION = 0.8f;
|
private static final float BANDWIDTH_FRACTION = 0.8f;
|
||||||
|
|
||||||
private final boolean isMaster;
|
private final boolean isMaster;
|
||||||
|
|
@ -463,7 +464,8 @@ public class HlsChunkSource implements HlsTrackSelector.Output {
|
||||||
Extractor extractor = new Mp3Extractor(startTimeUs);
|
Extractor extractor = new Mp3Extractor(startTimeUs);
|
||||||
extractorWrapper = new HlsExtractorWrapper(trigger, format, startTimeUs, extractor,
|
extractorWrapper = new HlsExtractorWrapper(trigger, format, startTimeUs, extractor,
|
||||||
switchingVariantSpliced, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE);
|
switchingVariantSpliced, MediaFormat.NO_VALUE, MediaFormat.NO_VALUE);
|
||||||
} else if (lastPathSegment.endsWith(VTT_FILE_EXTENSION)) {
|
} else if (lastPathSegment.endsWith(WEBVTT_FILE_EXTENSION)
|
||||||
|
|| lastPathSegment.endsWith(VTT_FILE_EXTENSION)) {
|
||||||
PtsTimestampAdjuster timestampAdjuster = timestampAdjusterProvider.getAdjuster(isMaster,
|
PtsTimestampAdjuster timestampAdjuster = timestampAdjusterProvider.getAdjuster(isMaster,
|
||||||
segment.discontinuitySequenceNumber, startTimeUs);
|
segment.discontinuitySequenceNumber, startTimeUs);
|
||||||
if (timestampAdjuster == null) {
|
if (timestampAdjuster == null) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue