- this.videoExistsInPlaylistNotifier.pipe(
- // We leave Angular zone so Protractor does not get stuck
- bufferTime(500, leaveZone(this.ngZone, asyncScheduler)),
- filter(videoIds => videoIds.length !== 0),
- map(videoIds => uniq(videoIds)),
- observeOn(enterZone(this.ngZone, asyncScheduler)),
- switchMap(videoIds => this.doVideosExistInPlaylist(videoIds)),
- share()
- ),
+ buildBulkObservable({
+ time: 500,
+ bulkGet: this.doVideosExistInPlaylist.bind(this),
+ notifierObservable: this.videoExistsInPlaylistNotifier
+ }).pipe(map(({ response }) => response)),