UNPKG

@petro-kushchak/homebridge-homepod-radio

Version:

Homebridge accessory for streaming radio to Homepod Mini and Apple TV

32 lines 897 B
export class PlaybackController { streamers; constructor() { this.streamers = []; } addStreamer(streamer) { this.streamers.push(streamer); } async requestStop(source) { this.streamers.forEach(async (streamer) => { if (streamer !== source) { await streamer.stopRequested(source); } }); } async shutdown() { this.streamers.forEach(async (streamer) => { await streamer.shutdownRequested(); }); } async platformReady() { this.streamers.forEach(async (streamer) => { await streamer.platformLaunched(); }); } async updateVolume(homepodId, value) { this.streamers.forEach(async (streamer) => { await streamer.volumeUpdated(homepodId, value); }); } } //# sourceMappingURL=playbackController.js.map