UNPKG

react-chromecast

Version:
41 lines 1.56 kB
interface Media { /** * @function playMedia - function to add an media url to chromecast to play, you should use this to first media before add more with the add function, and before use play function * @param src - this should be an media url acessible by chromecast * @param autoplay - this inidicate if media will play after defined, default is true */ playMedia: (src: string, autoplay?: boolean) => Promise<any>; /** * @function addMedia - function to add an media url to chromecast queue * @param src - this should be an media url acessible by chromecast */ addMedia: (src: string) => Promise<any>; /** * @function play - function to play media in chromecast */ play: () => Promise<any>; /** * @function pause - function to pause media in chromecast */ pause: () => Promise<any>; /** * this inidicate if is a media connected to chromecast */ isMedia: boolean; /** * @function next - function to jump to next video in chromecast queue */ next: () => Promise<any>; /** * @function prev - function to jump to prev video in chromecast queue */ prev: () => Promise<any>; /** * @function to - function to jump to the time passed in seconds in chromecast playing video * @param seconds - time in seconds to jump to */ to: (seconds: number) => Promise<any>; } declare function useMedia(): Media; export default useMedia; //# sourceMappingURL=useMedia.d.ts.map