1234567891011121314151617181920212223242526272829303132333435 |
- // 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()
- }
- window.onClickShare = () => {
- var a = document.createElement('a')
- a.download = 'image'
- a.href = '../StreamingAssets/share.png'
- a.click()
- }
|