mirror of
https://github.com/samsonjs/media.git
synced 2026-04-04 11:05:47 +00:00
Use APPLICATION_M3U8 as the mimeType for media playlists.
Given we need to do this in HlsPlaylistParser in the normal case (i.e. not MEDIA_TAG), we may as well just be consistent and do it everywhere. Issue: #151 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=111941335
This commit is contained in:
parent
8c8794878d
commit
43fcb36924
2 changed files with 2 additions and 3 deletions
|
|
@ -212,7 +212,6 @@ public class HlsChunkSource implements HlsTrackSelector.Output {
|
|||
if (playlist.type == HlsPlaylist.TYPE_MASTER) {
|
||||
masterPlaylist = (HlsMasterPlaylist) playlist;
|
||||
} else {
|
||||
// TODO: Infer the mime type from a chunk file extension.
|
||||
Format format = new Format("0", MimeTypes.APPLICATION_M3U8, -1, -1, -1, -1, -1, -1, null,
|
||||
null);
|
||||
List<Variant> variants = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -158,8 +158,8 @@ public final class HlsPlaylistParser implements UriLoadable.Parser<HlsPlaylist>
|
|||
String subtitleName = HlsParserUtil.parseStringAttr(line, NAME_ATTR_REGEX, NAME_ATTR);
|
||||
String uri = HlsParserUtil.parseStringAttr(line, URI_ATTR_REGEX, URI_ATTR);
|
||||
String language = HlsParserUtil.parseOptionalStringAttr(line, LANGUAGE_ATTR_REGEX);
|
||||
Format format = new Format(subtitleName, MimeTypes.TEXT_VTT, -1, -1, -1, -1, -1, -1,
|
||||
language, codecs);
|
||||
Format format = new Format(subtitleName, MimeTypes.APPLICATION_M3U8, -1, -1, -1, -1, -1,
|
||||
-1, language, codecs);
|
||||
subtitles.add(new Variant(uri, format));
|
||||
} else {
|
||||
// TODO: Support other types of media tag.
|
||||
|
|
|
|||
Loading…
Reference in a new issue