bytedance / xgplayer

A HTML5 video player with a parser that saves traffic
https://h5player.bytedance.com/
MIT License
8.24k stars 864 forks source link

saveScreenShot 不支持 qiankun #1396

Closed liu-collab closed 2 weeks ago

liu-collab commented 5 months ago

您使用的西瓜播放器版本是多少? What version of xgplayer are you using?

3.0.16 您使用的操作系统和浏览器分别是? What OS and browser are you using? win10 chrome

如何复现问题? How to reproduce the problem?

const { saveScreenShot } = playerRef.getPlugin('screenshot')
    playerRef
      .getPlugin('screenshot')
      .shot()
      .then((res) => {
        saveScreenShot(res, '截图.png')
      })

您期望的播放器正常行为是? What did you expect to happen? 在qiankun中可以支持下载

实际播放器的表现是? What actually happened? image

可填写您所在的公司和相关产品业务,方便我们提供更好的技术支持 You can write your company and product which uses xgplayer, for helping us provide better technical support.

liu-collab commented 5 months ago

暂时可以这么解决

 playerRef
      .getPlugin('screenshot')
      .shot()
      .then((res) => {
        // 下载截图 saveScreenShot 播放器 不支持qiankun
        const saveLink = document.createElement('a')
        saveLink.href = res
        saveLink.download = '截图.png'
        document.body.appendChild(saveLink)
        saveLink.click()
        window.URL.revokeObjectURL(saveLink)
      })
gemxx commented 4 months ago

@liu-collab 请问您的chrome浏览器版本具体是多少?我看你的提的是和华为乾坤有关,这是车机系统里的问题吗?

liu-collab commented 4 months ago

@liu-collab 请问您的chrome浏览器版本具体是多少?我看你的提的是和华为乾坤有关,这是车机系统里的问题吗?

微前端:https://qiankun.umijs.org/zh

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 2 weeks ago

This issue has been automatically closed after a period of inactivity. If it is still present in the latest release, please create a new issue with up-to-date information. Thank you!