embed improvements

This commit is contained in:
Sean Yesmunt 2020-03-27 09:57:11 -04:00
parent 6bc785c297
commit cc7c69eb25
3 changed files with 13 additions and 5 deletions

View file

@ -301,8 +301,8 @@ function App(props: Props) {
{/* @if TARGET='web' */}
<YoutubeWelcome />
<OpenInAppLink uri={uri} />
{(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING) && (
{!shouldHideNag && <OpenInAppLink uri={uri} />}
{(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING) && !shouldHideNag && (
<NagDegradedPerformance onClose={() => setLbryTvApiStatus(STATUS_OK)} />
)}
{lbryTvApiStatus === STATUS_OK && showAnalyticsNag && !shouldHideNag && (

View file

@ -1,4 +1,5 @@
// @flow
import { URL } from 'config';
import { remote } from 'electron';
import React, { Suspense, Fragment } from 'react';
import classnames from 'classnames';
@ -9,6 +10,7 @@ import AppViewer from 'component/viewers/appViewer';
import Button from 'component/button';
import { withRouter } from 'react-router-dom';
import AutoplayCountdown from 'component/autoplayCountdown';
import { formatLbryUrlForWeb } from 'util/url';
// @if TARGET='web'
import { generateStreamUrl } from 'util/lbrytv';
// @endif
@ -220,6 +222,7 @@ class FileRender extends React.PureComponent<Props, State> {
render() {
const { isText, uri, currentlyFloating, embedded } = this.props;
const { showAutoplayCountdown, showEmbededMessage } = this.state;
const lbrytvLink = `${URL}${formatLbryUrlForWeb(uri)}?src=embed`;
return (
<div
@ -231,11 +234,11 @@ class FileRender extends React.PureComponent<Props, State> {
>
{embedded && showEmbededMessage && (
<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="section__actions--centered">
<Button label={__('Explore')} button="primary" href="https://lbry.tv?src=embed" />
<Button label={__('Explore')} button="primary" href={lbrytvLink} />
</div>
</div>
</div>

View file

@ -170,7 +170,6 @@
.vjs-big-play-button {
@extend .button--icon;
@extend .button--play;
display: block;
background-color: rgba(0, 0, 0, 0.6);
border: none;
position: static;
@ -180,6 +179,12 @@
display: none;
}
}
&.vjs-paused {
.vjs-big-play-button {
display: block;
}
}
}
.video-js:hover {