large performance refactor

This commit is contained in:
jeffvli
2025-11-26 13:54:45 -08:00
parent 948f428546
commit 60cdea6787
32 changed files with 1030 additions and 502 deletions
@@ -140,6 +140,12 @@ function createPlayerEvents(callbacks: PlayerEventsCallbacks): PlayerEvents {
return {
cleanup: () => {
unsubscribers.forEach((unsubscribe) => unsubscribe());
if (callbacks.onUserRating) {
eventEmitter.off('USER_RATING', callbacks.onUserRating);
}
if (callbacks.onUserFavorite) {
eventEmitter.off('USER_FAVORITE', callbacks.onUserFavorite);
}
},
};
}