web于安卓端 能听到声音看不到安卓画面,安卓能看到我web端

16:34:33:944 Agora-SDK [INFO]: [113A2] Adding event handler on error
AgoraRTCSDK.min.js?19fb:2 16:34:33:945 Agora-SDK [INFO]: [113A2] Initializing AgoraRTC client, appId: 4a1edc23b0d34b29a4968949bed800b1.
videoTalking.vue?a70e:170 初始化客户端
videoTalking.vue?a70e:172 {…} “optionnnnnnn”
AgoraRTCSDK.min.js?19fb:2 16:34:33:946 Agora-SDK [DEBUG]: Flush cached event reporting: 5
AgoraRTCSDK.min.js?19fb:2 16:34:33:948 Agora-SDK [DEBUG]: [113A2] Connect to choose_server: https://webrtc2-ap-web-1.agora.io/api/v1
AgoraRTCSDK.min.js?19fb:2 16:34:33:948 Agora-SDK [DEBUG]: [113A2] Connect to choose_server: https://webrtc2-ap-web-2.agoraio.cn/api/v1
AgoraRTCSDK.min.js?19fb:2 16:34:33:964 Agora-SDK [INFO]: [113A2] Added event handler on error, peer-leave, stream-published, stream-added, stream-subscribed, stream-removed, onTokenPrivilegeWillExpire, onTokenPrivilegeDidExpire
AgoraRTCSDK.min.js?19fb:2 16:34:34:98 Agora-SDK [DEBUG]: [113A2] Get gateway address: (3) [“101-64-176-200.edge.agoraio.cn:5897”, “119-188-27-70.edge.agora.io:5894”, “119-167-219-188.edge.agoraio.cn:5886”]
AgoraRTCSDK.min.js?19fb:2 16:34:34:99 Agora-SDK [INFO]: [113A2] Joining channel: 1243759693479907329
AgoraRTCSDK.min.js?19fb:2 16:34:34:99 Agora-SDK [DEBUG]: [113A2] register client Channel 1243759693479907329 Uid 139901441
AgoraRTCSDK.min.js?19fb:2 16:34:34:100 Agora-SDK [DEBUG]: [113A2] start connect:101-64-176-200.edge.agoraio.cn:5897
AgoraRTCSDK.min.js?19fb:2 16:34:34:102 Agora-SDK [DEBUG]: [113A2] setParameter in distribution: {“event_uuid”:“123”}
AgoraRTCSDK.min.js?19fb:2 16:34:34:222 Agora-SDK [DEBUG]: [113A2] websockect opened: 101-64-176-200.edge.agoraio.cn:5897
AgoraRTCSDK.min.js?19fb:2 16:34:34:223 Agora-SDK [DEBUG]: [113A2] Connected to gateway server
AgoraRTCSDK.min.js?19fb:2 16:34:34:223 Agora-SDK [DEBUG]: Turn config {url: “101-64-176-200.edge.agoraio.cn”, …}
AgoraRTCSDK.min.js?19fb:2 16:34:34:290 Agora-SDK [INFO]: [113A2] Join channel 1243759693479907329 success, join with uid: 139901441.
videoTalking.vue?a70e:175 加入频道成功
videoTalking.vue?a70e:176 join channel: 1243759693479907329 success, uid: 139901441
AgoraRTCSDK.min.js?19fb:2 16:34:34:291 Agora-SDK [DEBUG]: Create stream
AgoraRTCSDK.min.js?19fb:2 16:34:34:292 Agora-SDK [DEBUG]: [139901441] Requested access to local media
AgoraRTCSDK.min.js?19fb:2 16:34:34:292 Agora-SDK [DEBUG]: GetUserMedia {“video”:{“width”:640,“height”:480,“frameRate”:{“ideal”:15,“max”:15}},“audio”:{“deviceId”:{“exact”:“default”}}}
AgoraRTCSDK.min.js?19fb:2 16:34:34:355 Agora-SDK [INFO]: [113A2] Newly added audio stream with uid 460424193
videoTalking.vue?a70e:252 进入添加元断流
AgoraRTCSDK.min.js?19fb:2 16:34:34:356 Agora-SDK [INFO]: [113A2] Gatewayclient 139901441 Subscribe 460424193: {“video”:true,“audio”:true}
AgoraRTCSDK.min.js?19fb:2 16:34:34:356 Agora-SDK [DEBUG]: [113A2]Created webkitRTCPeerConnnection with config “{“iceServers”:[{“url”:“stun:webcs.agora.io:3478”},{“username”:“test”,“credential”:“111111”,“credentialType”:“password”,“urls”:“turn:101-64-176-200.edge.agoraio.cn:5927?transport=udp”},{“username”:“test”,“credential”:“111111”,“credentialType”:“password”,“urls”:“turn:101-64-176-200.edge.agoraio.cn:5927?transport=tcp”}],“sdpSemantics”:“plan-b”}”.
AgoraRTCSDK.min.js?19fb:2 16:34:34:364 Agora-SDK [DEBUG]: [113A2]srflx candidate : null relay candidate: null host candidate : a=candidate:4033732497 1 udp 2122260223 192.168.0.104 59031 typ host generation 0 network-id 1 network-cost 10

