@xapp/stentor-handler-media
v1.87.0
Published
A set of handlers for media playback
Downloads
6,087
Readme
@xapp/stentor-handler-media
A set of request handlers for media playback built on the abstract AudioHandler: PlayMediaHandler (generic audio playlists), PlayLivestreamHandler (live streams, including scheduled ones), PlayPodcastHandler (RSS podcast episodes, with title/topic search when a service is passed in its props), and MultimediaHandler (picks the best media source for the current device). MediaManagerFactory creates the matching MediaManager from @xapp/stentor-media-manager using the handler type, handler data, and saved AudioStorage; the handlers use it for loading, playlist navigation, and playback events (started, stopped, finished, failed, nearly-finished), then save the manager state and history back to context.storage.
Usage
import { PlayPodcastHandler, MediaManagerFactory } from "@xapp/stentor-handler-media";
const handler = new PlayPodcastHandler(props);
await handler.start(request, context);