export default function LivePlay() {
const [liveInfo, setLiveInfo] = useState<LiveInfo>({});
const getChannelsLiveInfo = async () => {
await Taro.getChannelsLiveInfo({
finderUserName: "sphfQQcpaP2faeS",
success(res) {
console.log(res, 777);
setLiveInfo(res);
},
fail(res) {
console.log(res, 888);
},
} as any);
};
useEffect(() => {
getChannelsLiveInfo();
}, []);
const reserve = () => {
Taro.openChannelsLive({
// feedId: liveInfo.feedId!,
finderUserName: "sphfQQcpaP2faeS",
success(result) {
console.log(result,21);
},
fail(res) {
console.log(res,12);
},
});
};
return (
<ChannelLive
onClick={reserve}
className="w-[100px] h-[100px]"
feedId={liveInfo.feedId!}
finderUserName="sphfQQcpaP2faeS"
></ChannelLive>
);
}
