-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable idle/background throttling when using a CanvasCaptureMediaStream #244
Comments
This is primarily a Chrome issue https://bugs.chromium.org/p/chromium/issues/detail?id=1100746#c32, which has been fixed to an appreciable degree https://bugs.chromium.org/p/chromium/issues/detail?id=1145203. This is the specification issue re |
Some tests for
Am interested in the results when the tab or window is not focused (note, flags or preferences can also impact media playback and capture, e.g., |
Hey @guest271314 while this is a valid ask but is leading with a solution. It would be good to simply provide the usecases rather than a solution itself as certain areas this won't be possible or the way in which we'd be able to unlock the solution. |
If you read the Chromium bug linked in this issue and speification issue you will see my use case. Which is how I encountered the bug: The specification does not state MediaStreamTrack should or must be muted when no user activity occurs. |
title: Disable idle/background throttling when using a CanvasCaptureMediaStream
date: 2020-12-07T23:11:10.731Z
submitter: PRIVATE
number: 5fceb68edacc4423defb920a
tags: [ ]
discussion: https://github.com/WebWeWant/webwewant.fyi/discussions/
status: [ discussing || in-progress || complete ]
related:
url:
type: [ article || explainer || draft || spec || note || discussion ]
Today, it's easily possible to build full live video mixers using existing APIs such as the CanvasCaptureMediaStream. However, the capability is crippled by the browser attempting to optimize canvas drawing and requestAnimationFrame timers. If the tab/window is backgrounded, drawing to the canvas stops and timers only run once per second. This happens in all common user agents.
When a canvas is being captured, all of this throttling should be disabled.
If necessary, perhaps a permission/request can be made, similar to WakeLock.
The only workaround for this today is to use pop-up windows for the UI. However, this has been proven to be less reliable, as browsers are starting to implement optimizations when the window is covered but not minimized. Additionally, if the user minimizes the window, everything stops. This is preventing the deployment of several video-related applications.
Brad Isbell
[email protected]
If posted, this will appear at https://webwewant.fyi/wants/5fceb68edacc4423defb920a/
The text was updated successfully, but these errors were encountered: