Re: [mediacapture-transform] Can one JS document hose a browser's camera capturing ability? (#37)

The spec supports automatic close() in going from videoFrame -> track (e.g. for rendering), but not track -> videoFrame using 
MediaStreamTrackProcessor.  For example, MediaStreamTrackGenerator Section 3.2.3 says: 

"When a frame is written to writable, the frame’s close() method is automatically invoked, so that its internal resources are no longer accessible from JavaScript."

However, there may be use cases (e.g. funny hats, machine learning) where an application could call MediaStreamTrackProcessor to get access to raw media, then process the media (creating intermediate videoFrames that were not rendered).  These intermediate results would not be provided to MediaStreamTrackGenerator, so they wouldn't be automatically closed.  Also, applications might render the processed raw frames using an API other than MediaStreamTrackGenerator such as Canvas, WebGL or WebGPU.  In that situation, could VideoFrames be closed automatically? 

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


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

Received on Tuesday, 18 May 2021 05:42:05 UTC