mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 10:42:12 +00:00
deserialize stream with pako and atob
This commit is contained in:
parent
a4308fd594
commit
b6fd5d9a46
1 changed files with 2 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
const React = require('react');
|
||||
const pako = require('pako');
|
||||
const { useModelState } = require('stremio/common');
|
||||
|
||||
const initPlayerState = () => ({
|
||||
|
|
@ -75,7 +76,7 @@ const usePlayer = (urlParams) => {
|
|||
args: {
|
||||
model: 'Player',
|
||||
args: {
|
||||
stream: JSON.parse(urlParams.stream),
|
||||
stream: JSON.parse(pako.inflate(atob(urlParams.stream), { to: 'string' })),
|
||||
meta_resource_request: typeof urlParams.transportUrl === 'string' && typeof urlParams.type === 'string' && typeof urlParams.id === 'string' ?
|
||||
{
|
||||
base: urlParams.transportUrl,
|
||||
|
|
|
|||
Loading…
Reference in a new issue