streamedian 接摄像头的坑

1.有用户名密码验证时报错

queryCredentials(client) {
                    return new Promise((resolve, reject) => {
                        let c = prompt('input credentials in format user:password');

                        if (c) {
                            client.setCredentials.apply(client, c.split(':'));
                            resolve();
                        } else {
                            reject();
                        }
                    });
                }

这一段会出现client为空问题,解决方法如下await 这一句作如下修改

                 let ep = this.parent.endpoint;
                    if (!ep.user || !ep.pass) {
                        try {
                            // await this.parent.queryCredentials.call(this.parent);
                            await this.parent.queryCredentials.call(this,this.parent);
                        } catch (e) {
                            throw new AuthError();
                        }
                    }

2.streamedian不支持H265码流

把摄像头的码流改成h264即可。

你可能感兴趣的:(streamedian 接摄像头的坑)