'How can I solve the problem of createCameraVideoTrack timeout?
I am using Angular and Agora to make a ChatApp.
this method is working fine the token the uid the channel ... ` async joinRoomInit() {
// create a client
this.client = AgoraRTC.createClient({mode:'rtc', codec:'vp8'});
// Join a specific room
await this.client.join(environment.agoraAPI, this.roomid, environment.agoraToken, this.uid);
this.joinStream(); }`
` async joinStream() {
const AudioTrack = await AgoraRTC.createMicrophoneAudioTrack();
console.warn('Audio created');
const VideoTrack = await AgoraRTC.createCameraVideoTrack();
console.warn('video track is created');
// Publish the local audio and video tracks to the RTC channel.
await client.publish([AudioTrack, VideoTrack]);
let player = '<div class="video-call" id='user-id-this.uid'"></div>';
document.querySelector('.left-side')?.insertAdjacentHTML('afterbegin', player);
VideoTrack.play(user-id-{this.uid);}
`
The Audio track is created succesfully because it returns this Agora-SDK [INFO]: create microphone audio track success, trackId: track-mic-ea57500d , but AgoraRTC.createCameraVideoTrack is not working it gives me as result in the console : Agora-SDK [DEBUG]: createCameraVideoTrack timeout the same problem appears when using another method AgoraRTC.createMicrophoneAndCameraTracks the Mic and Video are both allowed in chrome. I don't really know what or where does the problem coming from. Any Help would be appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
