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

livekit视频流报错 || livekit video streaming error #268

Open
Develkone opened this issue Nov 13, 2024 · 5 comments
Open

livekit视频流报错 || livekit video streaming error #268

Develkone opened this issue Nov 13, 2024 · 5 comments

Comments

@Develkone
Copy link

Develkone commented Nov 13, 2024

碰到一个很诡异的情况,我是自己搭建的livekit,也已经通过了livekit官方的可用性测试,语音以及屏幕分享都能工作,我用台式机屏幕分享时一切正常,但是我用笔记本来屏幕分享和开启摄像头时浏览器都会报错InvalidModificationError: Failed to execute 'setCodecPreferences' on 'RTCRtpTransceiver': Invalid codec preferences: invalid codec with name "H264".
image
虽然报错了但是笔记本一样能够分享屏幕,但是分享屏幕后分享屏幕按钮的状态不会改变,而且点击开启摄像头后摄像头按钮的状态没有改变也看不到摄像头的画面,虽然浏览器表示摄像头正在工作、笔记本的摄像头指示灯也是亮的,退出语音频道后摄像头仍然是开启的,刷新页面后才会关闭,这个异常我在官方的服务器也能复现,安卓端使用摄像头和笔记本的情况也是一样。

目前就是不知道为什么台式机没有问题但是笔记本却有问题,这是tailchat这边的问题还是livekit那边的问题呢


I encountered a very strange situation. I built my own livekit and it has passed the official usability test of livekit. Both voice and screen sharing can work. When I use a desktop computer to screen share, everything is normal, but when I use a laptop to screen share and when turning on the camera, the browser will report an error InvalidModificationError: Failed to execute 'setCodecPreferences' on 'RTCRtpTransceiver': Invalid codec preferences: invalid codec with name "H264".
image
Although an error is reported, the notebook can still share the screen, but the status of the share screen button will not change after sharing the screen, and after clicking to turn on the camera, the status of the camera button does not change and the camera picture cannot be seen, although the browser indicates that the camera is working. The camera indicator light of the notebook is also on. After exiting the voice channel, the camera is still on and will be turned off after refreshing the page. I can also reproduce this abnormality on the official server. The same is true when using the camera and notebook on the Android side.

At present, I don’t know why there is no problem on the desktop but there is a problem on the laptop. Is this a problem with tailchat or a problem with livekit?

@github-actions github-actions bot changed the title livekit视频流报错 livekit视频流报错 || livekit video streaming error Nov 13, 2024
@Develkone
Copy link
Author

Develkone commented Nov 13, 2024

刚刚又使用一个安卓平板进行了摄像头测试,摄像头正常工作。


I just tested the camera using an Android tablet and the camera works normally.

@Develkone
Copy link
Author

Develkone commented Nov 14, 2024

livekit/client-sdk-js#1219
livekit/client-sdk-js#1111
livekit那边有人反映了类似的问题,貌似原因是tailchat使用的livekit client是旧版本,有bug


livekit/client-sdk-js#1219
livekit/client-sdk-js#1111
Someone on the livekit side reported a similar problem. It seems that the reason is that the livekit client used by tailchat is an old version and has bug

@Develkone
Copy link
Author

Develkone commented Nov 14, 2024

我手动将livekit-client版本更换到v1最新的版本1.15.13后重新构建镜像,问题解决了,笔记本摄像头和屏幕分享,以及安卓手机摄像头都能正常工作不报错了,livekit-client目前最新版是2.6.0,不过v1升级v2还要修改代码,所以我只是单纯升级到了v1最新版


I manually changed the livekit-client version to the latest v1 version 1.15.13 and then rebuilt the image. The problem was solved. The laptop camera and screen sharing, as well as the Android phone camera can work normally without errors. The latest version of livekit-client is 2.6.0, but upgrading from v1 to v2 requires modifying the code, so I just upgraded to the latest version of v1

@moonrailgun
Copy link
Contributor

cool, looks you can send a PR to help tailchat resolve problem.

did you mind send a PR for it? i think its will very helpful

@zhudemiao
Copy link

我手动将livekit-client版本更换到v1最新的版本1.15.13后重新构建镜像,问题解决了,笔记本摄像头和屏幕分享,以及安卓手机摄像头都能正常工作不报错了,livekit-client目前最新版是2.6.0,不过v1升级v2还要修改代码,所以我只是单纯升级到了v1最新版

I manually changed the livekit-client version to the latest v1 version 1.15.13 and then rebuilt the image. The problem was solved. The laptop camera and screen sharing, as well as the Android phone camera can work normally without errors. The latest version of livekit-client is 2.6.0, but upgrading from v1 to v2 requires modifying the code, so I just upgraded to the latest version of
能否给出具体的配置信息:
原来的配置(./server/plugins/com.msgbyte.livekit/web/plugins/com.msgbyte.livekit/package.json):
{
"name": "@plugins/com.msgbyte.livekit",
"main": "src/index.tsx",
"version": "0.0.0",
"description": "Add livekit to provide meeting and live streaming feature",
"private": true,
"scripts": {
"sync:declaration": "tailchat declaration github"
},
"dependencies": {
"@livekit/components-core": "^0.6.11",
"@livekit/components-react": "^1.0.8",
"@livekit/components-styles": "^1.0.4",
"livekit-client": "^1.12.1",
"lodash": "^4.17.21",
"zustand": "4.3.6"
},
"devDependencies": {
"@types/lodash": "^4.14.196",
"@types/styled-components": "^5.1.26",
"react": "18.2.0",
"react-router": "^6.8.1",
"styled-components": "^5.3.6"
}
}
~
修改后的配置
{
"name": "@plugins/com.msgbyte.livekit",
"main": "src/index.tsx",
"version": "0.0.0",
"description": "Add livekit to provide meeting and live streaming feature",
"private": true,
"scripts": {
"sync:declaration": "tailchat declaration github"
},
"dependencies": {
"@livekit/components-core": "^0.6.11",
"@livekit/components-react": "^1.0.8",
"@livekit/components-styles": "^1.0.4",
"livekit-client": "^1.15.13",
"lodash": "^4.17.21",
"zustand": "4.3.6"
},
"devDependencies": {
"@types/lodash": "^4.14.196",
"@types/styled-components": "^5.1.26",
"react": "18.2.0",
"react-router": "^6.8.1",
"styled-components": "^5.3.6"
}
}
修改后,无法编译通过
~

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

3 participants