mirror of
https://github.com/p-stream/p-stream.git
synced 2026-03-22 19:17:47 +00:00
15 lines
377 B
TypeScript
15 lines
377 B
TypeScript
/// <reference types="chromecast-caf-sender"/>
|
|
|
|
import { useEffect, useState } from "react";
|
|
|
|
import { isChromecastAvailable } from "@/setup/chromecast";
|
|
|
|
export function useChromecastAvailable() {
|
|
const [available, setAvailable] = useState<boolean | null>(null);
|
|
|
|
useEffect(() => {
|
|
isChromecastAvailable((bool) => setAvailable(bool));
|
|
}, []);
|
|
|
|
return available;
|
|
}
|