|
|
@ -401,26 +401,23 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
getAllOutputDevices() {
|
|
|
|
getAllOutputDevices() {
|
|
|
|
navigator.mediaDevices
|
|
|
|
navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
|
|
.getUserMedia({ audio: true })
|
|
|
|
this.allOutputDevices = devices.filter((device) => {
|
|
|
|
.then(() => {
|
|
|
|
return device.kind == "audiooutput";
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
this.allOutputDevices.length > 0 &&
|
|
|
|
|
|
|
|
this.allOutputDevices[0].label !== ""
|
|
|
|
|
|
|
|
) {
|
|
|
|
this.withoutAudioPriviledge = false;
|
|
|
|
this.withoutAudioPriviledge = false;
|
|
|
|
navigator.mediaDevices
|
|
|
|
} else {
|
|
|
|
.enumerateDevices()
|
|
|
|
|
|
|
|
.then(
|
|
|
|
|
|
|
|
(devices) =>
|
|
|
|
|
|
|
|
(this.allOutputDevices = devices.filter(
|
|
|
|
|
|
|
|
(device) => device.kind == "audiooutput"
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
this.allOutputDevices = [
|
|
|
|
this.allOutputDevices = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
deviceId: "default",
|
|
|
|
deviceId: "default",
|
|
|
|
label: "settings.permissionDenied",
|
|
|
|
label: "settings.permissionRequired",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
logout() {
|
|
|
|
logout() {
|
|
|
|