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

Re: [mediacapture-region] What makes CropTarget special to require an asynchronous creation? (#17)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Thu, 19 May 2022 21:40:05 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-1132232768-1652996404-sysbot+gh@w3.org>
A test in Chrome with https://jsfiddle.net/jib1/yunghz8f/ (on macOS in my case) reveals the following: On a fresh restart:
```
Time to crop: 83.00
Time to play: 537.20
```
...and on repeat calls more like:
```
Time to crop: 3.30
Time to play: 486.60
```
Numbers fluctuate a bit, but cropping always succeeds with a substantial margin ahead of the video playing.

I then did an extremely rough polyfill of `element.cropTarget` in https://jsfiddle.net/jib1/wfnv9o3q/ solely for the purpose of timing things, and got numbers like this:
```
Time to crop: 2.90
Time to play: 509.60
```
I hope this puts to bed any performance concerns, but if someone wants to do a cross-origin version feel free.

The fiddles also show some bugs in Chrome you may wish to iron out (the blue outline is way off)

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-region/issues/17#issuecomment-1132232768 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 19 May 2022 21:40:07 UTC

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