sync.ts 515 B

12345678910111213141516171819
  1. import { getApp } from "/@/hooks/userApp";
  2. import { useRtcStore } from "/@/store/modules/rtc";
  3. // 同屏帶看
  4. export async function handleSync(data: any) {
  5. try {
  6. const app = getApp();
  7. const rtcStore = useRtcStore();
  8. if (!rtcStore.isLeader) {
  9. // app.Connect.follow.start({ follow: false });
  10. // console.log('app.Connect.follow', app.Connect.follow.started)
  11. app.Connect.follow.receive(data);
  12. }
  13. } catch (error) {
  14. }
  15. }