Use inputstreamhelper for unprotected MPEG-DASH (#118)

This commit is contained in:
mediaminister 2023-07-21 22:12:09 +02:00 committed by GitHub
parent 9cd8688fee
commit 7504d1a6ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -259,12 +259,17 @@ def play(stream, stream_type=STREAM_HLS, license_key=None, title=None, art_dict=
elif stream_type == STREAM_DASH: elif stream_type == STREAM_DASH:
play_item.setProperty('inputstream.adaptive.manifest_type', 'mpd') play_item.setProperty('inputstream.adaptive.manifest_type', 'mpd')
play_item.setMimeType('application/dash+xml') play_item.setMimeType('application/dash+xml')
if license_key is not None:
import inputstreamhelper import inputstreamhelper
if license_key is not None:
# DRM protected MPEG-DASH
is_helper = inputstreamhelper.Helper('mpd', drm='com.widevine.alpha') is_helper = inputstreamhelper.Helper('mpd', drm='com.widevine.alpha')
if is_helper.check_inputstream(): if is_helper.check_inputstream():
play_item.setProperty('inputstream.adaptive.license_type', 'com.widevine.alpha') play_item.setProperty('inputstream.adaptive.license_type', 'com.widevine.alpha')
play_item.setProperty('inputstream.adaptive.license_key', license_key) play_item.setProperty('inputstream.adaptive.license_key', license_key)
else:
# Unprotected MPEG-DASH
is_helper = inputstreamhelper.Helper('mpd')
is_helper.check_inputstream()
play_item.setContentLookup(False) play_item.setContentLookup(False)