• 12
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I tried to make Android WebRTC app

I tested on Android Oreo and Pie, the app works well.
But on Android Lollipop and Marshmallow, throw a error when I call setRemoteDescription function.

(org.webrtc.SdpObserver::onSetFailure(String))
Failed to set remote answer sdp: rtcp-mux must be enabled when BUNDLE is enabled.

//setRemoteDescription code
String channelId = json.getString("channel_id");
int index = getPeerConnectionIndex(channelId);
JSONObject sdp = json.getJSONObject("sdp");
SessionDescription sdpOffer = new SessionDescription(SessionDescription.Type.fromCanonicalForm(sdp.getString("type")), sdp.getString("sdp"));
Log.d(TAG, sdpOffer.description);
mSDPObserver[index] = new SDPObserverWithId(index);
mSDPObserver[index].setChannelId(channelId);
mPeerConnection[index].setRemoteDescription(mSDPObserver[index], sdpOffer);


local Sdp: 
    v=0
    o=- 3986057299756726360 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE audio video
    a=msid-semantic: WMS ARDAMS
    m=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 102 0 8 105 13 110 113 126
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:vAIE
    a=ice-pwd:bVq8d3C2jNJ6+Q1Db90xCJxk
    a=ice-options:trickle renomination
    a=fingerprint:sha-256 B3:31:21:AA:DB:07:DC:F9:CF:BC:4F:86:01:46:C8:AF:BB:B3:65:F0:EC:B2:5A:1A:97:A8:52:CD:6C:4A:58:3F
    a=setup:actpass
    a=mid:audio
    a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
    a=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
    a=sendrecv
    a=rtcp-mux
    a=rtpmap:111 opus/48000/2
    a=rtcp-fb:111 transport-cc
    a=fmtp:111 minptime=10;useinbandfec=1
    a=rtpmap:103 ISAC/16000
    a=rtpmap:9 G722/8000
    a=rtpmap:102 ILBC/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:105 CN/16000
    a=rtpmap:13 CN/8000
    a=rtpmap:110 telephone-event/48000
    a=rtpmap:113 telephone-event/16000
    a=rtpmap:126 telephone-event/8000
    a=ssrc:3060595593 cname:tW/usjdUwhcVD9Gk
    a=ssrc:3060595593 msid:ARDAMS ARDAMSa0
    a=ssrc:3060595593 mslabel:ARDAMS
    a=ssrc:3060595593 label:ARDAMSa0
    m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:vAIE
    a=ice-pwd:bVq8d3C2jNJ6+Q1Db90xCJxk
    a=ice-options:trickle renomination
    a=fingerprint:sha-256 B3:31:21:AA:DB:07:DC:F9:CF:BC:4F:86:01:46:C8:AF:BB:B3:65:F0:EC:B2:5A:1A:97:A8:52:CD:6C:4A:58:3F
    a=setup:actpass
    a=mid:video
    a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
    a=extmap:13 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
    a=extmap:3 urn:3gpp:video-orientation
    a=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
    a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
    a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
    a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
    a=extmap:8 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
    a=extmap:9 http://www.webrtc.org/experiments/rtp-hdrext/color-space
    a=sendrecv
    a=rtcp-mux
    a=rtcp-rsize
    a=rtpmap:96 VP8/90000
    a=rtcp-fb:96 goog-remb
    a=rtcp-fb:96 transport-cc
    a=rtcp-fb:96 ccm fir
    a=rtcp-fb:96 nack
    a=rtcp-fb:96 nack pli
    a=rtpmap:97 rtx/90000
    a=fmtp:97 apt=96
    a=rtpmap:98 VP9/90000
    a=rtcp-fb:98 goog-remb
    a=rtcp-fb:98 transport-cc
    a=rtcp-fb:98 ccm fir
    a=rtcp-fb:98 nack
    a=rtcp-fb:98 nack pli
    a=rtpmap:99 rtx/90000
    a=fmtp:99 apt=98
    a=rtpmap:100 red/90000
    a=rtpmap:101 rtx/90000
    a=fmtp:101 apt=100
    a=rtpmap:127 ulpfec/90000
    a=ssrc-group:FID 1050899396 3284914966
    a=ssrc:1050899396 cname:tW/usjdUwhcVD9Gk
    a=ssrc:1050899396 msid:ARDAMS ARDAMSv0
    a=ssrc:1050899396 mslabel:ARDAMS
    a=ssrc:1050899396 label:ARDAMSv0
    a=ssrc:3284914966 cname:tW/usjdUwhcVD9Gk
    a=ssrc:3284914966 msid:ARDAMS ARDAMSv0
    a=ssrc:3284914966 mslabel:ARDAMS
    a=ssrc:3284914966 label:ARDAMSv0


remote Sdp to set: 
    v=0
    o=- 1555912613504775309 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE audio video
    a=msid-semantic: WMS 4qgVUFPGGjzM2ZXwOgYUE5BTL0
    m=audio 9 UDP/TLS/RTP/SAVPF 111
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=mid:audio
    a=setup:active
    a=recvonly
    a=rtcp-mux
    a=rtcp-rsize
    a=ice-ufrag:TFH9
    a=ice-pwd:Ez2jn6OX7xdufJ58Gd1mbb01
    a=ice-options:trickle
    a=fingerprint:sha-256 8C:CC:45:9F:17:75:B7:6C:0B:A3:7F:5C:C5:0A:47:D9:6F:88:41:B7:8E:2C:AA:48:01:7F:C2:6C:77:E9:7A:2B
    a=rtpmap:111 opus/48000/2
    a=fmtp:111 minptime=10;useinbandfec=1
    a=ssrc:1732894969 cname:ori8UQ7mdYvrS7eO
    a=ssrc:1732894969 msid:4qgVUFPGGjzM2ZXwOgYUE5BTL0 kny6pqktc2YPysWY5MLS8pZW7rPyaqmiDKeS
    a=ssrc:1732894969 mslabel:4qgVUFPGGjzM2ZXwOgYUE5BTL0
    a=ssrc:1732894969 label:kny6pqktc2YPysWY5MLS8pZW7rPyaqmiDKeS
    m=video 9 UDP/TLS/RTP/SAVPF 0
    a=ssrc:1542320079 cname:ori8UQ7mdYvrS7eO
    a=ssrc:1542320079 msid:4qgVUFPGGjzM2ZXwOgYUE5BTL0 p91hXGGeqs923R0gEMdVpzUGL29j5Q8kPZpB
    a=ssrc:1542320079 mslabel:4qgVUFPGGjzM2ZXwOgYUE5BTL0
    a=ssrc:1542320079 label:p91hXGGeqs923R0gEMdVpzUGL29j5Q8kPZpB

As result of error, Android 5.0~6.0 devices can't stream out video/audio and can't get streams.

I'm try to build native WebRTC library for debuging, It is very hard to me...

      • 2
    • What is your RTCPeerConnection config? Try setting these: bundlePolicy: 'max-bundle' and rtcpMuxPolicy: 'require'

It was a silly question for me, self.

The problem was a server only use h264 and those Android device dosen't support h264 with WebRTC.

So, remote sdp is lack of video options and setRemoteDescription() throw the rtcp-mux must be enabled error.

(Android WebRTC needs rtcp-mux & bundle that need audio and video both)

  • 1
Reply Report