AgoraRTCSDK.min.js?19fb:2 16:34:34:366 Agora-SDK [DEBUG]: [113A2] SDP exchange in subscribe : send offer – {messageType: “OFFER”, sdp: “v=0
↵o=- 3031977863588820403 2 IN IP4 127.0.0.1
↵s…
↵a=fmtp:119 apt=123
↵a=rtpmap:114 ulpfec/90000
↵”, offererSessionId: 104, seq: 1, tiebreaker: 192921419}
AgoraRTCSDK.min.js?19fb:2 16:34:34:402 Agora-SDK [DEBUG]: [113A2] SDP exchange in subscribe : receive answer – {answererSessionId: 106, messageType: “ANSWER”, offererSessionId: 104, sdp: “v=0
↵o=- 0 0 IN IP4 127.0.0.1
↵s=AgoraGateway
↵t=0…bel:vSScCZCy0S
↵a=ssrc:55543 label:vSScCZCy0Sv0
↵”, seq: 1}
AgoraRTCSDK.min.js?19fb:2 16:34:34:488 Agora-SDK [INFO]: [113A2] Remote stream subscribed with uid 460424193
videoTalking.vue?a70e:264 远端流订阅成功
AgoraRTCSDK.min.js?19fb:2 16:34:34:488 Agora-SDK [DEBUG]: [460424193] play(). other_video null
AgoraRTCSDK.min.js?19fb:2 16:34:34:597 Agora-SDK [DEBUG]: [113A2] subscribe p2p connected: Map(1) {8446 => {…}}
AgoraRTCSDK.min.js?19fb:2 16:34:34:598 Agora-SDK [DEBUG]: Flush cached event reporting: 3
AgoraRTCSDK.min.js?19fb:2 16:34:34:690 Agora-SDK [INFO]: [113A2] Newly added remote stream with uid 460424193.
AgoraRTCSDK.min.js?19fb:2 16:34:34:690 Agora-SDK [INFO]: [113A2] Stream changed: enable video 460424193
AgoraRTCSDK.min.js?19fb:2 16:34:34:690 Agora-SDK [DEBUG]: [460424193] Stop stream player with id 460424193
AgoraRTCSDK.min.js?19fb:2 16:34:34:691 Agora-SDK [DEBUG]: [460424193] destroy remote Player 460424193
AgoraRTCSDK.min.js?19fb:2 16:34:34:692 Agora-SDK [DEBUG]: [460424193] Media Player Status Change Triggered by destroy() {type: “player-status-change”, playerId: 3, mediaType: “video”, status: “aborted”, reason: “stop”, …}
AgoraRTCSDK.min.js?19fb:2 16:34:34:692 Agora-SDK [DEBUG]: [460424193] Media Player Status Change Triggered by destroy() {type: “player-status-change”, playerId: 3, mediaType: “audio”, status: “aborted”, reason: “stop”, …}
AgoraRTCSDK.min.js?19fb:2 16:34:34:693 Agora-SDK [DEBUG]: [460424193] play(). other_video null
AgoraRTCSDK.min.js?19fb:2 16:34:35:59 Agora-SDK [INFO]: [113A2] rcv peer unmute video: 460424193
AgoraRTCSDK.min.js?19fb:2 16:34:35:419 Agora-SDK [DEBUG]: [139901441] User has granted access to local media
AgoraRTCSDK.min.js?19fb:2 16:34:35:419 Agora-SDK [DEBUG]: start vsResHack MediaStream {id: “yWDj5O5UA0ZHhzqUwJCNuQE1pvMCOsqLsNG2”, active: true, onaddtrack: null, onremovetrack: null, onactive: null, …}
videoTalking.vue?a70e:191 初始化视频流
AgoraRTCSDK.min.js?19fb:2 16:34:35:421 Agora-SDK [DEBUG]: [139901441] play(). my_video undefined
AgoraRTCSDK.min.js?19fb:2 16:34:35:422 Agora-SDK [INFO]: [113A2] Publishing stream, uid 139901441
AgoraRTCSDK.min.js?19fb:2 16:34:35:424 Agora-SDK [DEBUG]: [113A2]Created webkitRTCPeerConnnection with config “{“iceServers”:[{“url”:“stun:webcs.agora.io:3478”},{“username”:“test”,“credential”:“111111”,“credentialType”:“password”,“urls”:“turn:101-64-176-200.edge.agoraio.cn:5927?transport=udp”},{“username”:“test”,“credential”:“111111”,“credentialType”:“password”,“urls”:“turn:101-64-176-200.edge.agoraio.cn:5927?transport=tcp”}],“sdpSemantics”:“plan-b”}”.
AgoraRTCSDK.min.js?19fb:2 16:34:35:426 Agora-SDK [DEBUG]: [113A2] PeerConnection add stream : MediaStream {id: “yWDj5O5UA0ZHhzqUwJCNuQE1pvMCOsqLsNG2”, active: true, onaddtrack: null, onremovetrack: null, onactive: null, …}
AgoraRTCSDK.min.js?19fb:2 16:34:35:714 Agora-SDK [DEBUG]: [vsResHack] get stream resolution: 640 x 480 MediaStream {id: “yWDj5O5UA0ZHhzqUwJCNuQE1pvMCOsqLsNG2”, active: true, onaddtrack: null, onremovetrack: null, onactive: null, …}
AgoraRTCSDK.min.js?19fb:2 16:34:35:715 Agora-SDK [DEBUG]: [139901441] video dimensions: 640 480
AgoraRTCSDK.min.js?19fb:2 16:34:35:820 Agora-SDK [DEBUG]: [113A2]srflx candidate : null relay candidate: null host candidate : a=candidate:4033732497 1 udp 2122260223 192.168.0.104 59035 typ host generation 0 network-id 1 network-cost 10

