Move screen tools to header as icon buttons
Fullscreen and keep-awake sit next to the theme switch (layout block headerTools), icon only with aria-label/title. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1efa61f9bc
commit
cae11c4f40
5 files changed
+34
-14
No files matched your search
@@ -1582,11 +1582,14 @@
|
||||
// Fullscreen and screen wake lock for the participant view (both optional, buttons stay hidden if unsupported).
|
||||
function initScreenTools(root) {
|
||||
function setPressed(button, on) {
|
||||
var text = button.getAttribute(on ? 'data-label-on' : 'data-label-off');
|
||||
button.setAttribute('aria-pressed', on ? 'true' : 'false');
|
||||
button.textContent = button.getAttribute(on ? 'data-label-on' : 'data-label-off');
|
||||
button.setAttribute('aria-label', text);
|
||||
button.title = text;
|
||||
}
|
||||
|
||||
var fsButton = root.querySelector('[data-fullscreen-toggle]');
|
||||
// The buttons live in the layout header, outside the participant root.
|
||||
var fsButton = document.querySelector('[data-fullscreen-toggle]');
|
||||
if (fsButton && document.fullscreenEnabled) {
|
||||
fsButton.hidden = false;
|
||||
fsButton.addEventListener('click', function () {
|
||||
@@ -1602,7 +1605,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
var wlButton = root.querySelector('[data-wakelock-toggle]');
|
||||
var wlButton = document.querySelector('[data-wakelock-toggle]');
|
||||
if (wlButton && 'wakeLock' in navigator) {
|
||||
// The page reloads on every slide change, so the choice is kept per tab and re-applied on load.
|
||||
var STORE = 'plenario-wakelock';
|
||||
|
||||
Reference in new issue
Block a user