change(player): small bug fixes

This commit is contained in:
nick-delirium 2023-03-06 14:26:59 +01:00 committed by Shekar Siri
parent 928695ed2d
commit b4843b3ba3
3 changed files with 2 additions and 5 deletions

View file

@ -68,9 +68,6 @@ function Player(props: IProps) {
playerContext.player.attach(parentElement);
setAttached(true)
}
if (isAttached && isReady) {
playerContext.player.play();
}
}, [isReady]);
React.useEffect(() => {

View file

@ -70,7 +70,8 @@ function WebPlayer(props: any) {
if (showNoteModal) {
contextValue.player.pause()
}
if (activeTab !== 'Click Map' && !showNoteModal && isPlayerReady) {
if (activeTab === '' && !showNoteModal && isPlayerReady) {
contextValue.player && contextValue.player.play()
}
}, [activeTab, isPlayerReady, showNoteModal])

View file

@ -13,7 +13,6 @@ import DiffRow from './DiffRow';
import cn from 'classnames';
import stl from './storage.module.css';
import logger from "App/logger";
import { toJS } from 'mobx'
function getActionsName(type: string) {
switch (type) {