PLT-4239 fixes getUserMedia (#4038)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
0157e613bd
Коммит
b072fdb23f
@@ -21,7 +21,7 @@ export default class WebrtcSession {
|
|||||||
navigator.mediaDevices.getUserMedia(media).
|
navigator.mediaDevices.getUserMedia(media).
|
||||||
then((stream) => {
|
then((stream) => {
|
||||||
if (element) {
|
if (element) {
|
||||||
adapter.browserShim.attachMediaStream(element, stream);
|
element.srcObject = stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callback && typeof callback === 'function') {
|
if (callback && typeof callback === 'function') {
|
||||||
|
|||||||
@@ -172,10 +172,8 @@ export default class WebrtcController extends React.Component {
|
|||||||
{
|
{
|
||||||
audio: true,
|
audio: true,
|
||||||
video: {
|
video: {
|
||||||
mandatory: {
|
minAspectRatio: MIN_ASPECT,
|
||||||
minAspectRatio: MIN_ASPECT,
|
maxAspectRatio: MAX_ASPECT,
|
||||||
maxAspectRatio: MAX_ASPECT
|
|
||||||
},
|
|
||||||
width: VIDEO_WIDTH,
|
width: VIDEO_WIDTH,
|
||||||
height: VIDEO_HEIGHT
|
height: VIDEO_HEIGHT
|
||||||
}
|
}
|
||||||
@@ -726,8 +724,10 @@ export default class WebrtcController extends React.Component {
|
|||||||
this.videocall.hangup();
|
this.videocall.hangup();
|
||||||
this.toggleIcons();
|
this.toggleIcons();
|
||||||
|
|
||||||
this.localMedia.getVideoTracks()[0].enabled = true;
|
if (this.localMedia) {
|
||||||
this.localMedia.getAudioTracks()[0].enabled = true;
|
this.localMedia.getVideoTracks()[0].enabled = true;
|
||||||
|
this.localMedia.getAudioTracks()[0].enabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
"superagent": "2.1.0",
|
"superagent": "2.1.0",
|
||||||
"twemoji": "2.0.5",
|
"twemoji": "2.0.5",
|
||||||
"velocity-animate": "1.2.3",
|
"velocity-animate": "1.2.3",
|
||||||
"webrtc-adapter": "1.4.0",
|
"webrtc-adapter": "2.0.3",
|
||||||
"xregexp": "3.1.1"
|
"xregexp": "3.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user