Comments (7)
Hmm, seems like a potential memory leak, will fix it soon in next release
from flutter_janus_client.
@aevzp can you please test and see if this issue is resolved or not? also audio bridge is supported now
from flutter_janus_client.
I fixed that.
Plugin.dart
In this method need to add await
:
Future prepareTranscievers(bool offer) async {
RTCRtpTransceiver audioTransceiver;
RTCRtpTransceiver videoTransceiver;
// here
var transceivers = **await** _webRTCHandle.pc.transceivers;
janus_client
:
Need a little fix in two places. Method attach
:
...
event.track.onEnded = () async {
if (webRTCHandle.remoteStream != null) {
webRTCHandle.remoteStream.removeTrack(event.track);
var mid = event.track.id;
// ======> from this
var transceiverRaw = await peerConnection.transceivers;
var transceiver = transceiverRaw.firstWhere((element) => element.receiver.track == event.track);
// ======> to this
mid = transceiver.mid;
plugin.onRemoteTrack(event.streams[0], event.track, mid, false);
}
};
event.track.onMute = () async {
if (webRTCHandle.remoteStream != null) {
webRTCHandle.remoteStream.removeTrack(event.track);
var mid = event.track.id;
// ======> from this
var transceiverRaw = await peerConnection.transceivers;
var transceiver = transceiverRaw.firstWhere((element) => element.receiver.track == event.track);
// ======> to this
mid = transceiver.mid;
plugin.onRemoteTrack(event.streams[0], event.track, mid, false);
}
};
...
from flutter_janus_client.
Method destroy totally work for now! =)
Thank you.
from flutter_janus_client.
About the issue on flutter webrtc you should open issue on their repository they can give you better insights about the problem under observation
Closing this issue for now in future if you encounter any other issues related to memory leak feel free to open it again
from flutter_janus_client.
Great! Thank you for update!
I have some trouble with lunch library with flutter_webrtc-0.5.7
:
../../Library/flutter/.pub-cache/git/flutter_janus_client-ca276fd4942bf2e533883699a1a32e0aaeed2f08/lib/Plugin.dart:308:46: Error: The getter 'length' isn't defined for the class 'Future<List<RTCRtpTransceiver>>'.
- 'Future' is from 'dart:async'.
- 'List' is from 'dart:core'.
- 'RTCRtpTransceiver' is from 'package:flutter_webrtc/src/interface/rtc_rtp_transceiver.dart' ('../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webrtc-0.5.7/lib/src/interface/rtc_rtp_transceiver.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'length'.
if (transceivers != null && transceivers.length > 0) {
from flutter_janus_client.
Hmm actually I haven't got time to test and improve streaming with unified plan if you think changes proposed by you will work with other plugins aswell in Unified plan then you are welcome to open a pull request
from flutter_janus_client.
Related Issues (20)
- if network refresh/reset/reconnect then how to reconnect janus videoroom publisher and subscriber again? HOT 1
- hard decoding HOT 3
- Failing to build for web HOT 4
- Problem with microphone HOT 2
- In Android call directly run on a Speaker mode. HOT 1
- Bump http version to 1.0.0 HOT 2
- android exception HOT 10
- How to check session's status in text room plugin HOT 2
- Switch audio Route HOT 2
- Re-joining a call not working for videoroom plugin HOT 15
- Can't mute or use speaker HOT 7
- Audio Output on IOS HOT 2
- RTCVideoRenderer Video rendering and steaming issue HOT 3
- Cannot capture screen whith no media devices HOT 3
- isUnifiedPlan = true is not working HOT 7
- Error When try to create an answer HOT 16
- IOS device not publishing their own video in video room HOT 11
- [Linux] Error when disposing VideoRoomPlugin HOT 2
- join google meet only as audience not publishing anything HOT 9
- Cant use RTCIceServer without credential/password 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_janus_client.