Re: [mediacapture-transform] We shouldn't require track transferability (#113)

> This can be feature detected on main [like this](https://jsfiddle.net/jib1/92r6h0qn/):
> 
> ```js
> function isMstTransferable() {
>   try {
>     const [track] = document.createElement('canvas').captureStream().getVideoTracks();
>     new MessageChannel().port1.postMessage(track, [track]);
>     return true;
>   } catch (e) {
>     if (e.name != "DataCloneError") throw e;
>     return false;
>   }
> }
> ```

This feature-detects track transferability, not mediacapture-transform.
With the current API  you need to create a worker to feature-detect, which is costly and unergonomic.

-- 
GitHub Notification of comment by guidou
Please view or discuss this issue at https://github.com/w3c/mediacapture-transform/issues/113#issuecomment-2384038791 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 30 September 2024 19:57:39 UTC