AgoraRTCSDK.min.js?19fb:2 16:34:35:872 Agora-SDK [DEBUG]: [113A2] SDP exchange in publish : send offer – {messageType: “OFFER”, sdp: “v=0
↵o=- 994091209784935782 2 IN IP4 127.0.0.1
↵s=…9665 label:e697220d-e086-4035-8251-386ffa30574f
↵”, offererSessionId: 104, seq: 1, tiebreaker: 224504620}
AgoraRTCSDK.min.js?19fb:2 16:34:35:905 Agora-SDK [INFO]: [113A2] Local stream published with uid 139901441
AgoraRTCSDK.min.js?19fb:2 16:34:35:905 Agora-SDK [DEBUG]: [113A2] SDP exchange in publish : receive answer – {answererSessionId: 106, messageType: “ANSWER”, offererSessionId: 104, sdp: “v=0
↵o=- 0 0 IN IP4 127.0.0.1
↵s=AgoraGateway
↵t=0…bel:wKGGtzA16v
↵a=ssrc:55543 label:wKGGtzA16vv0
↵”, seq: 1}
AgoraRTCSDK.min.js?19fb:2 16:34:35:906 Agora-SDK [DEBUG]: [113A2]Set Video Bitrate - min:100 max:500
AgoraRTCSDK.min.js?19fb:2 16:34:36:139 Agora-SDK [DEBUG]: [113A2] publish p2p connected: Map(2) {8446 => {…}, 8447 => {…}}
AgoraRTCSDK.min.js?19fb:2 16:34:36:141 Agora-SDK [DEBUG]: Flush cached event reporting: 3
AgoraRTCSDK.min.js?19fb:2 16:34:36:141 Agora-SDK [INFO]: [113A2] Publish success, uid: 139901441
videoTalking.vue?a70e:247 stream-published
AgoraRTCSDK.min.js?19fb:2 16:34:36:249 Agora-SDK [DEBUG]: [113A2]: Period fir change to: false
AgoraRTCSDK.min.js?19fb:2 16:34:36:694 Agora-SDK [DEBUG]: [460424193] Player 4 video Status Changed Detected by Timer: init=>paused
AgoraRTCSDK.min.js?19fb:2 16:34:36:694 Agora-SDK [DEBUG]: [460424193] Media Player Status Change {type: “player-status-change”, playerId: 4, mediaType: “video”, status: “paused”, reason: “timer”, …}
AgoraRTCSDK.min.js?19fb:2 16:34:36:756 Agora-SDK [DEBUG]: [460424193] Media Player Status Change {type: “player-status-change”, playerId: 4, mediaType: “audio”, status: “play”, reason: “playing”, …}
AgoraRTCSDK.min.js?19fb:2 16:34:37:718 Agora-SDK [DEBUG]: [139901441] Media Player Status Change {type: “player-status-change”, playerId: 5, mediaType: “video”, status: “play”, reason: “playing”, …}
AgoraRTCSDK.min.js?19fb:2 16:34:37:719 Agora-SDK [DEBUG]: [139901441] Media Player Status Change {type: “player-status-change”, playerId: 5, mediaType: “audio”, status: “play”, reason: “playing”, …}

