slide-cast
Version:
Web presentation tool with video recording included
37 lines (33 loc) • 1.1 kB
JavaScript
import './components/SlideIt/SlideIt.js';
import './components/VideoSpot/VideoSpot.js';
import './components/CommonToolbar/CommonToolbar.js';
import './components/GroupFrom/GroupFrom.js';
import styles from './common-css/styles.css.js';
import hlCss from './common-css/hl.css.js';
import { PubSub } from '@symbiotejs/symbiote';
let styleSheet = new CSSStyleSheet();
styleSheet.replaceSync(styles + hlCss);
document.adoptedStyleSheets = [...document.adoptedStyleSheets, styleSheet];
PubSub.registerCtx({
hideVideoSpot: false,
currentSlide: null,
drawColor: '#fff',
eraseMode: false,
}, 'APP');
window.onload = async () => {
let customStyles = document.querySelector('style');
if (customStyles) {
let css = customStyles.textContent;
if (css) {
let customStyleSheet = new CSSStyleSheet();
customStyleSheet.replaceSync(css);
document.adoptedStyleSheets = [...document.adoptedStyleSheets, customStyleSheet];
}
}
window.requestIdleCallback(() => {
let slideIt = document.querySelector('slide-it');
if (slideIt) {
slideIt.focus();
}
});
}