Skip to content

引入 xgplayer-mp4 后无法播放视频 #1872

@dengaye

Description

@dengaye

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

您使用的操作系统和浏览器分别是? What OS and browser are you using?
chrome: 105.0.5195.102
window 电脑

如何复现问题? How to reproduce the problem?
使用 plugins: [xgplayerMp4] 后视频就不播放了,没有任何报错

播放器代码:

xgPlayerRef.current = new SimplePlayer({
        id: `video_play`,
        url: videoUrl,
        autoplay: false,
        fluid: true,
        playsinline: true,
        autoplayMuted: true,
        controls: false,
        videoConfig: {
          crossOrigin: "anonymous"
        },
        height: window.innerHeight,
        width: window.innerWidth,
        plugins: [Mp4Plugin],
        mp4plugin: {
          maxBufferLength: 5,
          minBufferLength: 2
        }
     })

您期望的播放器正常行为是? What did you expect to happen?
引入插件可以正常播放视频

实际播放器的表现是? What actually happened?
不播放,控制台也没有报错。
看日志 xgplayer 就输出了这个,页面没有 video
[xgplayer] setState state from:INITIAL to:READY
[xgplayer] setState state from:READY to:ATTACHING

注释掉插件后播放器就可以播放了

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    mp4xgplayer-mp4

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions