W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > June 2022

Re: [webrtc-pc] CaptureStream adds mediaTracks with delay, we need a callback? (#923)

From: Zaid Iqbal via GitHub <sysbot+gh@w3.org>
Date: Tue, 14 Jun 2022 11:31:43 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-1155062107-1655206301-sysbot+gh@w3.org>
This is because you are capturing stream before video is played. So you need to capture stream after video has started playing to avoid delay in stream tracks.

**A better way instead of setInterval is to use:**
1- Use await on video.play() method and capture stream after that.
2- Use 'onplay' event of video element to capture stream when video is played.

-- 
GitHub Notification of comment by zaidiqbalsoftech
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/923#issuecomment-1155062107 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 14 June 2022 11:31:45 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:57 UTC