New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webrtc test run successfully as dart, but throw exception when run as java script in dartium. Problem RtcPeerConnection.createOffer #13258
Comments
Added this to the Later milestone. |
Removed Area-HTML label. |
@igor, it's not a matter of the difficulty of the bug; experimental |
I'll also add that Dart is open source -- patches are welcome! |
This comment was originally written by igor.ko...@mailvision.com Hi ! Problem that my managers wish exactly the experimental feature. I found that using dart:js allow direct call to JS API, But until now I did not think about fix dart:html, likes: _blink.Native_RTCPeerConnection_createOffer_Callback(this, successCallback, failureCallback, mediaConstraints); Can I fix such thing ? Without recompile browser ? P.S. The problem dart:js solution: Future createOffer({bool audio : true, bool video: true }){ void offerError(e){ JsObject constraints = new JsObject.jsify({ |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
This seems to work now in Dartium, Chrome, and Firefox. Added AssumedStale label. |
This issue was originally filed by igor.ko...@mailvision.com
What steps will reproduce the problem?
1.have web camera in computer.
2.unzip and run included dart project.
What version of the product are you using? On what operating system?
Dart Editor version 0.7.2_r27268
Dart SDK version 0.7.2.1_r27268
Windows 7 32 bits.
------------------- run as dart (successfull) ------------------------
Invalid CSS property name: -webkit-touch-callout
makeCall
start media
makeCall2
Creating peer connection
Adding local stream to peer
create offer...
peerConn is Instance of 'RtcPeerConnection'
local sdp generated
makeCall3: offer created, ice candidates collecting...
Found ICE candidate: a=candidate:3945698694 1 udp 2113937151 192.168.0.203 51673 typ host generation 0
Found ICE candidate: a=candidate:3945698694 2 udp 2113937151 192.168.0.203 51673 typ host generation 0
Found ICE candidate: a=candidate:3945698694 1 udp 2113937151 192.168.0.203 51673 typ host generation 0
Found ICE candidate: a=candidate:3945698694 2 udp 2113937151 192.168.0.203 51673 typ host generation 0
Found ICE candidate: a=candidate:2779605366 1 tcp 1509957375 192.168.0.203 0 typ host generation 0
Found ICE candidate: a=candidate:2779605366 2 tcp 1509957375 192.168.0.203 0 typ host generation 0
Found ICE candidate: a=candidate:2779605366 1 tcp 1509957375 192.168.0.203 0 typ host generation 0
Found ICE candidate: a=candidate:2779605366 2 tcp 1509957375 192.168.0.203 0 typ host generation 0
End of ICE candidates
makeCall4
set call state as opening
----------------- run as java script in dartium (exception) --------------------------
makeCall2
Adding local stream to peer
Error: Cannot convert object to primitive value
error in callback
peerConn is Instance of 'RtcPeerConnection'
create offer...
Creating peer connection
TypeError: Cannot convert object to primitive value
at RtcPeerConnection._createOffer_1$3 (http://127.0.0.1:3030/C:/Users/igor/dart/rtc_test/web/rtc_test.dart.js:4361:21)
at RtcPeerConnection._createOffer$3 (http://127.0.0.1:3030/C:/Users/igor/dart/rtc_test/web/rtc_test.dart.js:4357:10)
at RtcPeerConnection.createOffer$1 (http://127.0.0.1:3030/C:/Users/igor/dart/rtc_test/web/rtc_test.dart.js:4346:10)
at $.createOffer$1$x (http://127.0.0.1:3030/C:/Users/igor/dart/rtc_test/web/rtc_test.dart.js:5071:39)
at Rtc.createOffer$3 (http://127.0.0.1:3030/C:/Users/igor/dart/rtc_test/web/rtc_test.dart.js:4812:12)
at Phone.makeCall2$1 (http://127.0.0.1:3030/C:/Users/igor/dart/rtc_test/web/rtc_test.dart.js:4750:8)
at BoundClosure$1.$$.BoundClosure$1.call$1 (http://127.0.0.1:3030/C:/Users/igor/dart/rtc_test/web/rtc_test.dart.js:20:36)
at Rtc_startMedia_closure.call$1 (http://127.0.0.1:3030/C:/Users/igor/dart/rtc_test/web/rtc_test.dart.js:4828:23)
at _ThenFuture._onValue$1 (http://127.0.0.1:3030/C:/Users/igor/dart/rtc_test/web/rtc_test.dart.js:2844:26)
at _ThenFuture._zonedSendValue$1 (http://127.0.0.1:3030/C:/Users/igor/dart/rtc_test/web/rtc_test.dart.js:2850:21)
Uncaught Error: CreateOffer failed.
So seems the problem is format of media constraints (here receiveAudio and receiveVideo is bool)
var mediaConstraints = {
"mandatory" : {
"OfferToReceiveAudio" : receiveAudio,
"OfferToReceiveVideo" : receiveVideo
}
};
peerConn.createOffer(mediaConstraints); // <-- throw exception
Attachment:
rtc_test.zip (65.80 KB)
The text was updated successfully, but these errors were encountered: