|
|
@@ -85,7 +85,8 @@ export default { |
|
|
|
userSig: null, |
|
|
|
roomId: null, |
|
|
|
taskId: null, |
|
|
|
remoteStreamList: [] |
|
|
|
remoteStreamList: [], |
|
|
|
isMirror: true |
|
|
|
}) |
|
|
|
|
|
|
|
const settings = reactive({ |
|
|
@@ -295,8 +296,7 @@ export default { |
|
|
|
video: true, |
|
|
|
userId: data.userId, |
|
|
|
cameraId: settings.cameraId, |
|
|
|
microphoneId: settings.microphoneId, |
|
|
|
mirror: false |
|
|
|
microphoneId: settings.microphoneId |
|
|
|
}) |
|
|
|
try { |
|
|
|
await settings.localStream.initialize() |
|
|
@@ -313,7 +313,7 @@ export default { |
|
|
|
if (settings.localStream && settings.isPlayingLocalStream) { |
|
|
|
settings.isPlayingLocalStream = false |
|
|
|
} |
|
|
|
settings.localStream.play('localStream') |
|
|
|
settings.localStream.play('localStream', { mirror: data.isMirror }) |
|
|
|
.then(() => { |
|
|
|
settings.isPlayingLocalStream = true |
|
|
|
}) |
|
|
@@ -431,10 +431,12 @@ export default { |
|
|
|
* @param {*} cameraId |
|
|
|
* @return {*} |
|
|
|
*/ |
|
|
|
const handleCamareSwitch = ({ type, cameraId }) => { |
|
|
|
const handleCamareSwitch = ({ type, cameraId, isMirror = true }) => { |
|
|
|
try { |
|
|
|
if (settings.localStream) { |
|
|
|
data.isMirror = isMirror |
|
|
|
settings.localStream.switchDevice(type, cameraId) |
|
|
|
playLocalStream() |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.error('switchDevice failed', error) |
|
|
@@ -498,7 +500,6 @@ export default { |
|
|
|
} |
|
|
|
await axios.put(`/api/meeting/heartbeatTime`, params) |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @description: 翻转摄像头 |
|
|
|
* @return {*} |