// setTimeout(() => { // console.log('-----unity实例', unityExamples); // }, 2000); const videoBox = document.querySelector('.videoBox') const videoDom = document.querySelector('.videoBox video') const videoBtnDom = document.querySelector('.skipTxt') // 自动播放视频 videoDom.play() // 点击按钮,或者视频播放完毕的回调 const videoPalyEnd = () => { console.log('-------视频播放完毕,或者点击跳过--------'); document.querySelector('body').removeChild(videoBox) } videoDom.addEventListener('ended', function () { videoPalyEnd() }, false) videoBtnDom.onclick = () => { videoPalyEnd() }