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.
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.
Related Issues (20)
- Screenshare sources dialog crashes on Linux with pipewire
- MediaStream.dispose() bug (mediastream not found on linux OS)
- Move from to dart:html to package:web
- RTCPeerConnection.close crashes in Windows HOT 1
- RTCPeerConnection.onConnectionState is not called on web
- RTCDataChannelState.onDataChannelState is not called when data channel is closed on android
- Document API
- Video Not Streamed (Locally and Remotely) from iOS device HOT 1
- Screensharing from iOS to Android sometimes isn't working HOT 1
- MacOS: " HOT 1
- Fix URL error failure mode HOT 2
- I need help,always RTCPeerConnectionStateFailed HOT 3
- RTCPeerConnection.createDataChannel fails after updating to version 0.10.2 on web platforms HOT 1
- Ability to control details of jitter buffer (or better documentation on current behaviour)
- Many to many HOT 4
- Error: TypeError: Instance of 'LinkedMap<String, dynamic>': type 'LinkedMap<String, dynamic>' is not a subtype of type 'JSObject' HOT 8
- 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
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.