In my application there is an video call stream. it is finely working without nebular theme. but with nebular theme it not conneted to the video call steam. what can be caused? This is the i am working on.
startCall() {
console.log("start calllll");
this.agoraService.client?.join('this.token',
'this.channel', null, (uid: any) => {
this.localStream = this.agoraService.createStream(uid, true, '', '', true, false);
this.localStream.setVideoProfile('720p_3');
this.subscribeToStreams();
});
}
private subscribeToStreams() {
this.localStream.on("accessAllowed", () => {
console.log("AGOra-SDK--- accessAllowed");
});
// The user has denied access to the camera and mic.
this.localStream.on("accessDenied", () => {
console.log("AGOra-SDK--- accessDenied");
});
this.localStream.init(
() => {
console.log("AGOra-SDK--- getUserMedia successfully");
this.localStream.play("agora_local");
this.agoraService.client.publish(this.localStream, function (err: string) {
console.log("AGOra-SDK--- Publish local stream error: " + err);
});
this.agoraService.client.on("stream-published", function (evt: any) {
console.log("AGOra-SDK--- Publish local stream successfully");
});
},
function (err: any) {
console.log("AGOra-SDK--- getUserMedia failed", err);
}
);
this.agoraService.client.on("error", (err: { reason: string; }) => {
console.log("AGOra-SDK--- Got error msg:", err.reason);
if (err.reason === "DYNAMIC_KEY_TIMEOUT") {
this.agoraService.client.renewChannelKey(
"",
() => {
console.log("AGOra-SDK--- Renew channel key successfully");
},
(err: any) => {
console.log("AGOra-SDK--- Renew channel key failed: ", err);
}
);
}
});
this.agoraService.client.on("stream-added", (evt: { stream: any; }) => {
const stream = evt.stream;
this.agoraService.client.subscribe(stream, (err: any) => {
console.log("AGOra-SDK--- Subscribe stream failed", err);
});
});
this.agoraService.client.on("stream-subscribed", (evt: { stream: any; }) => {
const stream = evt.stream;
if (!this.remoteCalls.includes(`agora_remote${stream.getId()}`))
this.remoteCalls.push(`agora_remote${stream.getId()}`);
setTimeout(() => stream.play(`agora_remote${stream.getId()}`), 2000);
});
this.agoraService.client.on("stream-removed", (evt: { stream: any; }) => {
const stream = evt.stream;
stream.stop();
this.remoteCalls = this.remoteCalls.filter(
(call: string) => call !== `#agora_remote${stream.getId()}`
);
console.log(`AGOra-SDK--- Remote stream is removed ${stream.getId()}`);
});
this.agoraService.client.on("peer-leave", (evt: { stream: any; uid: any; }) => {
const stream = evt.stream;
if (stream) {
stream.stop();
this.remoteCalls = this.remoteCalls.filter(
(call: string) => call === `#agora_remote${stream.getId()}`
);
console.log(`AGOra-SDK--- ${evt.uid} left from this channel`);
}
});
}
I tried to connect to the video steam by using token and channel id. But not connecting to the video call. even though i gave the browser access to the video and audio. I expected to connacted to the video call stream and open the camera of the computer. Without nebular theme it is working finely.