aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/jwplatform.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-10-02 14:07:49 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-10-02 14:07:49 +0800
commit99ed78c79e94c14ce24bc5bdccaf9573d4f83552 (patch)
treeee066dbc328ce7684cf35cbe3127a3be7a9f8502 /youtube_dl/extractor/jwplatform.py
parentfd152641726a3f5e47a6a5065f8e9b6fe2623c11 (diff)
[jwplatform] Support DASH streams
Diffstat (limited to 'youtube_dl/extractor/jwplatform.py')
-rw-r--r--youtube_dl/extractor/jwplatform.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/extractor/jwplatform.py b/youtube_dl/extractor/jwplatform.py
index e10f7e9f9..5d56e0a28 100644
--- a/youtube_dl/extractor/jwplatform.py
+++ b/youtube_dl/extractor/jwplatform.py
@@ -32,7 +32,8 @@ class JWPlatformBaseIE(InfoExtractor):
return self._parse_jwplayer_data(
jwplayer_data, video_id, *args, **kwargs)
- def _parse_jwplayer_data(self, jwplayer_data, video_id=None, require_title=True, m3u8_id=None, rtmp_params=None, base_url=None):
+ def _parse_jwplayer_data(self, jwplayer_data, video_id=None, require_title=True,
+ m3u8_id=None, mpd_id=None, rtmp_params=None, base_url=None):
# JWPlayer backward compatibility: flattened playlists
# https://github.com/jwplayer/jwplayer/blob/v7.4.3/src/js/api/config.js#L81-L96
if 'playlist' not in jwplayer_data:
@@ -63,6 +64,9 @@ class JWPlatformBaseIE(InfoExtractor):
if source_type == 'hls' or ext == 'm3u8':
formats.extend(self._extract_m3u8_formats(
source_url, this_video_id, 'mp4', 'm3u8_native', m3u8_id=m3u8_id, fatal=False))
+ elif ext == 'mpd':
+ formats.extend(self._extract_mpd_formats(
+ source_url, this_video_id, mpd_id=mpd_id, fatal=False))
# https://github.com/jwplayer/jwplayer/blob/master/src/js/providers/default.js#L67
elif source_type.startswith('audio') or ext in ('oga', 'aac', 'mp3', 'mpeg', 'vorbis'):
formats.append({