ui: some tweaks for visual adjust jump
This commit is contained in:
parent
88c1f18c48
commit
392088be22
2 changed files with 3 additions and 2 deletions
|
|
@ -151,10 +151,11 @@ function WebPlayer(props: any) {
|
|||
const shouldAdjustOffset = visualOffset !== 0 && !visuallyAdjusted;
|
||||
|
||||
if (jumpToTime || shouldAdjustOffset) {
|
||||
if (jumpToTime > visualOffset) {
|
||||
if (jumpToTime && jumpToTime > visualOffset) {
|
||||
const diff =
|
||||
startedAt < jumpToTime ? jumpToTime - startedAt : jumpToTime;
|
||||
contextValue.player.jump(Math.max(diff, 0));
|
||||
setAdjusted(true);
|
||||
} else {
|
||||
contextValue.player.jump(visualOffset);
|
||||
setAdjusted(true);
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ export const compareJsonObjects = (obj1: any, obj2: any) => {
|
|||
return JSON.stringify(obj1) === JSON.stringify(obj2);
|
||||
};
|
||||
|
||||
export const getInitials = (name: any) => {
|
||||
export const getInitials = (name = '') => {
|
||||
const names = name.split(' ');
|
||||
return (
|
||||
names
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue