diff --git a/ChromeExt/src/contentscript/ItemFrameWindow.ts b/ChromeExt/src/contentscript/ItemFrameWindow.ts index 594cd21d..64922110 100644 --- a/ChromeExt/src/contentscript/ItemFrameWindow.ts +++ b/ChromeExt/src/contentscript/ItemFrameWindow.ts @@ -13,6 +13,7 @@ export type ItemFrameWindowOptions = WindowOptions & { url: string, resizable?: boolean, undockable?: boolean, + undocked?: boolean, transparent?: boolean, // Not implemented on ItemFrameWindow. titleText: string, } @@ -44,6 +45,7 @@ export class ItemFrameWindow extends Window this.minWidth = 180; this.minHeight = 100; this.isUndockable = as.Bool(this.givenOptions.undockable); + this.isUndocked= as.Bool(this.givenOptions.undocked); const url: string = as.String(this.givenOptions.url); if (!url.length) { diff --git a/ChromeExt/src/contentscript/Participant.ts b/ChromeExt/src/contentscript/Participant.ts index 4929270b..1977a627 100644 --- a/ChromeExt/src/contentscript/Participant.ts +++ b/ChromeExt/src/contentscript/Participant.ts @@ -1091,6 +1091,7 @@ export class Participant extends Entity this.privateVidconfWindow.show({ above: aboveElem, url: url, + undocked: true, onClose: () => { this.privateVidconfWindow = null; diff --git a/ChromeExt/src/contentscript/Room.ts b/ChromeExt/src/contentscript/Room.ts index 9d01c627..a2af4f41 100644 --- a/ChromeExt/src/contentscript/Room.ts +++ b/ChromeExt/src/contentscript/Room.ts @@ -575,6 +575,7 @@ export class Room this.vidconfWindow.show({ 'above': aboveElem, 'url': url, + 'undocked': true, onClose: () => { this.vidconfWindow = null; diff --git a/ChromeExt/src/contentscript/RoomItem.ts b/ChromeExt/src/contentscript/RoomItem.ts index 865e28b4..e67136f7 100644 --- a/ChromeExt/src/contentscript/RoomItem.ts +++ b/ChromeExt/src/contentscript/RoomItem.ts @@ -789,6 +789,7 @@ export class RoomItem extends Entity bottom: as.Int(windowOptions.bottom, 50), resizable: as.Bool(windowOptions.rezizable, true), undockable: as.Bool(windowOptions.undockable), + undocked: as.Bool(windowOptions.undocked), transparent: as.Bool(windowOptions.transparent), hidden: as.Bool(windowOptions.hidden), titleText: as.String(this.properties[Pid.Description], as.String(this.properties[Pid.Label], 'Item')), diff --git a/ChromeExt/src/contentscript/VidconfWindow.ts b/ChromeExt/src/contentscript/VidconfWindow.ts index 6e101659..dcac9935 100644 --- a/ChromeExt/src/contentscript/VidconfWindow.ts +++ b/ChromeExt/src/contentscript/VidconfWindow.ts @@ -47,7 +47,7 @@ export class VidconfWindow extends Window contentElem.append(iframeElem); } - protected undock(): void + undock(): void { const left = Config.get('room.vidconfUndockedLeft', 100); const top = Config.get('room.vidconfUndockedTop', 100); diff --git a/ChromeExt/src/contentscript/Window.ts b/ChromeExt/src/contentscript/Window.ts index 76562738..d14fff0c 100644 --- a/ChromeExt/src/contentscript/Window.ts +++ b/ChromeExt/src/contentscript/Window.ts @@ -20,6 +20,7 @@ export type WindowOptions = { bottom?: string|number, left?: string|number, center?: string|number, // Used when left unset. + undocked?: boolean, }; type WindowGeometryInitStrategy = 'beforeContent'|'afterContent'|'none'; @@ -42,6 +43,7 @@ export abstract class Window protected geometryInitstrategy: WindowGeometryInitStrategy = 'beforeContent'; protected persistGeometry: boolean = false; protected isUndockable: boolean = false; + protected isUndocked: boolean = false; protected containerMarginTop: number = 0; protected containerMarginRight: number = 0; @@ -108,6 +110,9 @@ export abstract class Window if (!this.isClosing && !(this.givenOptions.hidden ?? this.showHidden)) { this.setVisibility(true); } + if (this.isUndocked) { + this.undock(); + } })().catch(error => { this.app.onError(error); this.isClosing = true; @@ -128,6 +133,7 @@ export abstract class Window protected prepareMakeDom(): void { this.closeIsHide = as.Bool(this.givenOptions.closeIsHide, this.closeIsHide); + this.isUndocked = as.Bool(this.givenOptions.undocked, this.isUndocked); this.containerMarginTop = as.Int(Config.get('system.windowContainerMarginTop'), 0); this.containerMarginRight = as.Int(Config.get('system.windowContainerMarginRight'), 0); this.containerMarginBottom = as.Int(Config.get('system.windowContainerMarginBottom'), 0); diff --git a/ChromeExt/src/lib/Config.ts b/ChromeExt/src/lib/Config.ts index bdaa4848..81e8b500 100644 --- a/ChromeExt/src/lib/Config.ts +++ b/ChromeExt/src/lib/Config.ts @@ -187,7 +187,8 @@ export class Config defaultAnimationSize: 100, vCardAvatarFallback: false, vCardAvatarFallbackOnHover: true, - vidconfUrl: 'https://video.weblin.io/Vidconf?room=weblin{room}&name={name}', + // vidconfUrl: 'https://video.weblin.io/Vidconf?room=weblin{room}&name={name}', + vidconfUrl: 'https://meet.jit.si/weblin{room}#userInfo.displayName=%22{name}%22&config.prejoinPageEnabled=false&config.disableInviteFunctions=true&config.doNotStoreRoom=true&config.resolution=true&config.enableInsecureRoomNameWarning=false&interfaceConfig.SHOW_CHROME_EXTENSION_BANNER=false', vidconfBottom: 200, vidconfWidth: 630, vidconfHeight: 530, diff --git a/ChromeExt/src/lib/_Changes.ts b/ChromeExt/src/lib/_Changes.ts index 6f921b82..03d8079e 100644 --- a/ChromeExt/src/lib/_Changes.ts +++ b/ChromeExt/src/lib/_Changes.ts @@ -6,8 +6,8 @@ interface IHistory extends Array { } export class _Changes { static data: IHistory = [ - ['1.2.7', '?', [ - ['x', 'y'], + ['1.2.7', 'VidconfUndocked', [ + ['Change', 'Video windows initially undocked because Jitsi does not support embedding in iframes anymore'], ]], ['1.2.6', 'Tutorial', [ ['Add', 'Tutorial videos'],