Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Introduce lucide player theme

Chocobozzz5edab3f79598
diff --git a/client/src/app/+video-watch/video-watch.component.ts b/client/src/app/+video-watch/video-watch.component.ts
index e5b34857d5..60a0c2bf47 100644
--- a/client/src/app/+video-watch/video-watch.component.ts
+++ b/client/src/app/+video-watch/video-watch.component.ts
@@ -51,6 +51,7 @@ import {
PeerTubePlayer,
PeerTubePlayerConstructorOptions,
PeerTubePlayerLoadOptions,
+ PeerTubePlayerTheme,
PlayerMode,
videojs,
VideojsPlayer
@@ -79,6 +80,7 @@ const debugLogger = debug('peertube:watch:VideoWatchComponent')
type URLOptions = {
playerMode: PlayerMode
+ playerTheme?: PeerTubePlayerTheme
startTime: number | string
stopTime: number | string
@@ -814,6 +816,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
return {
mode,
+ theme: urlOptions.playerTheme || 'default',
autoplay: this.isAutoplay(video, loggedInOrAnonymousUser),
forceAutoplay,
@@ -1032,6 +1035,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
subtitle: queryParams.subtitle,
playerMode: queryParams.mode,
+ playerTheme: queryParams.playerTheme,
playbackRate: queryParams.playbackRate,
controlBar: toBoolean(queryParams.controlBar),
diff --git a/client/src/standalone/player/src/peertube-player.ts b/client/src/standalone/player/src/peertube-player.ts
index f434265133..b037dd934d 100644
--- a/client/src/standalone/player/src/peertube-player.ts
+++ b/client/src/standalone/player/src/peertube-player.ts
@@ -103,6 +103,12 @@ export class PeerTubePlayer {
await this.buildPlayerIfNeeded()
+ for (const theme of [ 'default', 'lucide' ]) {
+ this.player.removeClass('vjs-peertube-theme-' + theme)
+ }
+
+ this.player.addClass('vjs-peertube-theme-' + loadOptions.theme)
+
if (this.currentLoadOptions.mode === 'p2p-media-loader') {
await this.loadP2PMediaLoader()
} else {
diff --git a/client/src/standalone/player/src/sass/shared/_player-mixins.scss b/client/src/standalone/player/src/sass/shared/_player-mixins.scss
new file mode 100644
index 0000000000..82cf485fc4
--- /dev/null
+++ b/client/src/standalone/player/src/sass/shared/_player-mixins.scss
@@ -0,0 +1,32 @@
+@use "sass:color";
+
+@mixin inject-icon($svg-path, $size) {
+ .vjs-icon-placeholder {
+ display: inline-block;
+ width: $size;
+ height: $size;
+ vertical-align: middle;
+
+ mask-image: url($svg-path);
+ -webkit-mask-image: url($svg-path);
+ mask-size: cover;
+ -webkit-mask-size: cover;
+ background-color: currentColor;
+
+ &::before {
+ content: "";
+ }
+ }
+}
+
+@mixin update-icon($svg-path, $size: "") {
+ .vjs-icon-placeholder {
+ mask-image: url($svg-path);
+ -webkit-mask-image: url($svg-path);
+
+ @if ($size) {
+ width: $size;
+ height: $size;
+ }
+ }
+}
diff --git a/client/src/standalone/player/src/sass/shared/_player-variables.scss b/client/src/standalone/player/src/sass/shared/_player-variables.scss
index 809693b103..e939d3c4ec 100644
--- a/client/src/standalone/player/src/sass/shared/_player-variables.scss
+++ b/client/src/standalone/player/src/sass/shared/_player-variables.scss
@@ -1,5 +1,4 @@
@use "sass:color";
-@use "bootstrap/scss/functions" as *;
$primary-foreground-color: #fff;
$primary-foreground-opacity: 0.9;
@@ -8,13 +7,4 @@ $primary-background-color: rgba(0, 0, 0, 0.8);
$font-size: 13px;
-$control-bar-height: 38px;
-$control-bar-icon-size: 26px;
-$control-bar-font-size: 14px;
-$control-bar-play-font-size: 34px;
-$control-bar-next-previous-play-font-size: 14px;
-$control-bar-button-width: 34px;
-
-$progress-margin: 10px;
-
$dock-padding: 20px;
diff --git a/client/src/standalone/player/src/sass/shared/control-bar.scss b/client/src/standalone/player/src/sass/shared/control-bar.scss
index aa7f17cf53..d88b43a9f0 100644
--- a/client/src/standalone/player/src/sass/shared/control-bar.scss
+++ b/client/src/standalone/player/src/sass/shared/control-bar.scss
@@ -2,6 +2,7 @@
@use "_variables" as *;
@use "_mixins" as *;
@use "./_player-variables" as *;
+@use "./_player-mixins" as *;
$slider-height: 3px;
$slider-hover-height: 5px;
@@ -42,12 +43,16 @@ $chapter-marker-size: 9px;
.video-js.vjs-peertube-skin .vjs-control-bar {
--first-last-element-margin: 10px;
+ --icon-size: 26px;
+ --control-bar-height: 38px;
+ --control-bar-font-size: 14px;
+ --button-width: 34px;
+ --button-implicit-padding-x: calc((var(--button-width) - var(--icon-size)) / 2);
+ --peertube-link-max-width: 150px;
z-index: 100;
- height: $control-bar-height;
- background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));
- box-shadow: 0 -15px 40px 10px rgba(0, 0, 0, 0.2);
+ height: var(--control-bar-height);
text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
transition: visibility 0.3s, opacity 0.3s !important;
@@ -67,6 +72,8 @@ $chapter-marker-size: 9px;
}
.vjs-progress-control,
+ .vjs-next-video,
+ .vjs-previous-video,
.vjs-play-control,
.vjs-playback-rate,
.vjs-mute-control,
@@ -76,18 +83,35 @@ $chapter-marker-size: 9px;
.vjs-theater-control,
.vjs-caption-toggle-control,
.vjs-settings {
- color: pvar(--embed-fg) !important;
+ color: pvar(--embed-fg);
- opacity: $primary-foreground-opacity;
transition: opacity 0.1s;
- &:hover {
- opacity: $primary-foreground-opacity-hover;
+ &:not(.vjs-disabled) {
+ opacity: $primary-foreground-opacity;
+
+ &:hover {
+ opacity: $primary-foreground-opacity-hover;
+ }
}
}
+ .vjs-next-video,
+ .vjs-previous-video {
+ @include inject-icon("./svg/next.svg", 15px);
+ }
+
+ .vjs-previous-video .vjs-icon-placeholder {
+ transform: rotate(180deg);
+ }
+
+ .vjs-volume-panel,
+ .vjs-mute-control {
+ width: var(--button-width);
+ }
+
.vjs-volume-panel {
- width: $control-bar-button-width;
+ transition: none; // Override videojs style to not have a transition when we increase icon sizes
&.vjs-hover .vjs-volume-control,
&:active .vjs-volume-control,
@@ -101,18 +125,18 @@ $chapter-marker-size: 9px;
&.vjs-hover .vjs-mute-control ~ .vjs-volume-control,
& .vjs-volume-control.vjs-slider-active {
&.vjs-volume-vertical {
- left: -2.5em;
+ // Adjust the relative position of the bar
+ left: calc(var(--button-width) * -1);
}
}
}
- .vjs-volume-vertical {
- bottom: 6.75em;
- height: 7em;
- }
-
.vjs-volume-bar.vjs-slider-vertical {
margin: 1em auto;
+
+ .vjs-volume-level::before {
+ left: -0.35em;
+ }
}
.vjs-volume-vertical {
@@ -120,6 +144,10 @@ $chapter-marker-size: 9px;
z-index: 120;
background-color: var(--embed-background-color);
border-radius: 10px;
+ bottom: 6.75em;
+ height: 7em;
+ width: var(--button-width);
+ font-size: var(--control-bar-font-size);
}
.vjs-current-time,
@@ -129,47 +157,105 @@ $chapter-marker-size: 9px;
opacity: $primary-foreground-opacity;
}
- .vjs-progress-control {
- position: absolute;
- top: -18px;
- z-index: 100; // On top of the progress bar
- width: calc(100% - 2 * #{$progress-margin});
- height: 20px;
- align-items: flex-end;
+ .vjs-time-control {
+ line-height: var(--control-bar-height);
- @include margin-left($progress-margin);
+ &.vjs-current-time {
+ font-size: var(--control-bar-font-size);
+ display: inline-block;
+ padding: 0;
- .vjs-slider {
- margin: 0 0 5px;
- border-radius: 0;
- background-color: rgba(255, 255, 255, 0.2);
- height: $slider-height;
- transition: none;
+ @include margin-left(var(--button-implicit-padding-x));
- .vjs-play-progress {
- background: pvar(--embed-fg);
-
- // Not display the circle if the progress is not hovered
- &::before {
- opacity: 0;
- transition: opacity 0.1s ease;
- font-size: 15px;
- z-index: 3; // On top of chapter marker
- }
+ .vjs-current-time-display {
+ &::after {
+ content: "/";
- // Only used on mobile
- .vjs-time-tooltip {
- display: none;
+ @include margin(0, 1px, 0, 2px);
}
}
+ }
- .vjs-load-progress {
- &,
- div {
- background: rgba(255, 255, 255, 0.2);
- }
+ &.vjs-duration {
+ font-size: var(--control-bar-font-size);
+ display: inline-block;
+ padding: 0;
+
+ @include margin-right(var(--button-implicit-padding-x));
+
+ .vjs-duration-display {
+ line-height: calc(var(--control-bar-height) - 1px);
}
}
+
+ &.vjs-remaining-time {
+ display: none;
+ }
+ }
+
+ .vjs-pt-live-control {
+ width: auto;
+ opacity: $primary-foreground-opacity; // videojs adds a .vjs-disabled when the live is synced
+ font-size: var(--control-bar-font-size);
+
+ @include margin-right(auto);
+
+ &:not(.synced-with-live-edge) {
+ cursor: pointer;
+
+ &:hover {
+ opacity: $primary-foreground-opacity-hover;
+ }
+ }
+
+ .vjs-live-display {
+ white-space: nowrap;
+ }
+ }
+
+ .vjs-settings {
+ cursor: pointer;
+ width: var(--button-width);
+
+ @include disable-outline;
+ @include inject-icon("./svg/settings.svg", calc(var(--icon-size) - 4px));
+ }
+
+ .vjs-fullscreen-control {
+ width: var(--button-width);
+ margin-inline-start: 2px;
+
+ @include disable-outline;
+ @include inject-icon("./svg/fullscreen.svg", var(--icon-size));
+ }
+
+ .vjs-peertube-link {
+ text-decoration: none;
+ line-height: var(--control-bar-height);
+ padding: 0 5px;
+ max-width: var(--peertube-link-max-width);
+ font-size: var(--control-bar-font-size);
+
+ @include ellipsis;
+ @include disable-outline;
+ @include disable-default-a-behaviour;
+ }
+
+ .vjs-caption-toggle-control {
+ // Redefined if the player parent has captions class
+ display: none;
+ }
+
+ .vjs-theater-control {
+ width: var(--button-width);
+ cursor: pointer;
+
+ @include disable-outline;
+ @include inject-icon("./svg/theater.svg", calc(var(--icon-size) - 4px));
+
+ .vjs-icon-placeholder {
+ transition: transform 0.2s ease;
+ }
}
.vjs-progress-control:hover .vjs-slider,
@@ -185,91 +271,148 @@ $chapter-marker-size: 9px;
}
}
- .vjs-play-control {
- cursor: pointer;
- width: $control-bar-button-width;
+ .vjs-slider {
+ background-color: rgba(255, 255, 255, 0.2);
- @include disable-outline;
+ .vjs-play-progress {
+ background: pvar(--embed-fg);
- .vjs-icon-placeholder::before {
- font-size: $control-bar-play-font-size;
- line-height: unset;
- position: relative;
- top: -1px;
+ // Not display the circle if the progress is not hovered
+ &::before {
+ opacity: 0;
+ transition: opacity 0.1s ease;
+ font-size: 15px;
+ z-index: 3; // On top of chapter marker
+ }
+
+ // Only used on mobile
+ .vjs-time-tooltip {
+ display: none;
+ }
+ }
+
+ .vjs-load-progress {
+ &,
+ div {
+ background: rgba(255, 255, 255, 0.2);
+ }
}
}
- .vjs-time-control {
- line-height: inherit;
+ .vjs-caption-toggle-control {
+ width: var(--button-width);
+ }
+}
- &.vjs-current-time {
- font-size: $control-bar-font-size;
- display: inline-block;
- padding: 0;
+.vjs-peertube-skin.vjs-has-captions .vjs-caption-toggle-control {
+ display: block !important;
+}
- @include margin-left(0.5em);
+.vjs-peertube-skin.vjs-fullscreen .vjs-control-bar {
+ --peertube-link-max-width: 200px;
+}
- .vjs-current-time-display {
- line-height: calc(#{$control-bar-height} - 1px);
+// ---------------------------------------------------------------------------
+// PeerTube Default Theme
+// ---------------------------------------------------------------------------
- &::after {
- content: "/";
+// Play/pause animations
+.video-js.vjs-peertube-theme-default.vjs-has-started .vjs-play-control {
+ &.vjs-playing {
+ animation: remove-pause-button 0.25s ease;
+ }
- @include margin(0, 1px, 0, 2px);
- }
- }
+ &.vjs-paused {
+ animation: add-play-button 0.25s ease;
+ }
+
+ @keyframes remove-pause-button {
+ 0% {
+ transform: rotate(90deg);
+ }
+ 100% {
+ transform: rotate(0deg);
}
+ }
- &.vjs-duration {
- font-size: $control-bar-font-size;
- display: inline-block;
- padding: 0;
+ @keyframes add-play-button {
+ 0% {
+ transform: rotate(-90deg);
+ }
+ 100% {
+ transform: rotate(0deg);
+ }
+ }
+}
- .vjs-duration-display {
- line-height: calc(#{$control-bar-height} - 1px);
- }
+.video-js.vjs-peertube-theme-default .vjs-control-bar {
+ background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));
+ box-shadow: 0 -15px 40px 10px rgba(0, 0, 0, 0.2);
+
+ .vjs-progress-control {
+ $progress-margin: 10px;
+
+ position: absolute;
+ top: -18px;
+ z-index: 100; // On top of the progress bar
+ width: calc(100% - 2 * #{$progress-margin});
+ height: 20px;
+ align-items: flex-end;
+
+ @include margin-left($progress-margin);
+
+ .vjs-slider {
+ margin: 0 0 3px;
+ height: 3px;
}
+ }
- &.vjs-remaining-time {
- display: none;
+ .vjs-play-control {
+ cursor: pointer;
+ width: var(--button-width);
+
+ @include disable-outline;
+
+ .vjs-icon-placeholder::before {
+ font-size: 34px;
+ line-height: var(--control-bar-height);
}
}
+ .vjs-current-time {
+ @include margin-left(0.5rem !important);
+ }
+
.vjs-pt-live-control {
+ margin: auto 10px;
padding: 5px 7px;
border-radius: 3px;
height: fit-content;
- margin: auto 10px;
font-weight: bold;
max-width: fit-content;
- opacity: 1 !important;
line-height: normal;
position: relative;
- top: -1px;
width: auto;
+ @include margin-right(auto);
+
&.synced-with-live-edge {
background: #d7281c;
}
&:not(.synced-with-live-edge) {
- cursor: pointer;
background: #80807f;
}
}
- .vjs-live-display {
- white-space: nowrap;
- }
-
.vjs-peertube {
- line-height: $control-bar-height;
+ line-height: var(--control-bar-height);
text-align: end;
overflow: hidden;
- font-size: $control-bar-font-size;
+ font-size: var(--control-bar-font-size);
- @include margin-right(6px);
@include margin-left(auto);
+ @include margin-right(6px);
.vjs-peertube-displayed {
display: block;
@@ -315,161 +458,169 @@ $chapter-marker-size: 9px;
}
}
- .vjs-next-video,
- .vjs-previous-video {
- width: $control-bar-button-width - 4px;
- cursor: pointer;
-
- &.vjs-disabled {
- cursor: default;
- }
-
- .icon {
- &.icon-next,
- &.icon-previous {
- mask-image: url("./svg/next.svg");
- -webkit-mask-image: url("./svg/next.svg");
- mask-size: cover;
- -webkit-mask-size: cover;
-
- background-color: #fff;
- width: $control-bar-next-previous-play-font-size;
- height: $control-bar-next-previous-play-font-size;
- display: inline-block;
- }
-
- &.icon-previous {
- transform: rotate(180deg);
- }
- }
- }
-
.vjs-mute-control {
padding: 0;
- width: $control-bar-icon-size;
@include disable-outline;
- .vjs-icon-placeholder {
- display: inline-block;
- width: $control-bar-icon-size;
- height: $control-bar-icon-size;
- vertical-align: middle;
- background: url("./svg/volume.svg") no-repeat;
- background-size: contain;
-
- &::before {
- content: "";
- }
+ &:not(.vjs-vol-0) {
+ @include inject-icon("./svg/volume.svg", var(--icon-size));
}
- &.vjs-vol-0 .vjs-icon-placeholder {
- background: url("./svg/volume-mute.svg") no-repeat;
- background-size: contain;
+ &.vjs-vol-0 {
+ @include inject-icon("./svg/volume-mute.svg", var(--icon-size));
}
}
- .vjs-settings {
- cursor: pointer;
- width: $control-bar-button-width;
+ .vjs-caption-toggle-control {
+ &,
+ &:hover {
+ opacity: 0.5 !important;
+ }
- @include disable-outline;
+ &.enabled,
+ &.enabled:hover {
+ opacity: $primary-foreground-opacity !important;
+ }
- .vjs-icon-placeholder {
- display: inline-block;
- height: $control-bar-icon-size - 4px;
- width: $control-bar-icon-size - 4px;
- vertical-align: middle;
- background: url("./svg/settings.svg") no-repeat;
- background-size: contain;
+ &:focus {
+ text-shadow: none;
+ }
- &::before {
- content: "";
- }
+ > .vjs-icon-placeholder::before {
+ font-size: 2.3em;
+ line-height: 38px;
}
}
.vjs-peertube-link {
- text-decoration: none;
- line-height: $control-bar-height;
font-weight: $font-semibold;
- padding: 0 5px;
- max-width: 150px;
-
- @include ellipsis;
- @include disable-outline;
- @include disable-default-a-behaviour;
}
+}
- .vjs-theater-control {
- width: $control-bar-button-width;
- cursor: pointer;
+// ---------------------------------------------------------------------------
+// Lucide theme
+// ---------------------------------------------------------------------------
- @include disable-outline;
+.video-js.vjs-peertube-theme-lucide {
+ .vjs-control-bar {
+ --first-last-element-margin: 1rem;
+ --control-bar-height: 3.5rem;
+ --icon-size: 1.375rem; // 22px
+ --button-width: 2.25rem;
- .vjs-icon-placeholder {
- transition: transform 0.2s ease;
- display: inline-block;
- width: $control-bar-icon-size - 4px;
- height: $control-bar-icon-size - 4px;
- vertical-align: middle;
- background: url("./svg/theater.svg") no-repeat;
- background-size: contain;
+ font-family: Roboto, "helvetica neue", "segoe ui", arial, sans-serif;
+ background: linear-gradient(to bottom, hsl(0 0% 0% / 0) 0%, hsl(0 0% 0%) 100%);
- &::before {
- content: "";
- }
+ .vjs-play-control {
+ width: var(--button-width);
}
- }
- .vjs-caption-toggle-control {
- // Redefined if the player parent has captions class
- display: none;
- width: $control-bar-button-width;
+ .vjs-play-control:not(.vjs-paused) {
+ @include inject-icon("./svg/theme-lucide/pause-lucide.svg", var(--icon-size));
+ }
- &,
- &:hover {
- opacity: 0.5;
+ .vjs-play-control.vjs-paused:not(.vjs-ended) {
+ @include inject-icon("./svg/theme-lucide/play-lucide.svg", var(--icon-size));
}
- &.enabled,
- &.enabled:hover {
- opacity: $primary-foreground-opacity;
+ .vjs-play-control.vjs-paused.vjs-ended {
+ @include inject-icon("./svg/theme-lucide/restart-lucide.svg", var(--icon-size));
}
- &:focus {
- text-shadow: none;
+ .vjs-peertube {
+ display: none;
}
- > .vjs-icon-placeholder::before {
- font-size: 2.3em;
- line-height: 38px;
+ .vjs-settings {
+ @include update-icon("./svg/theme-lucide/settings-lucide.svg", var(--icon-size));
}
- }
- .vjs-fullscreen-control {
- width: $control-bar-button-width;
- margin-inline-start: 2px;
+ .vjs-fullscreen-control {
+ @include update-icon("./svg/theme-lucide/open-fullscreen-lucide.svg", var(--icon-size));
+ }
- @include disable-outline;
+ .vjs-caption-toggle-control:not(.enabled) {
+ @include inject-icon("./svg/theme-lucide/cc-disabled-lucide.svg", var(--icon-size));
+ }
- .vjs-icon-placeholder {
- display: inline-block;
- width: $control-bar-icon-size;
- height: $control-bar-icon-size;
- vertical-align: middle;
- background: url("./svg/fullscreen.svg") no-repeat;
- background-size: contain;
+ .vjs-caption-toggle-control.enabled {
+ @include inject-icon("./svg/theme-lucide/cc-enabled-lucide.svg", var(--icon-size));
+ }
- &::before {
+ .vjs-mute-control {
+ @include inject-icon("./svg/theme-lucide/volume-lucide.svg", var(--icon-size));
+ }
+
+ .vjs-mute-control.vjs-vol-2 {
+ @include update-icon("./svg/theme-lucide/volume-2-lucide.svg", var(--icon-size));
+ }
+
+ .vjs-mute-control.vjs-vol-1 {
+ @include update-icon("./svg/theme-lucide/volume-1-lucide.svg", var(--icon-size));
+ }
+
+ .vjs-mute-control.vjs-vol-0 {
+ @include update-icon("./svg/theme-lucide/volume-0-lucide.svg", var(--icon-size));
+ }
+
+ .vjs-progress-control {
+ .vjs-slider,
+ .vjs-load-progress,
+ .vjs-play-progress {
+ border-radius: 8px;
+ }
+ }
+
+ .vjs-next-video,
+ .vjs-previous-video {
+ @include update-icon("./svg/theme-lucide/next-lucide.svg", var(--icon-size));
+ }
+
+ .vjs-pt-live-control {
+ margin: auto var(--button-implicit-padding-x);
+ line-height: var(--control-bar-height);
+
+ @include margin-right(auto);
+
+ .vjs-live-display::before {
+ width: 8px;
+ height: 8px;
+ border-radius: 8px;
content: "";
+ display: inline-block;
+ position: relative;
+ top: -1px;
+
+ @include margin-right(5px);
+ }
+
+ &.synced-with-live-edge .vjs-live-display::before {
+ background: rgba(225, 0, 45);
+ }
+
+ &:not(.synced-with-live-edge) .vjs-live-display::before {
+ background: #80807f;
}
}
}
+
+ &.vjs-fullscreen .vjs-control-bar {
+ --control-bar-height: 60px;
+ --icon-size: 1.625rem; // 26px;
+ --button-width: 2.5rem;
+ --control-bar-font-size: 1rem;
+ }
}
-.vjs-peertube-skin.vjs-has-captions .vjs-caption-toggle-control {
- display: block !important;
+.video-js.vjs-peertube-theme-lucide.vjs-fullscreen .vjs-control-bar {
+ .vjs-fullscreen-control {
+ @include update-icon("./svg/theme-lucide/close-fullscreen-lucide.svg", var(--icon-size));
+ }
+}
+
+.video-js.vjs-peertube-theme-lucide.vjs-size-570 .vjs-control-bar {
+ --first-last-element-margin: 10px;
}
// ---------------------------------------------------------------------------
diff --git a/client/src/standalone/player/src/sass/shared/nsfw.scss b/client/src/standalone/player/src/sass/shared/nsfw.scss
index 423683126c..3a5c5fca01 100644
--- a/client/src/standalone/player/src/sass/shared/nsfw.scss
+++ b/client/src/standalone/player/src/sass/shared/nsfw.scss
@@ -14,7 +14,7 @@
--nsfw-info-margin-y: 10px;
}
- button {
+ button:not(.vjs-disabled) {
cursor: pointer;
}
diff --git a/client/src/standalone/player/src/sass/shared/peertube-skin.scss b/client/src/standalone/player/src/sass/shared/peertube-skin.scss
index 0e5f3e6f9e..297af3606e 100644
--- a/client/src/standalone/player/src/sass/shared/peertube-skin.scss
+++ b/client/src/standalone/player/src/sass/shared/peertube-skin.scss
@@ -2,6 +2,7 @@
@use "_variables" as *;
@use "_mixins" as *;
@use "./_player-variables" as *;
+@use "./_player-mixins" as *;
body {
--embed-foreground-color: #{$primary-foreground-color};
@@ -22,8 +23,6 @@ body {
@mixin big-play-button-triangle-size($triangle-size) {
width: $triangle-size;
height: $triangle-size;
- top: calc(50% - #{math.div($triangle-size, 2)});
- left: calc(53% - #{math.div($triangle-size, 2)});
}
.video-js.vjs-peertube-skin {
@@ -44,41 +43,38 @@ body {
}
.vjs-big-play-button {
- $big-play-width: 1.2em;
- $big-play-height: 1.2em;
+ --big-play-button-size: 90px;
+ --big-play-button-icon-size: 45px;
+ font-size: unset;
outline: 0;
- font-size: 6em;
-
- border: 2px solid #fff;
+ border: 0;
+ width: calc(var(--big-play-button-size));
+ height: calc(var(--big-play-button-size));
+ margin-top: calc(var(--big-play-button-size) / 2 * -1);
+ line-height: 1;
+ background-color: pvar(--embed-big-play-bg);
border-radius: 100%;
-
- left: 50%;
- top: 50%;
- width: $big-play-width;
- height: $big-play-height;
- line-height: $big-play-height;
- margin-top: -(math.div($big-play-height, 2));
transition: 0.2s background-color;
- @include margin-left(-(math.div($big-play-width, 2)));
+ @include margin-left(calc(var(--big-play-button-size) / 2 * -1));
&::-moz-focus-inner {
border: 0;
padding: 0;
}
- .vjs-icon-placeholder::before {
- content: "";
- background-image: url("./svg/big-play-button.svg");
-
- @include big-play-button-triangle-size(45px);
- }
-
&:focus-visible,
&:hover {
background-color: pvar(--primary);
}
+
+ .vjs-icon-placeholder {
+ position: relative;
+ left: 2px;
+ }
+
+ @include inject-icon("./svg/big-play-button.svg", var(--big-play-button-icon-size));
}
// Show poster and controls when playing audio-only content
@@ -110,10 +106,6 @@ body {
}
}
- .vjs-big-play-button {
- background-color: pvar(--embed-big-play-bg);
- }
-
.vjs-poster {
outline: 0;
background-size: cover;
@@ -138,35 +130,6 @@ body {
}
}
-// Play/pause animations
-.vjs-has-started .vjs-play-control {
- &.vjs-playing {
- animation: remove-pause-button 0.25s ease;
- }
-
- &.vjs-paused {
- animation: add-play-button 0.25s ease;
- }
-
- @keyframes remove-pause-button {
- 0% {
- transform: rotate(90deg);
- }
- 100% {
- transform: rotate(0deg);
- }
- }
-
- @keyframes add-play-button {
- 0% {
- transform: rotate(-90deg);
- }
- 100% {
- transform: rotate(0deg);
- }
- }
-}
-
.vjs-error-display {
display: none;
}
@@ -203,27 +166,61 @@ body {
}
// ---------------------------------------------------------------------------
-// Custom media queries
+// Default theme
// ---------------------------------------------------------------------------
-.video-js.vjs-peertube-skin.vjs-size-570 {
+.video-js.vjs-peertube-theme-default {
.vjs-big-play-button {
- font-size: 5em;
- border-width: 3px;
+ border: 2px solid #fff;
+ }
+}
- .vjs-icon-placeholder::before {
- @include big-play-button-triangle-size(32px);
- }
+.video-js.vjs-peertube-theme-default.vjs-size-570 {
+ .vjs-big-play-button {
+ --big-play-button-size: 78px;
+ --big-play-button-icon-size: 32px;
+
+ border-width: 3px;
}
}
-.video-js.vjs-peertube-skin.vjs-size-350 {
+.video-js.vjs-peertube-theme-default.vjs-size-350 {
.vjs-big-play-button {
- font-size: 3em;
+ --big-play-button-size: 46px;
+ --big-play-button-icon-size: 20px;
+
border-width: 2px;
- .vjs-icon-placeholder::before {
- @include big-play-button-triangle-size(20px);
+ .vjs-icon-placeholder {
+ left: 1px;
}
}
}
+
+// ---------------------------------------------------------------------------
+// Lucide theme
+// ---------------------------------------------------------------------------
+
+.video-js.vjs-peertube-theme-lucide {
+ font-family: Roboto, "helvetica neue", "segoe ui", arial, sans-serif;
+
+ .vjs-big-play-button {
+ --big-play-button-icon-size: 50px;
+
+ color: rgba(255, 255, 255, 0.90);
+ }
+}
+
+.video-js.vjs-peertube-theme-lucide.vjs-size-570 {
+ .vjs-big-play-button {
+ --big-play-button-size: 78px;
+ --big-play-button-icon-size: 32px;
+ }
+}
+
+.video-js.vjs-peertube-theme-lucide.vjs-size-350 {
+ .vjs-big-play-button {
+ --big-play-button-size: 46px;
+ --big-play-button-icon-size: 20px;
+ }
+}
diff --git a/client/src/standalone/player/src/sass/shared/playlist.scss b/client/src/standalone/player/src/sass/shared/playlist.scss
index f39a8463b1..ff73e59e50 100644
--- a/client/src/standalone/player/src/sass/shared/playlist.scss
+++ b/client/src/standalone/player/src/sass/shared/playlist.scss
@@ -1,6 +1,6 @@
-@use '_variables' as *;
-@use '_mixins' as *;
-@use './_player-variables' as *;
+@use "_variables" as *;
+@use "_mixins" as *;
+@use "./_player-variables" as *;
$playlist-menu-width: 350px;
@@ -14,6 +14,7 @@ $playlist-menu-width: 350px;
z-index: 101;
transition: right 0.2s;
overflow-y: scroll;
+ line-height: normal;
// Hidden
right: -$playlist-menu-width;
@@ -44,8 +45,8 @@ $playlist-menu-width: 350px;
}
.cross {
- mask-image: url('./svg/x.svg');
- -webkit-mask-image: url('./svg/x.svg');
+ mask-image: url("./svg/x.svg");
+ -webkit-mask-image: url("./svg/x.svg");
mask-size: cover;
-webkit-mask-size: cover;
@@ -58,7 +59,6 @@ $playlist-menu-width: 350px;
}
.playlist-menu-displayed {
-
.vjs-playlist-menu {
right: 0;
display: block;
@@ -92,8 +92,8 @@ $playlist-menu-width: 350px;
}
.vjs-playlist-icon {
- mask-image: url('./svg/playlists.svg');
- -webkit-mask-image: url('./svg/playlists.svg');
+ mask-image: url("./svg/playlists.svg");
+ -webkit-mask-image: url("./svg/playlists.svg");
mask-size: cover;
-webkit-mask-size: cover;
diff --git a/client/src/standalone/player/src/sass/svg/fullscreen.svg b/client/src/standalone/player/src/sass/svg/fullscreen.svg
index b8de539e73..42f2d0a50e 100644
--- a/client/src/standalone/player/src/sass/svg/fullscreen.svg
+++ b/client/src/standalone/player/src/sass/svg/fullscreen.svg
@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
<g fill="none" fill-rule="evenodd" stroke="#fff" stroke-width="2">
<rect width="22" height="16" x="1" y="4" rx="1"/>
- <path stroke-linecap="round" stroke-linejoin="round" d="M20 10V7h-3M7 17H4v-3M20 14v3h-3M7 7H4v3"/>
+ <path stroke-linecap="round" stroke-linejoin="round" d="M20 10V7h-3M7 17H4v-3m16 0v3h-3M7 7H4v3"/>
</g>
</svg>
diff --git a/client/src/standalone/player/src/sass/svg/info.svg b/client/src/standalone/player/src/sass/svg/info.svg
index d0143c68bc..0670f0f241 100644
--- a/client/src/standalone/player/src/sass/svg/info.svg
+++ b/client/src/standalone/player/src/sass/svg/info.svg
@@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" class="feather feather-info">
<circle cx="12" cy="12" r="10"/>
- <path d="M12 16v-4M12 8h.01"/>
+ <path d="M12 16v-4m0-4h.01"/>
</svg>
diff --git a/client/src/standalone/player/src/sass/svg/link-2.svg b/client/src/standalone/player/src/sass/svg/link-2.svg
index 56657dd2fc..8d28d777e1 100644
--- a/client/src/standalone/player/src/sass/svg/link-2.svg
+++ b/client/src/standalone/player/src/sass/svg/link-2.svg
@@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" class="feather feather-link-2">
- <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3M8 12h8"/>
+ <path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3m-1 5h8"/>
</svg>
diff --git a/client/src/standalone/player/src/sass/svg/next.svg b/client/src/standalone/player/src/sass/svg/next.svg
index 489af340c5..b937346143 100644
--- a/client/src/standalone/player/src/sass/svg/next.svg
+++ b/client/src/standalone/player/src/sass/svg/next.svg
@@ -1,3 +1,3 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 12 12">
- <path fill="#fff" d="m0 12 8.5-6L0 0ZM10 0v12h2V0Z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <path fill="currentColor" d="m0 24 17-12L0 0ZM20 0v24h4V0Z" style="stroke-width:1.99998"/>
</svg>
diff --git a/client/src/standalone/player/src/sass/svg/playlists.svg b/client/src/standalone/player/src/sass/svg/playlists.svg
index bc25096c7a..cc196492f3 100644
--- a/client/src/standalone/player/src/sass/svg/playlists.svg
+++ b/client/src/standalone/player/src/sass/svg/playlists.svg
@@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none">
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M8.7 4.8h13.2M2.1 4.8h.55M8.7 19.2h13.2M2.1 19.2h.55M8.7 12h13.2M2.1 12h.55"/>
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M8.7 4.8h13.2m-19.8 0h.55M8.7 19.2h13.2m-19.8 0h.55M8.7 12h13.2M2.1 12h.55"/>
</svg>
diff --git a/client/src/standalone/player/src/sass/svg/settings.svg b/client/src/standalone/player/src/sass/svg/settings.svg
index 999eb71220..fde2a1cebe 100644
--- a/client/src/standalone/player/src/sass/svg/settings.svg
+++ b/client/src/standalone/player/src/sass/svg/settings.svg
@@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
- <path fill="none" fill-rule="evenodd" stroke="#fff" stroke-linejoin="round" stroke-width="2" d="M7.209 4.38A9 9 0 0 1 10 3.223V2a1 1 0 0 1 1.01-1h1.98c.558 0 1.01.444 1.01 1v1.223a9 9 0 0 1 2.791 1.157l.866-.865a1 1 0 0 1 1.42.006l1.402 1.401c.394.394.4 1.028.006 1.421l-.865.866c.533.845.929 1.786 1.157 2.791H22a1 1 0 0 1 1 1.01v1.98c0 .558-.444 1.01-1 1.01h-1.223a9 9 0 0 1-1.157 2.791l.865.866a1 1 0 0 1-.006 1.42l-1.401 1.402c-.394.394-1.028.4-1.421.006l-.866-.865A9 9 0 0 1 14 20.777V22a1 1 0 0 1-1.01 1h-1.98c-.558 0-1.01-.444-1.01-1v-1.223a9 9 0 0 1-2.791-1.157l-.866.865a1 1 0 0 1-1.42-.006L3.52 19.078a1 1 0 0 1-.006-1.421l.865-.866A9 9 0 0 1 3.223 14H2a1 1 0 0 1-1-1.01v-1.98c0-.558.444-1.01 1-1.01h1.223A9 9 0 0 1 4.38 7.209l-.865-.866a1 1 0 0 1 .006-1.42L4.922 3.52a1 1 0 0 1 1.421-.006zM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"/>
+ <path fill="none" stroke="#fff" stroke-linejoin="round" stroke-width="2" d="M7.209 4.38A9 9 0 0 1 10 3.223V2a1 1 0 0 1 1.01-1h1.98c.558 0 1.01.444 1.01 1v1.223a9 9 0 0 1 2.791 1.157l.866-.865a1 1 0 0 1 1.42.006l1.402 1.401c.394.394.4 1.028.006 1.421l-.865.866A9 9 0 0 1 20.777 10H22a1 1 0 0 1 1 1.01v1.98c0 .558-.444 1.01-1 1.01h-1.223a9 9 0 0 1-1.157 2.791l.865.866a1 1 0 0 1-.006 1.42l-1.401 1.402c-.394.394-1.028.4-1.421.006l-.866-.865A9 9 0 0 1 14 20.777V22a1 1 0 0 1-1.01 1h-1.98c-.558 0-1.01-.444-1.01-1v-1.223a9 9 0 0 1-2.791-1.157l-.866.865a1 1 0 0 1-1.42-.006L3.52 19.078a1 1 0 0 1-.006-1.421l.865-.866A9 9 0 0 1 3.223 14H2a1 1 0 0 1-1-1.01v-1.98c0-.558.444-1.01 1-1.01h1.223A9 9 0 0 1 4.38 7.209l-.865-.866a1 1 0 0 1 .006-1.42L4.922 3.52a1 1 0 0 1 1.421-.006zM12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"/>
</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theater.svg b/client/src/standalone/player/src/sass/svg/theater.svg
index f0f34e90f2..58b631fb29 100644
--- a/client/src/standalone/player/src/sass/svg/theater.svg
+++ b/client/src/standalone/player/src/sass/svg/theater.svg
@@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
- <path fill="none" fill-rule="evenodd" stroke="#fff" stroke-width="2" d="M1 6h22v12H1z"/>
+ <path fill="none" stroke="#fff" stroke-width="2" d="M1 6h22v12H1z"/>
</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/cc-disabled-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/cc-disabled-lucide.svg
new file mode 100644
index 0000000000..484991551e
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/cc-disabled-lucide.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" class="lucide lucide-closed-caption-icon lucide-closed-caption" viewBox="0 0 24 24">
+ <path d="M10 9.17a3 3 0 1 0 0 5.66M17 9.17a3 3 0 1 0 0 5.66"/>
+ <rect width="20" height="14" x="2" y="5" rx="2"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/cc-enabled-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/cc-enabled-lucide.svg
new file mode 100644
index 0000000000..d64dd854a9
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/cc-enabled-lucide.svg
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+ <mask id="a">
+ <rect width="20" height="14" x="2" y="5" fill="#fff" stroke="#fff" stroke-width="2" rx="2"/>
+ <path fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 9.17a3 3 0 1 0 0 5.66M17 9.17a3 3 0 1 0 0 5.66"/>
+ </mask>
+ <rect width="20" height="14" x="2" y="5" fill="currentColor" stroke="currentColor" mask="url(#a)" rx="2"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/close-fullscreen-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/close-fullscreen-lucide.svg
new file mode 100644
index 0000000000..3019dbb06f
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/close-fullscreen-lucide.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" class="lucide lucide-minimize2-icon lucide-minimize-2" viewBox="0 0 24 24">
+ <path d="m14 10 7-7M20 10h-6V4M3 21l7-7M4 14h6v6"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/next-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/next-lucide.svg
new file mode 100644
index 0000000000..4b136ff1a7
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/next-lucide.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" class="lucide lucide-skip-forward-icon lucide-skip-forward" viewBox="0 0 24 24">
+ <path d="M21 4v16M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/open-fullscreen-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/open-fullscreen-lucide.svg
new file mode 100644
index 0000000000..d477d67b5e
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/open-fullscreen-lucide.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" class="lucide lucide-maximize2-icon lucide-maximize-2" viewBox="0 0 24 24">
+ <path d="M15 3h6v6M21 3l-7 7M3 21l7-7M9 21H3v-6"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/pause-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/pause-lucide.svg
new file mode 100644
index 0000000000..2cd4457bd5
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/pause-lucide.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" class="lucide lucide-pause-icon lucide-pause" viewBox="0 0 24 24">
+ <rect width="5" height="18" x="14" y="3" rx="1"/>
+ <rect width="5" height="18" x="5" y="3" rx="1"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/play-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/play-lucide.svg
new file mode 100644
index 0000000000..84e3764aa7
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/play-lucide.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" class="lucide lucide-play-icon lucide-play" viewBox="0 0 24 24">
+ <path d="M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/restart-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/restart-lucide.svg
new file mode 100644
index 0000000000..b8b9c76e5e
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/restart-lucide.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rotate-ccw-icon lucide-rotate-ccw"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/settings-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/settings-lucide.svg
new file mode 100644
index 0000000000..1d62bf5af7
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/settings-lucide.svg
@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" class="lucide lucide-settings-icon lucide-settings" viewBox="0 0 24 24">
+ <path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"/>
+ <circle cx="12" cy="12" r="3"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/volume-0-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/volume-0-lucide.svg
new file mode 100644
index 0000000000..9e556427c2
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/volume-0-lucide.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" class="lucide lucide-volume-off-icon lucide-volume-off" viewBox="0 0 24 24">
+ <path d="M16 9a5 5 0 0 1 .95 2.293M19.364 5.636a9 9 0 0 1 1.889 9.96M2 2l20 20M7 7l-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11M9.828 4.172A.686.686 0 0 1 11 4.657v.686"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/volume-1-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/volume-1-lucide.svg
new file mode 100644
index 0000000000..0013a0f2e7
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/volume-1-lucide.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" class="lucide lucide-volume-icon lucide-volume" viewBox="0 0 24 24">
+ <path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/volume-2-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/volume-2-lucide.svg
new file mode 100644
index 0000000000..a9a50baada
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/volume-2-lucide.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" class="lucide lucide-volume1-icon lucide-volume-1" viewBox="0 0 24 24">
+ <path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298zM16 9a5 5 0 0 1 0 6"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/theme-lucide/volume-lucide.svg b/client/src/standalone/player/src/sass/svg/theme-lucide/volume-lucide.svg
new file mode 100644
index 0000000000..a1422cd552
--- /dev/null
+++ b/client/src/standalone/player/src/sass/svg/theme-lucide/volume-lucide.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" class="lucide lucide-volume2-icon lucide-volume-2" viewBox="0 0 24 24">
+ <path d="M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298zM16 9a5 5 0 0 1 0 6M19.364 18.364a9 9 0 0 0 0-12.728"/>
+</svg>
diff --git a/client/src/standalone/player/src/sass/svg/tick-white.svg b/client/src/standalone/player/src/sass/svg/tick-white.svg
index 59aa3600ad..fac0922c92 100644
--- a/client/src/standalone/player/src/sass/svg/tick-white.svg
+++ b/client/src/standalone/player/src/sass/svg/tick-white.svg
@@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
- <path fill="none" fill-rule="evenodd" stroke="#fff" stroke-linecap="round" stroke-width="2" d="M21 6 9 18m-5-5 5 5"/>
+ <path fill="none" stroke="#fff" stroke-linecap="round" stroke-width="2" d="M21 6 9 18m-5-5 5 5"/>
</svg>
diff --git a/client/src/standalone/player/src/sass/svg/volume-mute.svg b/client/src/standalone/player/src/sass/svg/volume-mute.svg
index d17f492dde..201f011809 100644
--- a/client/src/standalone/player/src/sass/svg/volume-mute.svg
+++ b/client/src/standalone/player/src/sass/svg/volume-mute.svg
@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
<g fill="none" fill-rule="evenodd" stroke="#fff" stroke-linecap="round" stroke-width="2">
<path stroke-linejoin="round" d="M2 8.997C2 8.447 2.443 8 3.01 8H6l6-4v16l-6-4H3.01C2.451 16 2 15.547 2 15.003z"/>
- <path d="m16 15 6-6M22.025 15 16 9"/>
+ <path d="m16 15 6-6m.025 6L16 9"/>
</g>
</svg>
diff --git a/client/src/standalone/player/src/shared/control-bar/next-previous-video-button.ts b/client/src/standalone/player/src/shared/control-bar/next-previous-video-button.ts
index 61eafaef55..a698b1e4ce 100644
--- a/client/src/standalone/player/src/shared/control-bar/next-previous-video-button.ts
+++ b/client/src/standalone/player/src/shared/control-bar/next-previous-video-button.ts
@@ -25,7 +25,7 @@ class NextPreviousVideoButton extends Button {
className: 'vjs-' + type + '-video'
}) as HTMLButtonElement
const nextIcon = videojs.dom.createEl('span', {
- className: 'icon icon-' + type
+ className: 'vjs-icon-placeholder vjs-icon-' + type
})
button.appendChild(nextIcon)
diff --git a/client/src/standalone/player/src/shared/peertube/peertube-plugin.ts b/client/src/standalone/player/src/shared/peertube/peertube-plugin.ts
index 6ae35ff35f..39c1ccd898 100644
--- a/client/src/standalone/player/src/shared/peertube/peertube-plugin.ts
+++ b/client/src/standalone/player/src/shared/peertube/peertube-plugin.ts
@@ -262,7 +262,6 @@ class PeerTubePlugin extends Plugin {
private initializePlayer () {
if (isMobile()) this.player.addClass('vjs-is-mobile')
- this.initSmoothProgressBar()
this.patchMenuEscapeKey()
this.player.ready(() => {
@@ -642,10 +641,6 @@ class PeerTubePlugin extends Plugin {
})
}
- // Thanks: https://github.com/videojs/video.js/issues/4460#issuecomment-312861657
- private initSmoothProgressBar () {
- }
-
private patchMenuEscapeKey () {
const Menu = videojs.getComponent('Menu') as any
diff --git a/client/src/standalone/player/src/shared/player-options-builder/control-bar-options-builder.ts b/client/src/standalone/player/src/shared/player-options-builder/control-bar-options-builder.ts
index 3de5110466..0c7216d1f1 100644
--- a/client/src/standalone/player/src/shared/player-options-builder/control-bar-options-builder.ts
+++ b/client/src/standalone/player/src/shared/player-options-builder/control-bar-options-builder.ts
@@ -84,7 +84,7 @@ export class ControlBarOptionsBuilder {
progressControl: {
children: {
seekBar: {
- children: [ 'loadProgressBar', 'mouseTimeDisplay', 'playProgressBar' ]
+ children: [ 'loadProgressBar', 'playProgressBar' ]
}
}
}
diff --git a/client/src/standalone/player/src/types/peertube-player-options.ts b/client/src/standalone/player/src/types/peertube-player-options.ts
index b908f0e96f..a4dbf0718e 100644
--- a/client/src/standalone/player/src/types/peertube-player-options.ts
+++ b/client/src/standalone/player/src/types/peertube-player-options.ts
@@ -4,6 +4,7 @@ import { PeerTubeDockPluginOptions } from '../shared/dock/peertube-dock-plugin'
import { PlaylistPluginOptions, VideoJSCaption, VideojsPlayer, VideoJSStoryboard } from './peertube-videojs-typings'
export type PlayerMode = 'web-video' | 'p2p-media-loader'
+export type PeerTubePlayerTheme = 'default' | 'lucide'
export type PeerTubePlayerConstructorOptions = {
playerElement: () => HTMLVideoElement
@@ -52,6 +53,8 @@ export type PeerTubePlayerConstructorOptions = {
export type PeerTubePlayerLoadOptions = {
mode: PlayerMode
+ theme: PeerTubePlayerTheme
+
startTime?: number | string
stopTime?: number | string
diff --git a/client/src/standalone/videos/shared/player-options-builder.ts b/client/src/standalone/videos/shared/player-options-builder.ts
index a6677466c4..7626280077 100644
--- a/client/src/standalone/videos/shared/player-options-builder.ts
+++ b/client/src/standalone/videos/shared/player-options-builder.ts
@@ -24,7 +24,14 @@ import {
UserLocalStorageKeys,
videoRequiresUserAuth
} from '../../../root-helpers'
-import { HLSOptions, PeerTubePlayerConstructorOptions, PeerTubePlayerLoadOptions, PlayerMode, VideoJSCaption } from '../../player'
+import {
+ HLSOptions,
+ PeerTubePlayerConstructorOptions,
+ PeerTubePlayerLoadOptions,
+ PeerTubePlayerTheme,
+ PlayerMode,
+ VideoJSCaption
+} from '../../player'
import { PeerTubePlugin } from './peertube-plugin'
import { PlayerHTML } from './player-html'
import { PlaylistTracker } from './playlist-tracker'
@@ -52,6 +59,7 @@ export class PlayerOptionsBuilder {
private p2pEnabled: boolean
private bigPlayBackgroundColor: string
private foregroundColor: string
+ private playerTheme: PeerTubePlayerTheme
private waitPasswordFromEmbedAPI = false
@@ -141,6 +149,8 @@ export class PlayerOptionsBuilder {
this.bigPlayBackgroundColor = getParamString(params, 'bigPlayBackgroundColor')
this.foregroundColor = getParamString(params, 'foregroundColor')
+
+ this.playerTheme = getParamString(params, 'playerTheme', 'default') as PeerTubePlayerTheme
} catch (err) {
logger.error('Cannot get params from URL.', err)
}
@@ -275,6 +285,7 @@ export class PlayerOptionsBuilder {
return {
mode: this.mode,
+ theme: this.playerTheme,
autoplay: !nsfwWarn && (forceAutoplay || alreadyPlayed || this.autoplay),
forceAutoplay,