+ protocol = determine_protocol(info_dict)
+ info_dict['protocol'] = protocol
+
+ external_downloader = params.get('external_downloader')
+ if external_downloader is not None:
+ ed = get_external_downloader(external_downloader)
+ if ed.supports(info_dict):
+ return ed
+
+ if protocol == 'm3u8' and params.get('hls_prefer_native'):
+ return NativeHlsFD
+
+ return PROTOCOL_MAP.get(protocol, HttpFD)