1、从后台看到,web 端用的是 rtc (通信)模式,android 端用的是直播模式。频道模式的不统一可能导致未知问题,请先统一频道模式。
2、请参考 Agora Web SDK 如何与 Agora Native SDK 互通:
https://docs.agora.io/cn/faq/interop_faq

你好。我也出现了 这个问题。参考 Agora Web SDK 如何与 Agora Native SDK 互通:还是没有解决

是 Android 可以看到 Web,Web 看不到 Android 么?

麻烦提供一下 Web 端的 Console log。

Desktop.zip (53.1 KB)
android和web端的日志

频道里没有安卓主播端啊,唯一的安卓端用户是观众角色,没有音视频采集:


你的意思是Android端的问题? 没有推流?

你这样的信息在哪里看

是,这是我们的后台数据。你也可以通过水晶球工具进行基础通话调查:
https://docs.agora.io/cn/Agora%20Platform/aa_call_search?platform=All%20Platforms

对了。setupLocalVideo是主播需要调用的方法。setupRemoteVideo是观众需要调用的方法。是这样吗

%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20200415142642
这个无视频是不是表示没有视频流传到服务器? 这边我已经调用了 mRtcEngine.enableVideo();


是不是没加入频道。但是已经加入了。加入频道方法也回调了

setupLocalVideo 是渲染本地视频的方法,setupRemoteVideo 是渲染远端视频的方法,你可以根据需要去调用。比如主播不需要看到自己的本地预览,就不需要调 setupLocalVideo 来渲染本地视频的。

你检查看下 setClientRole 设置的用户角色是什么,需要设置为 CLIENT_ROLE_BROADCASTER。

onFirstLocalVideoFrame和onFirstLocalAudioFrame 方法已经回调了。是不是表示本地的音视频已经成功了。我没有传token。也没有实名认证。这个影不影响啊?

角色是对的。CLIENT_ROLE_BROADCASTER。

没有影响,token 是用于 joinChannel 时鉴权的,你已经加入频道成功了。

从后台数据来看,你设置的是观众角色诶,提供 SDK log 吧,我们来排查一下。
如何设置日志文件 - https://docs.agora.io/cn/faq/logfile

你之前看的日志里面。有一次Android是观众。有一次是主播。现在给你的日志。Android只是主播,没人观看。Desktop.zip (16.4 KB)

你现在给的日志设置对了,是主播。

请重新测试一下:
1、确保安卓端是主播角色;
2、确保打开了互通接口:https://docs.agora.io/cn/faq/interop_faq
3、确保安卓端和 Web 端加入了同一个频道。

Desktop.zip (15.2 KB)
你好。日志。按照你的要求了

web 端用的是 string uid,android 端用的是 int uid,这可能会导致无法互通等问题。
你看下这个帖子,你们的问题应该是一样的: