@fishjam-cloud/react-client
Version:
React client library for Fishjam
18 lines • 625 B
TypeScript
/**
* This hook can register/deregister a custom MediaStream with Fishjam.
*
* @param sourceId - Stable id identifying this custom source.
* @group Hooks
*/
export declare function useCustomSource<T extends string>(sourceId: T): {
/**
* Associates the given stream with the custom source.
* This stream will be sent to Fishjam after startStreaming has been called.
*/
setStream: (newStream: MediaStream | null) => Promise<void>;
/**
* The MediaStream currently associated with the custom source
*/
stream: MediaStream | undefined;
};
//# sourceMappingURL=useCustomSource.d.ts.map