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

初始化播放器之后能正常显示,但控制台报‘'codecType’属性相关的错误 #263

Open
BRIDGEa2000 opened this issue Oct 21, 2024 · 5 comments

Comments

@BRIDGEa2000
Copy link

BRIDGEa2000 commented Oct 21, 2024

bug 描述(Describe the bug)

初始化播放器之后能正常显示,但控制台报 Uncaught TypeError: Cannot create property 'codecType' on number '0'

项目使用 vite+vue3(javaScript)

  • node:20.10.0
"dependencies": {

  "ezuikit-js": "8.0.11",

  "vue": "^3.4.37"

 },

 "devDependencies": {

  "@vitejs/plugin-vue": "^5.1.4",

  "vite": "^5.4.8"

 }

复现(To Reproduce)

初始化代码:

const init = () =>
{
  if (player) {
    destroy();
  }
  const divElement = videoDiv.value;
  const width = divElement.offsetWidth;
  const height = divElement.offsetHeight;
  console.group("mounted 组件挂载完毕状态===============》");
  player = new EZUIKit.EZUIKitPlayer({
    id: "video-container", // 视频容器ID
    accessToken:    "",
    url: "",
    // simple: 极简版; pcLive: pc直播; pcRec: pc回放; mobileLive: 移动端直播; mobileRec: 移动端回放;security: 安防版; voice: 语音版;
    template: "pcLive",
    plugin: ["talk"], // 加载插件,talk-对讲
    width: width,
    height: height,
    // language: "en", // zh | en
    handleError: (err) =>
    {
      console.error("handleError", err);
    },
    // staticPath: "/ezuikit_static", // 如果想使用本地静态资源,请复制根目录下ezuikit_static 到当前目录下, 然后设置该值
  });
  window.player = player;
  // });
};

 <div ref="videoDiv" id="video-container"></div>

页面能正常显示

image-20241021155500698

但控制台报错,有几十条相同的报错信息

image-20241021155339068

@freeshineit
Copy link
Collaborator

浏览器的版本发一下

@BRIDGEa2000
Copy link
Author

浏览器的版本发一下

Clip_2024-10-26_19-54-35

@BRIDGEa2000
Copy link
Author

浏览器的版本发一下

搞错了,上面这张是我自己电脑浏览器的版本,报错的是公司的。下周一再看看,我自己的浏览器测试了demo没有报错

@freeshineit
Copy link
Collaborator

浏览器的版本发一下

搞错了,上面这张是我自己电脑浏览器的版本,报错的是公司的。下周一再看看,我自己的浏览器测试了demo没有报错

OK

@BRIDGEa2000
Copy link
Author

浏览器的版本发一下

搞错了,上面这张是我自己电脑浏览器的版本,报错的是公司的。下周一再看看,我自己的浏览器测试了demo没有报错

OK

开始怀疑是插件的问题。现在开了无痕模式测试,也是会报“codecType”相关错误
image

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