Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update mainAgoraUser logic #138

Merged
merged 5 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.3.4

- Fixes error [#137](https://github.com/AgoraIO-Community/VideoUIKit-Flutter/issues/137)

## 1.3.3

- BREAKING CHANGE: VideoSourceType for `onFirstLocalVideoFrame` callback
Expand Down
4 changes: 2 additions & 2 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import FlutterMacOS
import Foundation

import agora_rtc_engine
import iris_event
import iris_method_channel

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AgoraRtcNgPlugin.register(with: registry.registrar(forPlugin: "AgoraRtcNgPlugin"))
IrisEventPlugin.register(with: registry.registrar(forPlugin: "IrisEventPlugin"))
IrisMethodChannelPlugin.register(with: registry.registrar(forPlugin: "IrisMethodChannelPlugin"))
}
2 changes: 1 addition & 1 deletion example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void main() {
expect(
find.byWidgetPredicate(
(Widget widget) =>
widget is Text && widget.data.startsWith('Running on:'),
widget is Text && widget.data!.startsWith('Running on:'),
),
findsOneWidget,
);
Expand Down
6 changes: 3 additions & 3 deletions example/windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
#include "generated_plugin_registrant.h"

#include <agora_rtc_engine/agora_rtc_engine_plugin.h>
#include <iris_event/iris_event_plugin.h>
#include <iris_method_channel/iris_method_channel_plugin_c_api.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h>

void RegisterPlugins(flutter::PluginRegistry* registry) {
AgoraRtcEnginePluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("AgoraRtcEnginePlugin"));
IrisEventPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("IrisEventPlugin"));
IrisMethodChannelPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("IrisMethodChannelPluginCApi"));
PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
}
2 changes: 1 addition & 1 deletion example/windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

list(APPEND FLUTTER_PLUGIN_LIST
agora_rtc_engine
iris_event
iris_method_channel
permission_handler_windows
)

Expand Down
2 changes: 1 addition & 1 deletion lib/controllers/rtc_event_handlers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Future<RtcEngineEventHandler> rtcEngineEventHandler(
if (state == RemoteVideoState.remoteVideoStateStopped) {
sessionController.updateUserVideo(uid: remoteUid, videoDisabled: true);
} else if (state == RemoteVideoState.remoteVideoStateDecoding &&
(reason == RemoteVideoState.remoteVideoStateStarting ||
(state == RemoteVideoState.remoteVideoStateStarting ||
reason ==
RemoteVideoStateReason.remoteVideoStateReasonRemoteUnmuted)) {
sessionController.updateUserVideo(uid: remoteUid, videoDisabled: false);
Expand Down
4 changes: 3 additions & 1 deletion lib/src/layout/floating_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,9 @@ class _FloatingLayoutState extends State<FloatingLayout> {
),
),
widget.client.sessionController.value.mainAgoraUser.uid !=
widget.client.sessionController.value.localUid
widget.client.sessionController.value.localUid &&
widget.client.sessionController.value.mainAgoraUser.uid !=
0
? Expanded(
child: Stack(
children: [
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
flutter: ">=2.2.0"

dependencies:
agora_rtc_engine: ">= 6.1.0 <6.2.0"
agora_rtc_engine: ">= 6.1.1 <6.2.0"
agora_rtm: ^1.5.0
flutter:
sdk: flutter
Expand Down