Comments (6)
will check it later in our sample. have you debugged why it can happen? still the issue reproduces after switching the camera or clicking any buttons?
from connectycube-flutter-samples.
will check it later in our sample. have you debugged why it can happen? still the issue reproduces after switching the camera or clicking any buttons?
No, i still debugging it, but the code on conversation call screen is too complex on this point, so i still try.
for some reasons, this method return without invoke the update method, so the all conditions on first if statement is satsified.
void updatePrimaryUser(
int userId,
bool force,
int currentUserId,
MapEntry<int, RTCVideoRenderer>? primaryRenderer,
Map<int, RTCVideoRenderer> minorRenderers,
Map<int, Map<String, bool>> participantsMediaConfigs, {
required Function(MapEntry<int, RTCVideoRenderer>? primaryRenderer,
Map<int, RTCVideoRenderer> minorRenderers)?
onRenderersUpdated,
}) {
final userEnableCamera = getUserWithEnabledVideo(
minorRenderers,
currentUserId,
participantsMediaConfigs,
);
logger.i("userEnableCamera $userEnableCamera");
logger.i(
"!minorRenderers.containsKey(userId) ${!minorRenderers.containsKey(userId)}",
);
logger.i("userId == primaryRenderer?.key ${userId == primaryRenderer?.key}");
logger.i(
"(userId == currentUserId && !force) ${(userId == currentUserId && !force)}",
);
logger.i("userEnableCamera == null ${userEnableCamera == null}");
if (!minorRenderers.containsKey(userId) ||
userId == primaryRenderer?.key ||
(userId == currentUserId && !force) ||
userEnableCamera == null) {
logger.i("updatePrimaryUser Has failed on the conditions");
return;
}
if (primaryRenderer?.key != userId) {
minorRenderers.addEntries([primaryRenderer!]);
}
primaryRenderer = MapEntry(userId, minorRenderers.remove(userId)!);
onRenderersUpdated?.call(primaryRenderer, minorRenderers);
}
from connectycube-flutter-samples.
int? getUserWithEnabledVideo(Map<int, RTCVideoRenderer> renderers,
int currentUserId, Map<int, Map<String, bool>> config) {
var resultUserId = -1;
renderers.forEach((userId, renderer) {
if ((resultUserId == -1 || resultUserId == currentUserId) &&
canShowVideo(userId, renderer.srcObject, config)) {
resultUserId = userId;
}
});
return resultUserId == -1 ? null : resultUserId;
}
This method return resultUserId with -1 in this case always, and you cannot switch the video.
from connectycube-flutter-samples.
Can you please tell me a reason or expectation for this problem and i will debug it? because i didn't know if it from the code or from the remote data source or anyting about it.
also i tried 7 times and it didn't occur then on the try no 8 its occur, after that its occur many times?!
from connectycube-flutter-samples.
from connectycube-flutter-samples.
After many tries i think the problem is with this method onRemoteStreamTrackReceived, sometimes the camera is working on other side but when see the primary render and minor render, the primary render media is not fetched so the problem occur.
from connectycube-flutter-samples.
Related Issues (20)
- User Session Times Out and doesn't reconnect HOT 1
- Issue with ConnectyCube User Session Token Creation - "Unexpected Signature" HOT 23
- When internet is slow, getting a timeout log but not getting a callback HOT 5
- Cannot create chat group with more than 30 people HOT 4
- Notifications send to all attendees [even the host] HOT 2
- Reject call from notifications not ending the call for the other opponent HOT 23
- Notifications and incoming call screen appear on the same time, when the app is open. HOT 11
- Declining the call from the push notifications while the app is killed it doesnโt send an event to the other participant HOT 28
- Call notifications is not showing HOT 1
- Cannot receive message from multiple accounts login different session same device HOT 2
- [iOS] p2p_call_sample won't build using latest Flutter HOT 4
- VOIP not working in IOS Terminated State and No call log preview in Phone App (IOS)
- Join directly on calls or Re-join or establish calls when participant session drops suddenly HOT 10
- Got troubles with building Flutter code samples.Can anybody help me create a simple sample for p2p calls HOT 3
- Null check operator on P2PClient.init HOT 5
- Intermittent issues in conference calls HOT 1
- Mute audio on conference video call [iOS only] not working HOT 6
- Hang up exception block the session from start [ [DTLS alert], error object is [Instance of 'WsHangUpException']] HOT 8
- Issues in video calls HOT 1
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 connectycube-flutter-samples.