stream deserialized using deep links module

This commit is contained in:
nklhrstv 2020-04-06 17:26:07 +03:00
parent 9b92da9cbd
commit cf9ded23a2

View file

@ -1,7 +1,6 @@
const React = require('react');
const pako = require('pako');
const { useServices } = require('stremio/services');
const { useModelState } = require('stremio/common');
const { deepLinking, useModelState } = require('stremio/common');
const initPlayerState = () => ({
selected: null,
@ -86,7 +85,7 @@ const usePlayer = (urlParams) => {
args: {
model: 'Player',
args: {
stream: JSON.parse(pako.inflate(atob(urlParams.stream), { to: 'string' })),
stream: deepLinking.deserializeStream(urlParams.stream),
stream_resource_request: typeof urlParams.streamTransportUrl === 'string' && typeof urlParams.type === 'string' && typeof urlParams.videoId === 'string' ?
{
base: urlParams.streamTransportUrl,