Comments (4)
@GitAnubhav1, you can get the duration for the local user:
https://docs.agora.io/en/Video/API%20Reference/flutter/API/rtc_api_data_type.html?platform=Flutter#class_rtcstats
from videouikit-flutter.
Hi Max,
Thank you for your response. I am really struggling to use rtcstats in my code. I am using the Code as suggested in the package:
// Instantiate the client
final AgoraClient client = AgoraClient(
agoraConnectionData: AgoraConnectionData(
appId: "<--App Id Here-->",
channelName: "test",
),
agoraEventHandlers: AgoraEventHandlers(
userJoined: (uid, elapsed){},
userOffline: (uid, reason) async{},
leaveChannel: (RtcStats stats) => ()),
enabledPermission: [
Permission.camera,
Permission.microphone,
],
);
// Initialize the Agora Engine
@OverRide
void initState() {
super.initState();
initAgora();
}
void initAgora() async {
await client.initialize();
}
// Build your layout
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SafeArea(
child: Stack(
children: [
AgoraVideoViewer(client: client),
AgoraVideoButtons(client: client),
],
),
),
),
);
}
Could you please help me find out where and how, I can get the duration of the call if a user leaves the meeting?
from videouikit-flutter.
@GitAnubhav1 You can find the duration of the local user by using leave channel, something like this:
agoraEventHandlers: AgoraRtcEventHandlers(
leaveChannel: (stats) => print(stats.duration),
)
If you want to find the duration of a remote user then you can use the remoteAudioStats callback something like:
agoraEventHandlers: AgoraRtcEventHandlers(
remoteAudioStats: (stats) => print(stats.publishDuration),
)
from videouikit-flutter.
Looks like @Meherdeep's comment fixes the solution, no response in 7 days so closing. Feel free to open again if this solution did not work for you.
from videouikit-flutter.
Related Issues (20)
- How i can add videowatermark in agora ui kit because i am able to add WatermarkOptions HOT 1
- [FEATURE] how can i implement floating window functionality with agora.
- BUG: Not receiving any Audio in Calls - Video is working fine HOT 3
- [FEATURE] Custom Loading Widget
- Please upgrade the package to support lints 3.0.0 HOT 2
- [BUG] disabledVideoWidget not working when layoutType is Layout.oneToOne
- Reduce AppSize After Integration of Agora UIKit HOT 1
- Upper FPS
- [BUG] HOT 3
- Importing issue. HOT 1
- Agora UI Kit is not compiling HOT 7
- compileReleaseKotlin Error HOT 1
- [BUG] How Can I Properly end a call? HOT 1
- If user mute/unmute audio main user window disappeared[BUG]
- Screen Sharing stop in between and required advance features (overlay and some what customisation)
- Show error on floating mood [BUG] HOT 1
- Integration with ActiveFence
- Live Broadcasting
- [BUG] oneToOne Layout Camera preview doesnt turn off for local user HOT 1
- [BUG] Permissions for Mic and Camera don't remain and video doesn't show
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 videouikit-flutter.