style fixes
This commit is contained in:
parent
df4ff30c83
commit
dd4cd9314c
3 changed files with 44 additions and 46 deletions
|
@ -120,6 +120,9 @@ function SideNavigation(props: Props) {
|
||||||
...buildLink(PAGES.LIBRARY, __('Library'), ICONS.LIBRARY),
|
...buildLink(PAGES.LIBRARY, __('Library'), ICONS.LIBRARY),
|
||||||
},
|
},
|
||||||
// @endif
|
// @endif
|
||||||
|
{
|
||||||
|
...(expanded ? { ...buildLink(PAGES.SETTINGS, __('Settings'), ICONS.SETTINGS) } : {}),
|
||||||
|
},
|
||||||
].map(
|
].map(
|
||||||
linkProps =>
|
linkProps =>
|
||||||
linkProps.navigate && (
|
linkProps.navigate && (
|
||||||
|
@ -164,9 +167,6 @@ function SideNavigation(props: Props) {
|
||||||
{
|
{
|
||||||
...buildLink(PAGES.PUBLISH, __('Publish'), ICONS.PUBLISH),
|
...buildLink(PAGES.PUBLISH, __('Publish'), ICONS.PUBLISH),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
...buildLink(PAGES.SETTINGS, __('Settings'), ICONS.SETTINGS),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
...buildLink(PAGES.HELP, __('Help'), ICONS.HELP),
|
...buildLink(PAGES.HELP, __('Help'), ICONS.HELP),
|
||||||
},
|
},
|
||||||
|
|
|
@ -57,7 +57,6 @@ function VideoViewer(props: Props) {
|
||||||
} = props;
|
} = props;
|
||||||
const claimId = claim && claim.claim_id;
|
const claimId = claim && claim.claim_id;
|
||||||
const isAudio = contentType.includes('audio');
|
const isAudio = contentType.includes('audio');
|
||||||
|
|
||||||
const forcePlayer = FORCE_CONTENT_TYPE_PLAYER.includes(contentType);
|
const forcePlayer = FORCE_CONTENT_TYPE_PLAYER.includes(contentType);
|
||||||
const [isPlaying, setIsPlaying] = useState(false);
|
const [isPlaying, setIsPlaying] = useState(false);
|
||||||
const [showAutoplayCountdown, setShowAutoplayCountdown] = useState(false);
|
const [showAutoplayCountdown, setShowAutoplayCountdown] = useState(false);
|
||||||
|
@ -85,7 +84,6 @@ function VideoViewer(props: Props) {
|
||||||
|
|
||||||
function doTrackingFirstPlay(e: Event, data: any) {
|
function doTrackingFirstPlay(e: Event, data: any) {
|
||||||
analytics.videoStartEvent(claimId, data.secondsToLoad);
|
analytics.videoStartEvent(claimId, data.secondsToLoad);
|
||||||
|
|
||||||
doAnalyticsView(uri, data.secondsToLoad).then(() => {
|
doAnalyticsView(uri, data.secondsToLoad).then(() => {
|
||||||
claimRewards();
|
claimRewards();
|
||||||
});
|
});
|
||||||
|
@ -110,7 +108,8 @@ function VideoViewer(props: Props) {
|
||||||
setIsPlaying(false);
|
setIsPlaying(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const onPlayerReady = useCallback((player: Player) => {
|
const onPlayerReady = useCallback(
|
||||||
|
(player: Player) => {
|
||||||
if (!embedded) {
|
if (!embedded) {
|
||||||
player.muted(muted);
|
player.muted(muted);
|
||||||
player.volume(volume);
|
player.volume(volume);
|
||||||
|
@ -125,17 +124,8 @@ function VideoViewer(props: Props) {
|
||||||
});
|
});
|
||||||
|
|
||||||
Promise.race([playPromise, timeoutPromise]).catch(error => {
|
Promise.race([playPromise, timeoutPromise]).catch(error => {
|
||||||
if (error === PLAY_TIMEOUT_ERROR) {
|
|
||||||
// The player promise hung
|
|
||||||
// This is probably in firefox
|
|
||||||
// The second attempt usually works
|
|
||||||
player.play();
|
|
||||||
} else {
|
|
||||||
// Autoplay was actually blocked by the browser
|
|
||||||
// Reset everything so the user sees the thumbnail/play button and can start it on their own
|
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
setIsPlaying(false);
|
setIsPlaying(false);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +147,9 @@ function VideoViewer(props: Props) {
|
||||||
if (position) {
|
if (position) {
|
||||||
player.currentTime(position);
|
player.currentTime(position);
|
||||||
}
|
}
|
||||||
}, []);
|
},
|
||||||
|
[uri]
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -343,7 +343,6 @@
|
||||||
.vjs-big-play-button {
|
.vjs-big-play-button {
|
||||||
@extend .button--icon;
|
@extend .button--icon;
|
||||||
@extend .button--play;
|
@extend .button--play;
|
||||||
background-color: rgba(0, 0, 0, 0.6);
|
|
||||||
border: none;
|
border: none;
|
||||||
position: static;
|
position: static;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
@ -359,6 +358,13 @@
|
||||||
.video-js.vjs-paused {
|
.video-js.vjs-paused {
|
||||||
.vjs-big-play-button {
|
.vjs-big-play-button {
|
||||||
display: block;
|
display: block;
|
||||||
|
background-color: rgba(0, 0, 0, 0.6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-js:hover {
|
||||||
|
.vjs-big-play-button {
|
||||||
|
background-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue