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

🚀 Bump to 0.2.3 #6

Merged
merged 3 commits into from
Aug 11, 2023
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ To test the plugins, you need to run the following command:
$ npm run dev
```

Go to `http://localhost:8090/?id=test-video` to test the plugins.
Go to `http://localhost:8090/?id=test-video` to test the plugins. You will maybe need to chnages parameters in the url to test the plugins.

For example to test the **nextTimeButtonPlugin** and the **prevTimeButtonPlugin**, you need to add the following parameters to the url: `&time=3m,4m,5m`.

---

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cern-vc/cern-paella-plugins",
"version": "0.2.2",
"version": "0.2.3",
"description": "Paella plugins for cern use",
"main": "src/index.js",
"module": "dist/cern-paella-plugins.js",
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/ch.cern.paella.nextTimeButtonPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ export default class NextTimeButtonPlugin extends ButtonPlugin {
const addSuffix =
this.config.suffix !== undefined ? this.config.suffix : true;
this.suffix = addSuffix ? "s" : "";
this.icon = `<img src="${defaultForwardIcon}"/>`;
this.icon = defaultForwardIcon;
setTimeout(() => {
Array.from(this.iconElement.getElementsByClassName("time-text")).forEach(
(textIcon) => {
// eslint-disable-next-line no-param-reassign
textIcon.innerHTML = this.time + this.suffix;
},
}
);
}, 100);
}
Expand All @@ -74,7 +74,7 @@ export default class NextTimeButtonPlugin extends ButtonPlugin {
}
this.time = this.slots[this.player.currentPosition];
console.log(
`Jump to next time: ${this.time}. Slot ${this.player.currentPosition}`,
`Jump to next time: ${this.time}. Slot ${this.player.currentPosition}`
);
// const currentTime = await this.player.videoContainer.currentTime();
this.player.videoContainer.setCurrentTime(this.time);
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/ch.cern.paella.prevTimeButtonPlugin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ButtonPlugin } from "paella-core";
import defaultIcon from "./icons/previous-icon.svg";
import defaultBackwardIcon from "./icons/previous-icon.svg";

const params = new Proxy(new URLSearchParams(window.location.search), {
get: (searchParams, prop) => searchParams.get(prop),
Expand Down Expand Up @@ -56,13 +56,13 @@ export default class PrevTimeButtonPlugin extends ButtonPlugin {
const addSuffix =
this.config.suffix !== undefined ? this.config.suffix : true;
this.suffix = addSuffix ? "s" : "";
this.icon = `<img src="${defaultIcon}"/>`;
this.icon = defaultBackwardIcon;
setTimeout(() => {
Array.from(this.iconElement.getElementsByClassName("time-text")).forEach(
(textIcon) => {
// eslint-disable-next-line no-param-reassign
textIcon.innerHTML = this.time + this.suffix;
},
}
);
}, 100);
}
Expand All @@ -75,7 +75,7 @@ export default class PrevTimeButtonPlugin extends ButtonPlugin {
}
this.time = this.slots[this.player.currentPosition];
console.log(
`Jump to previous time: ${this.time}. Slot ${this.player.currentPosition}`,
`Jump to previous time: ${this.time}. Slot ${this.player.currentPosition}`
);
this.player.videoContainer.setCurrentTime(this.time);
}
Expand Down