Click events is the reliable event to unlock videos.
const onClick = () => {
dom.removeEventListener('click', onClick)
// unlock videos
}
dom.addEventListener('click', onClick)
There’s a displayObject called `button`. Create a DOM mask for it:
const { x, y, width, height } = button.getBounds()
const buttonMask = new DOM('button')
.setAlpha(0)
.setPosition(x, y)
.setSize(width, height)
this.addChild(buttonMask)
// filter for brightness
const colorMatrix = new PIXI.filters.ColorMatrixFilter()
colorMatrix.brightness(0.9)
sprite.setFilters(colorMatrix)
// filter for trimming colors
const colorMatrix = new PIXI.filters.ColorMatrixFilter()
colorMatrix.blackAndWhite(true)
sprite.setFilters(colorMatrix)