-
Notifications
You must be signed in to change notification settings - Fork 20
Update configuration change section #89
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding more algorithms! Unfortunately, it raises some questions which I've filed as #90.
Your feedback has been addressed. |
Shall we merge? |
Editors can integrate once @eladalon1983 has looked at it. |
applyBlurInSoftwareInstead(!backgroundBlur); | ||
} | ||
});</pre> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: It's weird to see the </pre> as less indented than the </div>. The following indentation seems preferrable imho:
<h3>Example</h3>
<div>
<p>This example shows how to monitor external background blur changes.</p>
<pre class="example">
const stream = await navigator.mediaDevices.getUserMedia({video: true});
const [track] = stream.getVideoTracks();
let {backgroundBlur} = track.getSettings();
applyBlurInSoftwareInstead(!backgroundBlur);
track.addEventListener("configurationchange", () => {
if (backgroundBlur != track.getSettings().backgroundBlur) {
backgroundBlur = track.getSettings().backgroundBlur;
applyBlurInSoftwareInstead(!backgroundBlur);
}
});
</pre>
</div>
</section>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 3e48bd2
Based on #83 and #80 discussions, this PR improves the status quo of the configuration change section with this changes:
configurationchange
event only if capabilities and settings differconfigurationchange
event handler event typePreview | Diff