-
Notifications
You must be signed in to change notification settings - Fork 54
/
youtube-background-experimental.js.map
7 lines (7 loc) · 27.7 KB
/
youtube-background-experimental.js.map
1
2
3
4
5
6
7
{
"version": 3,
"sources": ["src/lib/controls.js", "src/experimental.js"],
"sourcesContent": ["export class SeekBar {\n constructor(element, vbgInstance) {\n this.lock = false;\n if (!element) return;\n this.element = element;\n if (this.element.hasAttribute('data-target-uid')) return;\n this.progressElem = this.element.querySelector('.js-seek-bar-progress');\n this.inputElem = this.element.querySelector('.js-seek-bar');\n this.targetSelector = this.element.getAttribute('data-target');\n if (this.targetSelector) this.targetElem = document.querySelector(this.targetSelector);\n if (!this.targetSelector && vbgInstance) this.targetElem = vbgInstance.element;\n if (!this.targetElem) return;\n\n if (vbgInstance) this.setVBGInstance(vbgInstance);\n \n this.targetElem.addEventListener('video-background-time-update', this.onTimeUpdate.bind(this));\n this.targetElem.addEventListener('video-background-play', this.onReady.bind(this));\n this.targetElem.addEventListener('video-background-ready', this.onReady.bind(this));\n this.targetElem.addEventListener('video-background-destroyed', this.onDestroyed.bind(this));\n\n this.inputElem.addEventListener('input', this.onInput.bind(this));\n this.inputElem.addEventListener('change', this.onChange.bind(this));\n }\n\n setVBGInstance(vbgInstance) {\n if (this.vbgInstance) return;\n this.vbgInstance = vbgInstance;\n this.element.setAttribute('data-target-uid', vbgInstance.uid);\n }\n\n onReady(event) {\n this.setVBGInstance(event.detail);\n }\n\n onTimeUpdate(event) {\n this.setVBGInstance(event.detail);\n if (!this.lock) requestAnimationFrame(() => this.setProgress(this.vbgInstance.percentComplete));\n }\n\n onDestroyed(event) {\n this.vbgInstance = null;\n requestAnimationFrame(() => this.setProgress(0));\n }\n\n onInput(event) {\n this.lock = true;\n requestAnimationFrame(() => this.setProgress(event.target.value));\n }\n\n onChange(event) {\n this.lock = false;\n requestAnimationFrame(() => this.setProgress(event.target.value));\n if (this.vbgInstance) {\n this.vbgInstance.seek(event.target.value);\n if (this.vbgInstance.playerElement && this.vbgInstance.playerElement.style.opacity === 0) this.vbgInstance.playerElement.style.opacity = 1;\n }\n}\n\n setProgress(value) {\n if (this.progressElem) this.progressElem.value = value;\n if (this.inputElem) this.inputElem.value = value;\n }\n}\n\nexport class VideoBackgroundGroup {\n constructor(selector, videoBackgroundSelector, videoBackgroundFactoryInstance) {\n this.element = selector;\n if (typeof this.element === 'string') this.element = document.querySelector(selector);\n if (!this.element) return;\n this.elements = this.element.querySelectorAll(videoBackgroundSelector || '[data-vbg]');\n if (!this.elements.length) return;\n\n this.videoBackgroundFactoryInstance = videoBackgroundFactoryInstance;\n this.stack = [];\n this.map = new Map();\n this.current = 0;\n this.currentElement = null;\n this.currentInstance = null;\n\n this.playing = false;\n this.muted = true;\n\n for (let i = 0; i < this.elements.length; i++) {\n const element = this.elements[i];\n if (!element.hasAttribute('data-vbg-uid') && this.videoBackgroundFactoryInstance) this.videoBackgroundFactoryInstance.add(element);\n this.stack.push(element);\n this.map.set(element, i);\n \n if (i === 0) {\n this.current = 0;\n this.currentElement = element;\n if (this.videoBackgroundFactoryInstance) this.currentInstance = this.videoBackgroundFactoryInstance.get(element);\n }\n element.addEventListener('video-background-ended', this.onVideoEnded.bind(this));\n element.addEventListener('video-background-seeked', this.onVideoSeeked.bind(this));\n element.addEventListener('video-background-pause', this.onVideoPause.bind(this));\n element.addEventListener('video-background-ready', this.onVideoReady.bind(this));\n element.addEventListener('video-background-state-change', this.setVideoBackgroundFactoryInstance.bind(this), { once: true });\n element.addEventListener('video-background-time-update', this.setVideoBackgroundFactoryInstance.bind(this), { once: true });\n }\n }\n\n setVideoBackgroundFactoryInstance(event) {\n if (this.videoBackgroundFactoryInstance) return;\n this.videoBackgroundFactoryInstance = event.detail.factoryInstance;\n if (!this.currentInstance) this.currentInstance = this.videoBackgroundFactoryInstance.get(this.currentElement);\n }\n\n onVideoReady(event) {\n if (this.stack[this.current] !== event.detail.element) return;\n this.setVideoBackgroundFactoryInstance(event);\n const videoBackground = event.detail;\n if (videoBackground.params.muted) this.muted = true;\n if (!videoBackground.isIntersecting) return;\n if (!videoBackground.params.autoplay) return;\n this.playing = true;\n if (videoBackground.currentState === 'playing') return;\n videoBackground.softPlay();\n }\n\n onVideoPause(event) {;\n this.setVideoBackgroundFactoryInstance(event);\n const stackIndex = this.map.get(event.detail.element);\n if (stackIndex === this.current) return;\n }\n\n levelSeekBars() {\n for (let i = 0; i < this.stack.length; i++) {\n if (i === this.current) continue;\n const seekBarElem = this.getSeekBar(this.videoBackgroundFactoryInstance.get(this.stack[i]));\n if (!seekBarElem) continue;\n if (i < this.current) {\n this.setProgress(seekBarElem, 100);\n } else {\n this.setProgress(seekBarElem, 0);\n }\n }\n }\n\n getSeekBar(currentInstance) {\n if (!currentInstance) return;\n const uid = currentInstance.uid;\n const element = document.querySelector(`.js-seek-bar-wrap[data-target-uid=\"${uid}\"]`);\n if (!element) return;\n return element;\n }\n\n setProgress(seekBarElem, value) {\n if (!seekBarElem) return;\n const progressElem = seekBarElem.querySelector('.js-seek-bar-progress');\n const inputElem = seekBarElem.querySelector('.js-seek-bar');\n if (progressElem) progressElem.value = value;\n if (inputElem) inputElem.value = value;\n }\n\n onVideoSeeked(event) {\n const current = this.map.get(event.detail.element);\n if (this.current !== current) this.setCurrent(current, true);\n }\n\n setCurrent(index, seek) {\n const previous = this.current;\n if (index >= this.stack.length) index = 0;\n if (index < 0) index = this.stack.length - 1;\n const previousInstance = this.videoBackgroundFactoryInstance.get(this.stack[previous]);\n this.current = index;\n this.currentInstance = this.videoBackgroundFactoryInstance.get(this.stack[this.current]);\n this.currentElement = this.stack[this.current];\n \n this.stack[previous].style.display = 'none';\n this.currentElement.style.display = 'block';\n\n if (!seek) {\n const seekBarElem = this.getSeekBar(this.currentInstance);\n if (seekBarElem) this.setProgress(seekBarElem, 0);\n this.currentInstance.seek(0);\n }\n\n setTimeout(() => {\n if (this.currentInstance.currentState !== 'playing') this.currentInstance.play();\n }, 100);\n if (previousInstance && previousInstance.currentState !== 'paused') previousInstance.pause();\n\n setTimeout(this.levelSeekBars.bind(this), 100);\n\n if (index >= this.stack.length) this.dispatchEvent('video-background-group-forward-rewind');\n if (index < 0) this.dispatchEvent('video-background-group-backward-rewind');\n }\n\n dispatchEvent(name) {\n this.element.dispatchEvent(new CustomEvent(name, { bubbles: true, detail: this }));\n }\n\n onVideoEnded(event) {\n if (event.detail.element !== this.currentElement) return;\n this.next();\n }\n\n next() {\n this.setCurrent(this.current + 1);\n this.dispatchEvent('video-background-group-next');\n }\n\n prev() {\n this.setCurrent(this.current - 1);\n this.dispatchEvent('video-background-group-previous');\n }\n\n unmute() {\n for (let i = 0; i < this.stack.length; i++) {\n const instance = this.videoBackgroundFactoryInstance.get(this.stack[i]);\n if (!instance) continue;\n instance.unmute();\n }\n\n this.muted = false;\n this.dispatchEvent('video-background-group-umnute');\n }\n\n mute() {\n for (let i = 0; i < this.stack.length; i++) {\n const instance = this.videoBackgroundFactoryInstance.get(this.stack[i]);\n if (!instance) continue;\n instance.mute();\n }\n\n this.muted = true;\n this.dispatchEvent('video-background-group-mute');\n }\n\n pause() {\n this.currentInstance.pause();\n this.playing = false;\n this.dispatchEvent('video-background-group-pause');\n }\n\n play() {\n this.currentInstance.play();\n this.playing = true;\n this.dispatchEvent('video-background-group-play');\n }\n\n destroy() {\n for (let i = 0; i < this.elements.length; i++) {\n const element = this.elements[i];\n element.removeEventListener('video-background-ended', this.onVideoEnded.bind(this));\n element.removeEventListener('video-background-seeked', this.onVideoSeeked.bind(this));\n element.removeEventListener('video-background-pause', this.onVideoPause.bind(this));\n element.removeEventListener('video-background-ready', this.onVideoReady.bind(this));\n element.removeEventListener('video-background-state-change', this.setVideoBackgroundFactoryInstance.bind(this));\n element.removeEventListener('video-background-time-update', this.setVideoBackgroundFactoryInstance.bind(this));\n }\n }\n}\n\nexport class PlayToggle {\n constructor(playToggleElem, vbgInstance) {\n if (!playToggleElem) return;\n \n this.element = playToggleElem;\n this.targetSelector = this.element.getAttribute('data-target');\n\n if (!this.targetSelector) return;\n this.active = false;\n\n if (this.element.hasAttribute('aria-pressed')) {\n this.active = this.element.getAttribute('aria-pressed') === 'true';\n } else {\n this.element.setAttribute('aria-pressed', this.active);\n }\n\n this.element.setAttribute('role', 'switch');\n\n this.targetElem = document.querySelector(this.targetSelector);\n if (!this.targetElem) return;\n\n if (vbgInstance) this.vbgInstance = vbgInstance;\n\n this.targetElem.addEventListener('video-background-ready', this.onReady.bind(this));\n this.targetElem.addEventListener('video-background-state-change', this.onStateChange.bind(this));\n this.targetElem.addEventListener('video-background-play', this.onPlay.bind(this));\n this.targetElem.addEventListener('video-background-pause', this.onPause.bind(this));\n this.targetElem.addEventListener('video-background-destroyed', this.onDestroyed.bind(this));\n\n this.element.addEventListener('click', this.onClick.bind(this));\n }\n\n onReady(event) {\n this.vbgInstance = event.detail;\n }\n\n onStateChange(event) {\n if (!this.vbgInstance) this.vbgInstance = event.detail;\n this.active = this.vbgInstance.currentState === 'playing' || this.vbgInstance.currentState === 'buffering';\n this.element.setAttribute('aria-pressed', this.active);\n }\n\n onPlay(event) {\n if (!this.vbgInstance) this.vbgInstance = event.detail;\n this.active = true;\n this.element.setAttribute('aria-pressed', this.active);\n }\n\n onPause(event) {\n if (!this.vbgInstance) this.vbgInstance = event.detail;\n this.active = false;\n this.element.setAttribute('aria-pressed', this.active);\n }\n\n onDestroyed(event) {\n this.vbgInstance = null;\n this.active = false;\n this.element.setAttribute('aria-pressed', this.active);\n }\n\n onClick(event) {\n if (!this.vbgInstance) return;\n if (this.active) {\n this.vbgInstance.pause();\n } else {\n this.vbgInstance.play();\n }\n }\n}\n\nexport class MuteToggle {\n constructor(muteToggleElem, vbgInstance) {\n if (!muteToggleElem) return;\n \n this.element = muteToggleElem;\n this.targetSelector = this.element.getAttribute('data-target');\n\n if (!this.targetSelector) return;\n this.active = false;\n\n if (this.element.hasAttribute('aria-pressed')) {\n this.active = this.element.getAttribute('aria-pressed') === 'true';\n } else {\n this.element.setAttribute('aria-pressed', this.active);\n }\n\n this.element.setAttribute('role', 'switch');\n\n this.targetElem = document.querySelector(this.targetSelector);\n if (!this.targetElem) return;\n\n if (vbgInstance) this.vbgInstance = vbgInstance;\n\n this.targetElem.addEventListener('video-background-ready', this.onReady.bind(this));\n this.targetElem.addEventListener('video-background-mute', this.onMute.bind(this));\n this.targetElem.addEventListener('video-background-unmute', this.onUnmute.bind(this));\n this.targetElem.addEventListener('video-background-destroyed', this.onDestroyed.bind(this));\n\n this.element.addEventListener('click', this.onClick.bind(this));\n }\n\n onReady(event) {\n this.vbgInstance = event.detail;\n if (this.vbgInstance.params.muted) {\n this.active = true;\n this.element.setAttribute('aria-pressed', this.active);\n }\n }\n\n onMute(event) {\n if (!this.vbgInstance) this.vbgInstance = event.detail;\n this.active = true;\n this.element.setAttribute('aria-pressed', this.active);\n }\n\n onUnmute(event) {\n if (!this.vbgInstance) this.vbgInstance = event.detail;\n this.active = false;\n this.element.setAttribute('aria-pressed', this.active);\n }\n\n onDestroyed(event) {\n this.vbgInstance = null;\n this.active = false;\n this.element.setAttribute('aria-pressed', this.active);\n }\n\n onClick(event) {\n if (!this.vbgInstance) return;\n if (this.active) {\n this.vbgInstance.unmute();\n } else {\n this.vbgInstance.mute();\n }\n }\n}\n\n// TODO: this can be achieved with custom elements... Maybe it's finally time to use them?\nclass GeneralFactory {\n constructor(selector, callback, uidAttribute = 'data-uid') {\n this.instances = {};\n this.selector = selector;\n this.elements = [];\n this.callback = callback;\n this.uidAttribute = uidAttribute;\n\n if (!callback || typeof callback !== 'function') return;\n\n if (typeof this.selector === 'string') {\n this.elements = document.querySelectorAll(this.selector);\n }\n\n if (this.selector instanceof Element) {\n this.elements = [this.selector];\n }\n\n if (this.selector instanceof NodeList) {\n this.elements = this.selector;\n }\n\n for (let i = 0; i < this.elements.length; i++) {\n this.add(this.elements[i]);\n\n // TODO: maybe manage elements array?\n }\n }\n\n basicUID() {\n return Date.now().toString(36) + Math.random().toString(36).substring(2);\n }\n\n generateUID() {\n let tempuid = this.basicUID();\n if (!this.instances.hasOwnProperty(tempuid)) return tempuid;\n return this.generateUID();\n }\n\n add(element) {\n let id = element.getAttribute('id');\n if (!id || this.instances.hasOwnProperty(id)) {\n id = element.getAttribute(this.uidAttribute);\n\n if (!id || this.instances.hasOwnProperty(id)) {\n id = this.generateUID();\n element.setAttribute(this.uidAttribute, id);\n }\n }\n\n if (this.callback && typeof this.callback === 'function') \n this.instances[id] = this.callback(element, id, this);\n }\n\n getID(element) {\n if (!element) return;\n if (typeof element === 'string') return element;\n const id = element.getAttribute('id');\n if (id && this.instances.hasOwnProperty(id)) return id;\n const uid = element.getAttribute(this.uidAttribute);\n if (uid && this.instances.hasOwnProperty(uid)) return uid;\n }\n\n get(element) {\n if (!element) return;\n const id = this.getID(element);\n if (!id) return;\n return this.instances[id];\n }\n\n destroy(element) {\n if (!element) return;\n const id = this.getID(element);\n if (!id) return;\n const instance = this.instances[id];\n if (instance.hasOwnProperty('destroy') && typeof instance.destroy == 'function') this.instances[id].destroy();\n delete this.instances[id];\n }\n\n destroyAll() {\n for (const uid in this.instances) {\n const instance = this.instances[uid];\n if (instance.hasOwnProperty('destroy') && typeof instance.destroy == 'function') instance.destroy();\n delete this.instances[uid];\n }\n }\n}\n\nexport class VideoBackgroundGroups extends GeneralFactory {\n constructor(selector = '.js-vbg-group', videoBackgroundSelector, videoBackgroundFactoryInstance) {\n super(selector, (element, id, factoryInstance) => new VideoBackgroundGroup(element, videoBackgroundSelector, videoBackgroundFactoryInstance));\n }\n}\n", "import { SeekBar, PlayToggle, MuteToggle, VideoBackgroundGroup, VideoBackgroundGroups } from \"./lib/controls\";\n\nwindow.SeekBar = SeekBar;\nwindow.PlayToggle = PlayToggle;\nwindow.MuteToggle = MuteToggle;\nwindow.VideoBackgroundGroup = VideoBackgroundGroup;\nwindow.VideoBackgroundGroups = VideoBackgroundGroups;\n"],
"mappings": ";;;AAAO,MAAM,UAAN,MAAc;AAAA,IACnB,YAAY,SAAS,aAAa;AAChC,WAAK,OAAO;AACZ,UAAI,CAAC;AA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