[Webkit-unassigned] [Bug 245962] REGRESSION (iOS 16): When getUserMedia is called again, the existing stream is killed
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 5 03:57:34 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=245962
--- Comment #4 from rbernalber <rbernalber at protonmail.com> ---
is similar but not. I cloned getUserMedia with "clone()". On the device with ios16 it is easy to reproduce the bug.
When the permission request message appears, very quickly it is accepted and the bug appears.
on devices with version 15 I can't reproduce this error.
const normalStream = await this.window.navigator.mediaDevices.getUserMedia({
audio: false,
video: {
facingMode: 'environment',
width: { exact: 150 },
height: { ideal: 720, max: 960, min: 480 },
// aspectRatio: { ideal: 1 },
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
...(this.window.navigator.mediaDevices.getSupportedConstraints().resizeMode && {
// resizeMode: 'none'
resizeMode: 'crop-and-scale"'
}),
frameRate: { ideal: 60 },
}
})
const fakeStream = normalStream.clone()
const mediumStream = normalStream.clone()
await Promise.all([
...mediumStream.getTracks().map((x) =>
x.applyConstraints(
this.getVideoConstraints({
aspectRatio: 1.333,
width: { min: 960, ideal: 1280, max: 1440 }
})
)
),
...fakeStream
.getTracks()
.map((x) =>
x.applyConstraints(
this.getVideoConstraints({ width: { min: 960, ideal: 1280, max: 1440 }, frameRate: { ideal: 25 } })
)
)
])
this.cameraNormalAperture.nativeElement.srcObject = normalStream
this.cameraMediumAperture.nativeElement.srcObject = mediumStream
this.fakeCamera.nativeElement.srcObject = fakeStream
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221005/0246e769/attachment.htm>
More information about the webkit-unassigned
mailing list