Skip to content

Commit

Permalink
Clear markers on unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
WithoutPants committed Feb 25, 2025
1 parent 587fd9e commit 83b9607
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/v2.5/src/components/ScenePlayer/ScenePlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,6 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({
}));

const markers = player!.markers();
markers.clearMarkers();

const uniqueTagNames = markerData
.map((marker) => marker.primaryTag.name)
Expand Down Expand Up @@ -771,6 +770,8 @@ export const ScenePlayer: React.FC<IScenePlayerProps> = ({

return () => {
player.off("loadedmetadata", handleLoadMetadata);
const markers = player!.markers();
markers.clearMarkers();
};
}, [getPlayer, scene, loadMarkers]);

Expand Down

0 comments on commit 83b9607

Please sign in to comment.