Rendering the video from the ios camera is stuck

Please do not forget to add a link to a Playground to get a faster answer:

  this.myPeer.on('call', (call: MediaConnection) => {
    const fromUserId: string = call.metadata.fromSessionId



    if (!this.onCalledPeers.has(call.peer)) {
      this.onCallList.push(call)
      console.log("收到call metadata", call.metadata)
      const fromUserId: string = call.metadata.fromSessionId
      const video = document.createElement('video');
      video.playsInline = true
      video.autoplay = false;
      video.preload = "none";
      video.controls = true;
      this.onCalledPeers.set(call.peer, { call, video });


      call.answer()
      call.on('stream', (userVideoStream: MediaStream) => {
        video.crossOrigin = "anonymous";
        video.srcObject = userVideoStream;
        const videoMaterial = new StandardMaterial('textVid', this.scene);
      videoMaterial.allowShaderHotSwapping = false;
      video.pause();
      video.addEventListener('loadedmetadata', () => {
        video.play();
        const scene = store.getState().room.rscene

        videoMaterial.specularColor = new Color3(0, 0, 0); // 设置让它不反光
        const videoTexture = new VideoTexture('video', video, scene, true, true);
        videoMaterial.diffuseTexture = videoTexture;
        store.getState().room.rscene!.getMeshByID("video-plane-" + userId)!.material = videoMaterial;
      });
      });
    }

  });

Hello! I’m using webrct to fetch the user’s video and attach it next to the player in the scene, but the fps is significantly reduced when rendering videos from ios

cc @sebavan @bghgary who know more of iOS, but as many things in iOS I expect this to be their broken support for web standards :confused:

Is the speed reduced ? or is the full video stuck ? (I am not able to repro locally)

We work together, let me explain his problem:
In a scene, there are planes showing real-time videoes from different users’ peers. For any user, if the camera saw the video plane by an iOS user, the frame rate reduces. This weird phenomenon happens for all platform’s browsers

Let me know if I understand correctly:

On IOS only, independently of the browser (makes sense as they are all webkit anyway), As soon as a video is displayed, the frame rate is dropping for the full 3d experience (not just the video). The video is created from a WebRTC remote feed ?

If the description is correct, can you try downresing the video you are capturing to see what happens ?