Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various UI things in our paella integration #1208

Merged
merged 3 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"hls.js": "^1.5.7",
"i18next": "^23.10.0",
"i18next-browser-languagedetector": "^7.2.0",
"paella-basic-plugins": "1.44.7",
"paella-basic-plugins": "1.44.10",
"paella-core": "1.48.1",
"paella-mp4multiquality-plugin": "1.47.1",
"paella-skins": "1.48.0",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/icons/settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 80 additions & 21 deletions frontend/src/ui/player/Paella.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ const PaellaPlayer: React.FC<PaellaPlayerProps> = ({ event }) => {
getManifestFileUrl: async () => "dummy-file-url",
loadVideoManifest: async () => manifest,
loadDictionaries: (player: Paella) => player.setLanguage(i18n.language),
configResourcesUrl: "/~assets/paella",
customPluginContext: [
getBasicPluginsContext(),
getZoomPluginContext(),
Expand Down Expand Up @@ -203,6 +204,29 @@ const PaellaPlayer: React.FC<PaellaPlayerProps> = ({ event }) => {
},
".popup-container": {
zIndex: 500050,
"& .button-group": {
"& .button-plugin-wrapper:hover, button:hover": {
backgroundColor: "var(--highlight-bg-color-hover)",
},
},
'& button[name="es.upv.paella.qualitySelector"] div': {
display: "flex",
justifyContent: "center",
alignItems: "center",
i: {
display: "none",
},
span: {
color: "var(--main-fg-color)",
backgroundColor: "var(--main-bg-color)",
border: "2px solid var(--main-fg-color)",
borderRadius: 3,
margin: "0 !important",
fontSize: "10px !important",
fontWeight: "bold",
padding: "2px 3px",
},
},
},
}} />
<div
Expand All @@ -225,6 +249,22 @@ const PaellaPlayer: React.FC<PaellaPlayerProps> = ({ event }) => {

...colors,

// Buttons inside video containers
"& .video-canvas": {
containerName: "video-canvas",
containerType: "inline-size",
},
"@container video-canvas (width < 400px)": {
"& .button-area": {
padding: "2px !important",
top: "unset !important",
"& button": {
transform: "scale(0.7)",
margin: "-3px !important",
},
},
},

"& .playback-bar": {
transition: "background 0.08s",
},
Expand All @@ -235,6 +275,10 @@ const PaellaPlayer: React.FC<PaellaPlayerProps> = ({ event }) => {
opacity: "unset",
},

'& div[name="es.upv.paella.customTimeProgressIndicator"]': {
fontWeight: "bold",
},

'& button[name="es.upv.paella.backwardButtonPlugin"] div': {
marginTop: "-7px !important",
"svg text": {
Expand All @@ -250,23 +294,6 @@ const PaellaPlayer: React.FC<PaellaPlayerProps> = ({ event }) => {
},
},

'& button[name="es.upv.paella.qualitySelector"] div': {
display: "flex",
justifyContent: "center",
alignItems: "center",
i: {
display: "none",
},
span: {
color: "black",
backgroundColor: "var(--main-fg-color)",
borderRadius: 3,
margin: "0 !important",
fontSize: "10px !important",
padding: "2px 3px",
},
},

"& .paella-fallback-fullscreen": {
position: "fixed",
top: 0,
Expand Down Expand Up @@ -322,6 +349,20 @@ const PAELLA_CONFIG = {
restoreVolume: true,
},

buttonGroups: [
{
enabled: true,
groupName: "optionsContainer",
description: "Options",
icon: "icons/settings.svg",
order: 6,
side: "right",
tabIndex: 6,
parentContainer: "playbackBar",
ariaLabel: "Show options",
},
],

plugins: {
"es.upv.paella.singleVideoDynamic": {
enabled: true,
Expand Down Expand Up @@ -368,6 +409,7 @@ const PAELLA_CONFIG = {
title: "Presenter and presentation",
},
],
tabIndexStart: 11,
},

// Canvas plugins
Expand Down Expand Up @@ -456,33 +498,39 @@ const PAELLA_CONFIG = {
tabIndex: 5,
},

// Buttons on the right side
// Buttons on the right side inside settings menu
"es.upv.paella.qualitySelector": {
enabled: true,
side: "right",
order: 6,
tabIndex: 6,
parentContainer: "optionsContainer",
showForSingleQuality: true,
},
"es.upv.paella.layoutSelector": {
enabled: true,
side: "right",
showIcons: false,
order: 7,
tabIndex: 7,
parentContainer: "optionsContainer",
},
"es.upv.paella.captionsSelectorPlugin": {
"es.upv.paella.frameControlButtonPlugin": {
enabled: true,
side: "right",
order: 8,
tabIndex: 8,
parentContainer: "optionsContainer",
},
"es.upv.paella.fullscreenButton": {

// Buttons on the right side outside of settings menu
"es.upv.paella.captionsSelectorPlugin": {
enabled: true,
side: "right",
order: 9,
tabIndex: 9,
},
"es.upv.paella.frameControlButtonPlugin": {
"es.upv.paella.fullscreenButton": {
enabled: true,
side: "right",
order: 10,
Expand All @@ -499,6 +547,17 @@ const PAELLA_CONFIG = {
drawBackground: false,
},

"es.upv.paella.prevSlideNavigatorButton": {
enabled: true,
content: ["presentation"],
order: 0,
},
"es.upv.paella.nextSlideNavigatorButton": {
enabled: true,
content: ["presentation"],
order: 1,
},

// Data plugin
"es.upv.paella.localStorageDataPlugin": {
"enabled": true,
Expand Down
4 changes: 4 additions & 0 deletions frontend/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ const config: CallableOption = (_env, argv) => ({
{ from: path.join(APP_PATH, "fonts.css"), to: path.join(OUT_PATH) },
{ from: path.join(__dirname, "static"), to: OUT_PATH },
{ from: PAELLA_SKIN_PATH, to: path.join(OUT_PATH, "paella") },
{
from: path.join(APP_PATH, "icons/settings.svg"),
to: path.join(OUT_PATH, "paella/icons"),
},
],
}),
compiler => {
Expand Down
Loading