mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 07:32:02 +00:00
trailers use deepLinking module
This commit is contained in:
parent
d3c3ee47e5
commit
961b9727ff
1 changed files with 2 additions and 2 deletions
|
|
@ -2,13 +2,13 @@ const React = require('react');
|
||||||
const PropTypes = require('prop-types');
|
const PropTypes = require('prop-types');
|
||||||
const classnames = require('classnames');
|
const classnames = require('classnames');
|
||||||
const UrlUtils = require('url');
|
const UrlUtils = require('url');
|
||||||
const pako = require('pako');
|
|
||||||
const Icon = require('stremio-icons/dom');
|
const Icon = require('stremio-icons/dom');
|
||||||
const Button = require('stremio/common/Button');
|
const Button = require('stremio/common/Button');
|
||||||
const Image = require('stremio/common/Image');
|
const Image = require('stremio/common/Image');
|
||||||
const ModalDialog = require('stremio/common/ModalDialog');
|
const ModalDialog = require('stremio/common/ModalDialog');
|
||||||
const SharePrompt = require('stremio/common/SharePrompt');
|
const SharePrompt = require('stremio/common/SharePrompt');
|
||||||
const CONSTANTS = require('stremio/common/CONSTANTS');
|
const CONSTANTS = require('stremio/common/CONSTANTS');
|
||||||
|
const deepLinking = require('stremio/common/deepLinking');
|
||||||
const routesRegexp = require('stremio/common/routesRegexp');
|
const routesRegexp = require('stremio/common/routesRegexp');
|
||||||
const useBinaryState = require('stremio/common/useBinaryState');
|
const useBinaryState = require('stremio/common/useBinaryState');
|
||||||
const ActionButton = require('./ActionButton');
|
const ActionButton = require('./ActionButton');
|
||||||
|
|
@ -65,7 +65,7 @@ const MetaPreview = ({ className, compact, name, logo, background, runtime, rele
|
||||||
}, [links]);
|
}, [links]);
|
||||||
const trailerHref = React.useMemo(() => {
|
const trailerHref = React.useMemo(() => {
|
||||||
return typeof trailer === 'object' && trailer !== null ?
|
return typeof trailer === 'object' && trailer !== null ?
|
||||||
`#/player/${btoa(pako.deflate(JSON.stringify(trailer), { to: 'string' }))}`
|
deepLinking.withStream({ stream: trailer }).player
|
||||||
:
|
:
|
||||||
null;
|
null;
|
||||||
}, [trailer]);
|
}, [trailer]);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue