embed improvements
This commit is contained in:
parent
6bc785c297
commit
cc7c69eb25
3 changed files with 13 additions and 5 deletions
|
@ -301,8 +301,8 @@ function App(props: Props) {
|
||||||
|
|
||||||
{/* @if TARGET='web' */}
|
{/* @if TARGET='web' */}
|
||||||
<YoutubeWelcome />
|
<YoutubeWelcome />
|
||||||
<OpenInAppLink uri={uri} />
|
{!shouldHideNag && <OpenInAppLink uri={uri} />}
|
||||||
{(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING) && (
|
{(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING) && !shouldHideNag && (
|
||||||
<NagDegradedPerformance onClose={() => setLbryTvApiStatus(STATUS_OK)} />
|
<NagDegradedPerformance onClose={() => setLbryTvApiStatus(STATUS_OK)} />
|
||||||
)}
|
)}
|
||||||
{lbryTvApiStatus === STATUS_OK && showAnalyticsNag && !shouldHideNag && (
|
{lbryTvApiStatus === STATUS_OK && showAnalyticsNag && !shouldHideNag && (
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
import { URL } from 'config';
|
||||||
import { remote } from 'electron';
|
import { remote } from 'electron';
|
||||||
import React, { Suspense, Fragment } from 'react';
|
import React, { Suspense, Fragment } from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
@ -9,6 +10,7 @@ import AppViewer from 'component/viewers/appViewer';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
import AutoplayCountdown from 'component/autoplayCountdown';
|
import AutoplayCountdown from 'component/autoplayCountdown';
|
||||||
|
import { formatLbryUrlForWeb } from 'util/url';
|
||||||
// @if TARGET='web'
|
// @if TARGET='web'
|
||||||
import { generateStreamUrl } from 'util/lbrytv';
|
import { generateStreamUrl } from 'util/lbrytv';
|
||||||
// @endif
|
// @endif
|
||||||
|
@ -220,6 +222,7 @@ class FileRender extends React.PureComponent<Props, State> {
|
||||||
render() {
|
render() {
|
||||||
const { isText, uri, currentlyFloating, embedded } = this.props;
|
const { isText, uri, currentlyFloating, embedded } = this.props;
|
||||||
const { showAutoplayCountdown, showEmbededMessage } = this.state;
|
const { showAutoplayCountdown, showEmbededMessage } = this.state;
|
||||||
|
const lbrytvLink = `${URL}${formatLbryUrlForWeb(uri)}?src=embed`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
@ -231,11 +234,11 @@ class FileRender extends React.PureComponent<Props, State> {
|
||||||
>
|
>
|
||||||
{embedded && showEmbededMessage && (
|
{embedded && showEmbededMessage && (
|
||||||
<div className="video-overlay__wrapper">
|
<div className="video-overlay__wrapper">
|
||||||
<div className="video-overlay__title">{__('View More on lbry.tv')}</div>
|
<div className="video-overlay__title">{__('See more on lbry.tv')}</div>
|
||||||
|
|
||||||
<div className="video-overlay__actions">
|
<div className="video-overlay__actions">
|
||||||
<div className="section__actions--centered">
|
<div className="section__actions--centered">
|
||||||
<Button label={__('Explore')} button="primary" href="https://lbry.tv?src=embed" />
|
<Button label={__('Explore')} button="primary" href={lbrytvLink} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -170,7 +170,6 @@
|
||||||
.vjs-big-play-button {
|
.vjs-big-play-button {
|
||||||
@extend .button--icon;
|
@extend .button--icon;
|
||||||
@extend .button--play;
|
@extend .button--play;
|
||||||
display: block;
|
|
||||||
background-color: rgba(0, 0, 0, 0.6);
|
background-color: rgba(0, 0, 0, 0.6);
|
||||||
border: none;
|
border: none;
|
||||||
position: static;
|
position: static;
|
||||||
|
@ -180,6 +179,12 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.vjs-paused {
|
||||||
|
.vjs-big-play-button {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-js:hover {
|
.video-js:hover {
|
||||||
|
|
Loading…
Add table
Reference in a new issue