Skip to content

Instantly share code, notes, and snippets.

@mfp22
Last active March 23, 2021 07:48
Show Gist options
  • Save mfp22/64c66e74b3baea1a2a6ca6e15350d3a3 to your computer and use it in GitHub Desktop.
Save mfp22/64c66e74b3baea1a2a6ca6e15350d3a3 to your computer and use it in GitHub Desktop.
audioPlaying$ = this.store.select('audioPlaying');
videoPlaying$ = this.store.select('videoPlaying');
mediaPlaying$ = combineLatest([
this.audioPlaying$,
this.videoPlaying$,
]).pipe(
map(([audioPlaying, videoPlaying]) => audioPlaying || videoPlaying,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment