Skip to content

Commit 893205f

Browse files
authored
Merge pull request #38 from bigbluebutton/more-flexible-screen-identifier
allow to find screen also by id
2 parents a08af79 + 94eacc9 commit 893205f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

appliance-application/packages/main/src/displayManager.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class DisplayManager {
1212
return this.displays;
1313
}
1414

15-
public getDisplay(label: string): Display | null {
16-
return this.displays.find(display => display.label === label) || null;
15+
public getDisplay(identifier: string | number): Display | null {
16+
return this.displays.find(display => display.id === Number(identifier) || display.label === identifier) || null;
1717
}
1818
}

appliance-application/packages/main/src/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ function loadDisplays() {
9898

9999
const allDisplays = displayManager.getDisplays();
100100
allDisplays.forEach(display => {
101-
console.log(`Found display '${display.label}'`);
101+
console.log('Found display with display attributes:', {
102+
id: display.id,
103+
label: display.label,
104+
size: display.size
105+
});
102106
});
103107
}
104108

0 commit comments

Comments
 (0)