diff --git a/src/components/syncPlay/core/players/PlayerFactory.js b/src/components/syncPlay/core/players/PlayerFactory.js index 709680cf63..1de9aa5126 100644 --- a/src/components/syncPlay/core/players/PlayerFactory.js +++ b/src/components/syncPlay/core/players/PlayerFactory.js @@ -44,13 +44,15 @@ class PlayerFactory { return this.getDefaultWrapper(syncPlayManager); } - console.debug('SyncPlay WrapperFactory getWrapper:', player.id); - const Wrapper = this.wrappers[player.id]; + const playerId = player.syncPlayWrapAs || player.id; + + console.debug('SyncPlay WrapperFactory getWrapper:', playerId); + const Wrapper = this.wrappers[playerId]; if (Wrapper) { return new Wrapper(player, syncPlayManager); } - console.debug(`SyncPlay WrapperFactory getWrapper: unknown player ${player.id}, using default wrapper.`); + console.debug(`SyncPlay WrapperFactory getWrapper: unknown player ${playerId}, using default wrapper.`); return this.getDefaultWrapper(syncPlayManager); }