Commit 43fcb369 by olly Committed by Oliver Woodman

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
parent 8c879487
...@@ -212,7 +212,6 @@ public class HlsChunkSource implements HlsTrackSelector.Output { ...@@ -212,7 +212,6 @@ public class HlsChunkSource implements HlsTrackSelector.Output {
if (playlist.type == HlsPlaylist.TYPE_MASTER) { if (playlist.type == HlsPlaylist.TYPE_MASTER) {
masterPlaylist = (HlsMasterPlaylist) playlist; masterPlaylist = (HlsMasterPlaylist) playlist;
} else { } 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, Format format = new Format("0", MimeTypes.APPLICATION_M3U8, -1, -1, -1, -1, -1, -1, null,
null); null);
List<Variant> variants = new ArrayList<>(); List<Variant> variants = new ArrayList<>();
......
...@@ -158,8 +158,8 @@ public final class HlsPlaylistParser implements UriLoadable.Parser<HlsPlaylist> ...@@ -158,8 +158,8 @@ public final class HlsPlaylistParser implements UriLoadable.Parser<HlsPlaylist>
String subtitleName = HlsParserUtil.parseStringAttr(line, NAME_ATTR_REGEX, NAME_ATTR); String subtitleName = HlsParserUtil.parseStringAttr(line, NAME_ATTR_REGEX, NAME_ATTR);
String uri = HlsParserUtil.parseStringAttr(line, URI_ATTR_REGEX, URI_ATTR); String uri = HlsParserUtil.parseStringAttr(line, URI_ATTR_REGEX, URI_ATTR);
String language = HlsParserUtil.parseOptionalStringAttr(line, LANGUAGE_ATTR_REGEX); String language = HlsParserUtil.parseOptionalStringAttr(line, LANGUAGE_ATTR_REGEX);
Format format = new Format(subtitleName, MimeTypes.TEXT_VTT, -1, -1, -1, -1, -1, -1, Format format = new Format(subtitleName, MimeTypes.APPLICATION_M3U8, -1, -1, -1, -1, -1,
language, codecs); -1, language, codecs);
subtitles.add(new Variant(uri, format)); subtitles.add(new Variant(uri, format));
} else { } else {
// TODO: Support other types of media tag. // TODO: Support other types of media tag.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment