fix ui: jumpto param fix (#2222)
This commit is contained in:
parent
fc995408a6
commit
0edc130db0
2 changed files with 4 additions and 5 deletions
|
|
@ -71,11 +71,10 @@ function MobilePlayer(props: any) {
|
|||
if (activeTab === '' && !noteItem !== undefined && messagesProcessed && contextValue.player) {
|
||||
const jumpToTime = props.query.get('jumpto');
|
||||
|
||||
contextValue.player.play();
|
||||
if (jumpToTime) {
|
||||
contextValue.player.jump(parseInt(jumpToTime));
|
||||
}
|
||||
|
||||
contextValue.player.play();
|
||||
}
|
||||
}, [activeTab, noteItem, messagesProcessed]);
|
||||
|
||||
|
|
|
|||
|
|
@ -78,10 +78,12 @@ function WebPlayer(props: any) {
|
|||
contextValue.player.pause();
|
||||
}
|
||||
|
||||
if (activeTab === '' && !noteItem !== undefined && messagesProcessed && contextValue.player) {
|
||||
if (activeTab === '' && messagesProcessed && contextValue.player) {
|
||||
const jumpToTime = props.query.get('jumpto');
|
||||
const shouldAdjustOffset = visualOffset !== 0 && !visuallyAdjusted;
|
||||
|
||||
if (noteItem === undefined) contextValue.player.play();
|
||||
|
||||
if (jumpToTime || shouldAdjustOffset) {
|
||||
if (jumpToTime > visualOffset) {
|
||||
const diff =
|
||||
|
|
@ -92,8 +94,6 @@ function WebPlayer(props: any) {
|
|||
setAdjusted(true);
|
||||
}
|
||||
}
|
||||
|
||||
contextValue.player.play();
|
||||
}
|
||||
}, [activeTab, noteItem, visualOffset, messagesProcessed]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue