Comments (17)
I'm facing the same issue. Any solution?
from flutter-webrtc.
I'm facing the same issue. Any solution?
For me, the issue is not with GetUserMedia()
. I found out in the WebRTC console log of Safari that it requires Member RTCIceServer.urls
, and hence changing ICE Server configuration keys in the Peer Connection Configuration from "url" to "urls" solve the issue in Safari. Namely,
final configuration = <String, dynamic>{
"iceServers": [
{
"urls": "..", // the key here should be "urls" not "url"
"username": "...",
"credential": "..."
},
],
'sdpSemantics': 'unified-plan',
};
_peerConnection = await createPeerConnection(configuration);
Now, GetUserMedia()
works, and the browsers on both my iPhone and Mac work to request the camera and render the stream. However, the WebRTC connection still does not work for browsers, either Chrome or Safari, on my iPhone. The media stream track is connected, but no frames are sent from the iPhone to the other peer. I believe this is a problem with IOS, but I'm still working it out. Does anyone have a solution to this?
from flutter-webrtc.
I think you need to call _localRenderer.srcObject = _localStream;
in setState
to notify flutter to update your widget.
setState((){
_localRenderer.srcObject = _localStream;
});
from flutter-webrtc.
managed to fix this by adding the 'mandatory' object to 'video':
var stream = await navigator.mediaDevices.getUserMedia({
'video': {
'facingMode': 'user',
'mandatory': {
'minWidth': '640',
'minHeight': '480',
},
},
'audio': kReleaseMode,
});
i actually don't understand the logic behind this, at least there should be a warning to notify that it's required.
from flutter-webrtc.
I am building flutter-webrtc based app on iOS and Android. I have
final Map<String, dynamic> configuration = {
"sdpSemantics": "plan-b",
'iceServers': [
{
"urls": [
'stun:stun.l.google.com:19302',
'stun:stun1.l.google.com:19302'
],
}
]
};
- In this when I set
'sdpSemantics': 'unified-plan',
then the app crashes on user joined
- Also I have
final _localRenderer = RTCVideoRenderer();
await _localRenderer.initialize();
MediaStream _localStream =
await navigator.mediaDevices.getUserMedia(mediaConstraints);
_localRenderer.srcObject = _localStream;
Positioned(
bottom: 10,
right: 10,
child: SizedBox(
width: 150,
height: 200,
child: RTCVideoView(
_localRenderer,
mirror: true,
objectFit: RTCVideoViewObjectFit.RTCVideoViewObjectFitCover,
),
),
),
The camera is turning ON but the RTCVideoView _localRenderer shows nothing, also no video stream is shown to the other user. Any insights on this?
The audio works, but the video is not shown, on iOS
from flutter-webrtc.
I'm facing the same issue. Any solution?
For me, the issue is not with
GetUserMedia()
. I found out in the WebRTC console log of Safari that it requiresMember RTCIceServer.urls
, and hence changing ICE Server configuration keys in the Peer Connection Configuration from "url" to "urls" solve the issue in Safari. Namely,final configuration = <String, dynamic>{ "iceServers": [ { "urls": "..", // the key here should be "urls" not "url" "username": "...", "credential": "..." }, ], 'sdpSemantics': 'unified-plan', }; _peerConnection = await createPeerConnection(configuration);
Now,
GetUserMedia()
works, and the browsers on both my iPhone and Mac work to request the camera and render the stream. However, the WebRTC connection still does not work for browsers, either Chrome or Safari, on my iPhone. The media stream track is connected, but no frames are sent from the iPhone to the other peer. I believe this is a problem with IOS, but I'm still working it out. Does anyone have a solution to this?
I'm facing the same issue I already have the urls key instead of url but keep failing on Safari and Chrome for iOS and on Safari for MacOS
Any possible solution? CC @cloudwebrtc @0010SS
from flutter-webrtc.
I'm facing the same issue. Any solution?
For me, the issue is not with
GetUserMedia()
. I found out in the WebRTC console log of Safari that it requiresMember RTCIceServer.urls
, and hence changing ICE Server configuration keys in the Peer Connection Configuration from "url" to "urls" solve the issue in Safari. Namely,final configuration = <String, dynamic>{ "iceServers": [ { "urls": "..", // the key here should be "urls" not "url" "username": "...", "credential": "..." }, ], 'sdpSemantics': 'unified-plan', }; _peerConnection = await createPeerConnection(configuration);
Now,
GetUserMedia()
works, and the browsers on both my iPhone and Mac work to request the camera and render the stream. However, the WebRTC connection still does not work for browsers, either Chrome or Safari, on my iPhone. The media stream track is connected, but no frames are sent from the iPhone to the other peer. I believe this is a problem with IOS, but I'm still working it out. Does anyone have a solution to this?I'm facing the same issue I already have the urls key instead of url but keep failing on Safari and Chrome for iOS and on Safari for MacOS
Any possible solution? CC @cloudwebrtc @0010SS
Could you provide a snapshot of your code?
from flutter-webrtc.
Map<String, dynamic> configuration = {
'iceServers': [
{
'urls': [
'stun:stun1.l.google.com:19302',
'stun:stun2.l.google.com:19302',
]
}
]
};
CC @0010SS
from flutter-webrtc.
Any possible solution? @cloudwebrtc
from flutter-webrtc.
Any possible solution? @cloudwebrtc
Have you tried to check out the WebRTC console log for Safari? You can probably spot the errors there and see how they go.
from flutter-webrtc.
´´´
Timer(const Duration(seconds: 2), () {
peer_connection.onTrack = (RTCTrackEvent event) {
debugPrint('Got remote track: ${event.streams[0]}');
event.streams[0].getTracks().forEach((track) {
debugPrint('Add a track to the remoteStream $track');
remote_streams.last.addTrack(track);
});
};
});
´´´
from flutter-webrtc.
The problem is that It's failing to add the track on Safari, this issue is not presented on Google Chrome, Android nor iOS.
On the Mobile App, the code is capable of adding both tracks local and remote but Safari fails to add the remote track.
from flutter-webrtc.
The problem is that It's failing to add the track on Safari, this issue is not presented on Google Chrome, Android nor iOS.
On the Mobile App, the code is capable of adding both tracks local and remote but Safari fails to add the remote track.
Have you checked out the WebRTC console log of Safari to see whether there are any errors? That's how I solve the problem.
from flutter-webrtc.
CC @0010SS @cloudwebrtc
The problem is that It's failing to add the track on Safari, this issue is not presented on Google Chrome, Android nor iOS.
On the Mobile App, the code is capable of adding both tracks local and remote but Safari fails to add the remote track.Have you checked out the WebRTC console log of Safari to see whether there are any errors? That's how I solve the problem.
Yes I posted a Screenshot and the code in my past comment
from flutter-webrtc.
Safari doesn't tell me much about the error, the browser just tells the line of code where it is
from flutter-webrtc.
Any update here?
from flutter-webrtc.
Worked! Thanks
from flutter-webrtc.
Related Issues (20)
- Disable a connection Video or Audio HOT 2
- Windows Communication Detection Caused System Volume to be Lowered Significantly HOT 1
- Ios audio sometimes missing HOT 2
- IOS pull stream hw decode
- Regarding how to compile the WebRTC library by myself and replace it / 关于如何自己编译webrtc库并替换 HOT 4
- It always end up in RTCPeerConnectionState.RTCPeerConnectionStateFailed. HOT 19
- Need a method to set Audio Output device for web.
- How to set Audio Output Device for web?
- 报错:channel sent a message from native to Flutter on a non-platform thread HOT 1
- can`t get streams
- library "liblkjingle_peerconnection_so.so" not found HOT 1
- onRenegotiationNeeded callback no longer being called on Web HOT 1
- webrtc will drop frames on Linux, is there any way to speed it up?
- Failed to get the video stream
- HELP: How do I send the usb camera stream to webRTC ?
- Wifi and Mobile data | Not Connection HOT 2
- iOS: The pod "WebRTC-SDK" required by the plugin "flutter_webrtc" requires a higher minimum iOS deployment version
- [Android, IOS] - Android crash app, IOS throw error and not response
- The `onAddStream` callback is not fired on Web. HOT 2
- No TCP ICE candidates generated for WiFi interface on Android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-webrtc.