web端agora-rtc-sdk-ng":"^4.21.0",
Android端io.agora.rtc:full-rtc-basic:4.1.0
现在情况是单聊场景下,Android端能看到web端的音视频,web端看不到Android端的音视频
web端
CallKitClient.on('user-published', async (user, mediaType) => {
await CallKitClient.subscribe(user, mediaType)
if (mediaType === 'video') {
console.log('>>>>>>视频类型')
const remoteVideoTrack = user.videoTrack
console.log('remoteVideoTrack', remoteVideoTrack)
setTimeout(() => {
remoteVideoTrack.play(mainContainer.value)
console.log('%c 远端流已播放', 'color:green')
}, 300)
}
if (mediaType === 'audio') {
console.log('>>>>>>音视类型')
const remoteAudioTrack = user.audioTrack
// Play the remote audio track. No need to pass any DOM element.
remoteAudioTrack.play()
}
})
该方法没有回调到Android端的视频流