Merge pull request #5438 from thornbill/fix-undefined-now-playing

Fix playback errors
This commit is contained in:
Bill Thornton
2024-04-30 17:22:08 -04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
@@ -628,7 +628,7 @@ function onPlaybackStart(e, state) {
console.debug('nowplaying event: ' + e.type);
const player = this;
isAudio = state.NowPlayingItem.Type === 'Audio';
isAudio = state.NowPlayingItem?.Type === 'Audio';
onStateChanged.call(player, e, state);
}
@@ -253,7 +253,7 @@ const ItemsContainer: FC<ItemsContainerProps> = ({
);
const onPlaybackStopped = useCallback(
(_e: Event, apiClient, stopInfo) => {
(_e: Event, stopInfo) => {
const state = stopInfo.state;
if (