Skip to content

Commit

Permalink
add overrideTrackApplyConstraints
Browse files Browse the repository at this point in the history
  • Loading branch information
vpalmisano committed Jan 24, 2025
1 parent d250bc6 commit 8208f03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/get-user-media.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function collectMediaTracks(mediaStream, onEnded = null) {
const nativeApplyConstraints = track.applyConstraints.bind(track)
track.applyConstraints = constraints => {
log(`applyConstraints ${track.id} (${track.kind})`, { track, constraints })
if (window.overrideTrackApplyConstraints) {
constraints = window.overrideTrackApplyConstraints(track, constraints)
if (webrtcperf.overrideTrackApplyConstraints) {
constraints = webrtcperf.overrideTrackApplyConstraints(track, constraints)
log(`applyConstraints ${track.id} (${track.kind}) override:`, { track, constraints })
}
return nativeApplyConstraints(constraints)
Expand Down

0 comments on commit 8208f03

Please sign in to comment.