- source = player_data['src']
- source_urls = source.values() if isinstance(source, dict) else [source]
-
- formats = []
- for source_url in source_urls:
- ext = determine_ext(source_url)
- if ext == 'm3u8':
- formats.extend(self._extract_m3u8_formats(
- source_url, video_id, ext='mp4',
- entry_protocol='m3u8_native', m3u8_id='hls'))
- else:
- formats.append({
- 'url': source_url,
- })
- self._sort_formats(formats)
-