def PlayVideo(id, bitrate, format, **params): response = video_service.get_url(media_id=id, format=format, bitrate=bitrate, other_server=common.other_server()) url = response['url'] if not url: common.no_contents() else: return IndirectResponse(MovieObject, key=HTTPLiveStreamURL(url))
def PlayHLS(channel_id, bitrate, format, offset, **params): response = video_service.get_url(None, channel_id=channel_id, bitrate=bitrate, format=format, live=True, offset=offset, other_server=common.other_server()) Log(response['url']) if not response['url']: #common.no_contents() raise Ex.MediaNotAvailable else: return IndirectResponse(VideoClipObject, key=HTTPLiveStreamURL(response['url']))
def PlayHLS(channel_id, bitrate, format, offset, **params): response = video_service.get_url( None, channel_id=channel_id, bitrate=bitrate, format=format, live=True, offset=offset, other_server=common.other_server(), ) Log(response["url"]) if not response["url"]: # common.no_contents() raise Ex.MediaNotAvailable else: return IndirectResponse(VideoClipObject, key=HTTPLiveStreamURL(response["url"]))