Improve typing, reindent.
This commit is contained in:
+8
-5
@@ -758,9 +758,10 @@ async function addLocalMedia(id, disableVideo) {
|
||||
let settings = getSettings();
|
||||
|
||||
let audio = settings.audio ? {deviceId: settings.audio} : false;
|
||||
let video = false;
|
||||
if (!disableVideo)
|
||||
video = settings.video ? {deviceId: settings.video} : false;
|
||||
let video =
|
||||
disableVideo ? false :
|
||||
settings.video ? {deviceId: settings.video} :
|
||||
false;
|
||||
|
||||
if(audio) {
|
||||
if(settings.studioMode) {
|
||||
@@ -1004,13 +1005,13 @@ function setMedia(c, isUp) {
|
||||
|
||||
let top_controls = document.getElementById('topcontrols-' + c.id);
|
||||
if(template && !top_controls) {
|
||||
top_controls = top_template.cloneNode(true);
|
||||
top_controls = /** @type{HTMLElement} */(top_template.cloneNode(true));
|
||||
top_controls.id = 'topcontrols-' + c.id;
|
||||
div.appendChild(top_controls);
|
||||
}
|
||||
let controls = document.getElementById('controls-' + c.id);
|
||||
if(template && !controls) {
|
||||
controls = template.cloneNode(true);
|
||||
controls = /** @type{HTMLElement} */(template.cloneNode(true));
|
||||
controls.id = 'controls-' + c.id;
|
||||
div.appendChild(controls);
|
||||
if(media.muted) {
|
||||
@@ -1043,7 +1044,9 @@ function setMedia(c, isUp) {
|
||||
* @param {HTMLVideoElement} video
|
||||
*/
|
||||
async function videoPIP(video) {
|
||||
/** @ts-ignore */
|
||||
if (video.requestPictureInPicture) {
|
||||
/** @ts-ignore */
|
||||
await video.requestPictureInPicture();
|
||||
} else {
|
||||
displayWarning("Video PIP Mode not supported!");
|
||||
|
||||
Reference in New Issue
Block a user