refactor: convert seekTimeDuration to ms

This commit is contained in:
Tim 2021-07-19 16:18:55 +02:00
parent 0a95563f15
commit bb73cd8695
3 changed files with 5 additions and 5 deletions

View file

@ -3,7 +3,7 @@
const CHROMECAST_RECEIVER_APP_ID = '1634F54B';
const SUBTITLES_SIZES = [75, 100, 125, 150, 175, 200, 250];
const SUBTITLES_FONTS = ['Roboto', 'Arial', 'Halvetica', 'Times New Roman', 'Verdana', 'Courier', 'Lucida Console', 'sans-serif', 'serif', 'monospace'];
const SEEK_TIME_DURATIONS = [5, 10, 15, 20, 25, 30];
const SEEK_TIME_DURATIONS = [5000, 10000, 15000, 20000, 25000, 30000];
const CATALOG_PREVIEW_SIZE = 10;
const CATALOG_PAGE_SIZE = 100;
const NONE_EXTRA_VALUE = 'None';

View file

@ -344,7 +344,7 @@ const Player = ({ urlParams, queryParams }) => {
}
case 'ArrowRight': {
if (!subtitlesMenuOpen && !infoMenuOpen && videoState.time !== null) {
let seekTimeDuration = settings.seekTimeDuration * 1000;
let seekTimeDuration = settings.seekTimeDuration;
if (event.shiftKey === true) {
seekTimeDuration = seekTimeDuration * 3;
@ -357,7 +357,7 @@ const Player = ({ urlParams, queryParams }) => {
}
case 'ArrowLeft': {
if (!subtitlesMenuOpen && !infoMenuOpen && videoState.time !== null) {
let seekTimeDuration = settings.seekTimeDuration * 1000;
let seekTimeDuration = settings.seekTimeDuration;
if (event.shiftKey === true) {
seekTimeDuration = seekTimeDuration * 3;

View file

@ -113,11 +113,11 @@ const useProfileSettingsInputs = (profile) => {
const seekTimeDuration = useDeepEqualMemo(() => ({
options: CONSTANTS.SEEK_TIME_DURATIONS.map((size) => ({
value: `${size}`,
label: `${size}s`
label: `${size / 1000}s`
})),
selected: [`${profile.settings.seekTimeDuration}`],
renderLabelText: () => {
return `${profile.settings.seekTimeDuration}s`;
return `${profile.settings.seekTimeDuration / 1000}s`;
},
onSelect: (event) => {
core.transport.dispatch({