Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么从回放切换到直播,控制视频播放器的按钮条就会自动消失,无法一直存在(版本"ezuikit-js": "7.7.10",) #232

Open
suzhenghui-sky opened this issue Jul 24, 2024 · 2 comments

Comments

@suzhenghui-sky
Copy link

bug 描述(Describe the bug)

对bug是什么的清晰简洁的描述。 (A clear and concise description of what the bug is.)
为什么从回放切换到直播,控制视频播放器的按钮条就会自动消失,无法一直存在。

复现(To Reproduce)

再现步骤(Steps to reproduce the behavior):
initCameraPlayer() {
const width = this.$refs.commonCamera?.clientWidth || 200;

  this.player = new EZUIKit.EZUIKitPlayer({
    id: this.cameraSn,
    accessToken: this.cameraToken,
    url: this.cameraUrl,
    autoplay: true,
    plugin: ['talk'],
    width: width,
    height: 500,
    themeData: {
      autoFocus: 0, // 设置为0,视频按钮条就不会消失
      poster:
        'https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png',
      header: {
        color: '#1890ff',
        activeColor: '#FFFFFF',
        backgroundColor: '#000000',
        btnList: [
          {
            iconId: 'deviceID',
            part: 'left',
            defaultActive: 0,
            memo: '顶部设备名称',
            isrender: 1
          },
          {
            iconId: 'deviceName',
            part: 'left',
            defaultActive: 0,
            memo: '顶部设备ID',
            isrender: 1
          }
        ]
      },
      footer: {
        color: '#FFFFFF',
        activeColor: '#1890FF',
        backgroundColor: '#00000021',
        btnList: [
          {
            iconId: 'play',
            part: 'left',
            defaultActive: 1,
            memo: '播放',
            isrender: 1
          },
          {
            iconId: 'capturePicture',
            part: 'left',
            defaultActive: 0,
            memo: '截屏按钮',
            isrender: 1
          },
          {
            iconId: 'sound',
            part: 'left',
            defaultActive: 0,
            memo: '声音按钮',
            isrender: 1
          },
          {
            iconId: 'pantile',
            part: 'left',
            defaultActive: 0,
            memo: '云台控制按钮',
            isrender: 1
          },
          {
            iconId: 'recordvideo',
            part: 'left',
            defaultActive: 0,
            memo: '录制按钮',
            isrender: 1
          },
          {
            iconId: 'talk',
            part: 'left',
            defaultActive: 0,
            memo: '对讲按钮',
            isrender: 1
          },
          {
            iconId: 'zoom',
            part: 'left',
            defaultActive: 0,
            memo: '电子放大',
            isrender: 1
          },
          {
            iconId: 'cloudRec',
            part: 'right',
            defaultActive: 0,
            memo: '头部云存储回放',
            isrender: 0
          },
          {
            iconId: 'rec',
            part: 'right',
            defaultActive: 0,
            memo: '头部本地回放',
            isrender: 1
          },
          {
            iconId: 'hd',
            part: 'right',
            defaultActive: 0,
            memo: '清晰度切换按钮',
            isrender: 1
          },
          {
            iconId: 'webExpend',
            part: 'right',
            defaultActive: 0,
            memo: '网页全屏按钮',
            isrender: 1
          },
          {
            iconId: 'expend',
            part: 'right',
            defaultActive: 0,
            memo: '全局全屏按钮',
            isrender: 1
          }
        ]
      }
    }
  });

  window.setTimeout(() => {
    this.player
      .changePlayUrl({
        type: 'rec',
        deviceSerial: this.cameraSn,
        channelNo: 1
      })
      .then(() => {
        console.log('切换成功');
      });
  }, 5000);

  window.setTimeout(() => {
    this.player
      .changePlayUrl({
        type: 'live',
        deviceSerial: this.cameraSn,
        channelNo: 1
      })
      .then(() => {
        console.log('切换成功');
      });
  }, 20000);

},
  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

预期行为(Expected behavior)

对你期望发生的事情的清晰简洁的描述。 (A clear and concise description of what you expected to happen.)
切换不应该影响视频按钮条

截图(Screenshots)

如果适用,请添加屏幕截图以帮助解释您的问题。 (If applicable, add screenshots to help explain your problem.)
图片

PC 请填写以下信息 (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

mobile 请填写以下信息 (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

附加上下文(Additional context)

在此处添加有关该问题的任何其他上下文。 (Add any other context about the problem here.)

@freeshineit
Copy link
Collaborator

autoFocus 是按钮条展示的时间, 0 就不展示了

@suzhenghui-sky
Copy link
Author

autoFocus 是按钮条展示的时间, 0 就不展示了

经我测试0是一直显示,只是切换后就失效了。如何设置一直显示吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants