add single mode color

This commit is contained in:
j 2022-09-26 18:31:00 +01:00
parent 33be739566
commit 5f38662413

View file

@ -409,6 +409,11 @@ function renderSingleMode(config) {
config.root.appendChild(div)
var frame = div.querySelector('.frame')
var text = div.querySelector('.text')
var first = config.annotations[0]
if (text && first) {
var color1 = `hsl(${first.color1.hue}, 60%, 15%)`
div.style.background = `${color1}`;
}
document.addEventListener('scroll', onVisibilityChange(div.querySelector('.frame'), function(visible) {
if (config.loaded && visible) {
updatePlayer(config.video, frame, config['in'], config['out'], src, config)