Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Use user device settings by default
Browse files Browse the repository at this point in the history
  • Loading branch information
alimtunc committed Jun 27, 2023
1 parent c5aed63 commit a42fc55
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions core/modules/meet/client/meet-low-level.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,22 @@ const connect = async (template) => {

if (!template.connection.get()) {
const options = getOptions(template.roomName)
const user = Meteor.user({ fields: { 'profile.audioRecorder': 1 }, 'profile.videoRecorder': 1 })

meetJs.init(options)
meetJs.setLogLevel(meetJs.logLevels.ERROR)

await meetJs.createLocalTracks({ devices: ['audio', 'video'] }).then((tracks) => {
updateTrack('video', tracks)
updateTrack('audio', tracks)

onLocalTracks(template, tracks)
})
await meetJs
.createLocalTracks({
devices: ['audio', 'video'],
cameraDeviceId: user?.profile?.videoRecorder,
micDeviceId: user?.profile?.audioRecorder,
})
.then((tracks) => {
updateTrack('video', tracks)
updateTrack('audio', tracks)
onLocalTracks(template, tracks)
})

template.connection.set(new meetJs.JitsiConnection(null, null, options))

Expand Down

0 comments on commit a42fc55

Please sign in to comment.