Skip to content

Commit

Permalink
FLUT-121: Texture View implementation (#1654)
Browse files Browse the repository at this point in the history
* fetching Android SDK from local .m2

* updated implementation

* Added texture view implementation

* Added dispose texture view method

* Fixed errors

* Updated pubspec

* Added texture view in sample app

* Updated implementation

* Updated cache extent and add track logic

* Added pooling for prebuilt

* released sample app version 1.5.78 (378) 🍀

* Added active speaker

* Updated widget tree in screenshare layout

* Added event channels in texture-view

* Updated android sdk branch

* Updated versions

* Updated changelog

* Updated fastlane

* released sample app version 1.5.91 (391) 🍀

* Fixed resolution issue

* Updated gemfile

* released sample app version 1.5.92 (392) 🍀

* Updated texture view implementation

* Fixed screenshare bugs

* released sample app version 1.5.93 (393) 🍀

* released sample app version 1.5.93 (393) 🍀

* FLUT-167: Fixed preview stretching bug (#1645)

* Fixed colored line issue in grid (#1646)

* released sample app version 1.5.95 (395) 🍀

* Fixed iOS streal url fix (#1647)

* released sample app version 1.5.96 (396) 🍀

* 🤖 Automated Format and Fix

* Updated android sdk version to 2.8.2

* 🤖 Automated Format and Fix

* released sample app version 1.5.97 (397) 🍀

* 🤖 Automated Format and Fix

* Fixed iOS crash with texture view (#1649)

* released sample app version 1.5.98 (398) 🍀

* 🤖 Automated Format and Fix

* 🤖 Automated Format and Fix

* Fixed activeSpeaker layout while screenshare (#1650)

* Added feature to disable name edit on preview (#1651)

* Fixed empty message on role change decline (#1652)

* Updated changelog

* Updated android sdk branch to dev-v2

* Updated android sdk version

* Fixed sizing issues

* released sample app version 1.5.100 (400) 🍀

* Removed logs

* Corrected comments

* removed unused code

* 🤖 Automated Format and Fix

* Fixed build.gradle

---------

Co-authored-by: Yogesh Singh <[email protected]>
Co-authored-by: ygit <[email protected]>
Co-authored-by: Decoder07 <[email protected]>
  • Loading branch information
4 people authored Dec 7, 2023
1 parent 82e97ee commit 502d036
Show file tree
Hide file tree
Showing 21 changed files with 86 additions and 407 deletions.
24 changes: 8 additions & 16 deletions packages/hms_room_kit/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
bot_toast:
dependency: transitive
description:
name: bot_toast
sha256: "6b93030a99a98335b8827ecd83021e92e885ffc61d261d3825ffdecdd17f3bdf"
url: "https://pub.dev"
source: hosted
version: "4.1.3"
characters:
dependency: transitive
description:
Expand Down Expand Up @@ -85,10 +77,10 @@ packages:
dependency: transitive
description:
name: cross_file
sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e
sha256: "2f9d2cbccb76127ba28528cb3ae2c2326a122446a83de5a056aaa3880d3882c5"
url: "https://pub.dev"
source: hosted
version: "0.3.3+8"
version: "0.3.3+7"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -234,10 +226,10 @@ packages:
dependency: transitive
description:
name: http
sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139
sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
version: "1.1.0"
http_parser:
dependency: transitive
description:
Expand Down Expand Up @@ -434,10 +426,10 @@ packages:
dependency: transitive
description:
name: petitparser
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750
url: "https://pub.dev"
source: hosted
version: "6.0.2"
version: "5.4.0"
platform:
dependency: transitive
description:
Expand Down Expand Up @@ -759,10 +751,10 @@ packages:
dependency: transitive
description:
name: xml
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"
url: "https://pub.dev"
source: hosted
version: "6.5.0"
version: "6.3.0"
sdks:
dart: ">=3.1.0 <4.0.0"
flutter: ">=3.13.0"
25 changes: 12 additions & 13 deletions packages/hms_room_kit/lib/src/common/utility_functions.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//Package imports
///Dart imports
import 'dart:io';
import 'dart:math' as math;

import 'package:bot_toast/bot_toast.dart';
///Package imports
import 'package:flutter/material.dart';
import 'package:flutter_foreground_task/flutter_foreground_task.dart';
import 'package:hms_room_kit/hms_room_kit.dart';
import 'package:hmssdk_flutter/hmssdk_flutter.dart';
import 'package:hms_room_kit/src/common/animated_text.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:shared_preferences/shared_preferences.dart';

Expand Down Expand Up @@ -266,16 +265,16 @@ class Utilities {

static void showTimedMetadata(String message,
{int time = 1, Alignment align = const Alignment(0, 0.8)}) {
BotToast.showText(
align: align,
wrapToastAnimation: (controller, cancelFunc, widget) =>
AnimatedTextWidget(
text: message, duration: Duration(seconds: time)),
onlyOne: false,
textStyle: HMSTextStyle.setTextStyle(fontSize: 14),
text: message,
contentColor: Colors.black87,
duration: Duration(seconds: time));
// BotToast.showText(
// align: align,
// wrapToastAnimation: (controller, cancelFunc, widget) =>
// AnimatedTextWidget(
// text: message, duration: Duration(seconds: time)),
// onlyOne: false,
// textStyle: HMSTextStyle.setTextStyle(fontSize: 14),
// text: message,
// contentColor: Colors.black87,
// duration: Duration(seconds: time));
}

static Future<String> getStringData({required String key}) async {
Expand Down
4 changes: 3 additions & 1 deletion packages/hms_room_kit/lib/src/meeting/meeting_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,11 @@ class _MeetingPageState extends State<MeetingPage> {
context:
context,
size: size)
: const CustomOneToOneGrid(
: CustomOneToOneGrid(
isLocalInsetPresent:
false,
peerTracks:
data.item1,
),
));
});
Expand Down
19 changes: 16 additions & 3 deletions packages/hms_room_kit/lib/src/meeting/meeting_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1051,10 +1051,21 @@ class MeetingStore extends ChangeNotifier
@override
void onUpdateSpeakers({required List<HMSSpeaker> updateSpeakers}) {
//To handle the active speaker mode scenario

///This is to handle whether to bring the user to first index
///In case of normal layout if the user is on the first page i.e
///index < 6 we don't move the peer to first page. Similarly, if
///screenshare is on and index < 2 we don't update the position
///of the peer
int peersInActiveSpeakerLayout = 6;
if (screenShareCount > 0) {
peersInActiveSpeakerLayout = 2;
}

if ((currentPage == 0) &&
(meetingMode == MeetingMode.activeSpeakerWithInset ||
meetingMode == MeetingMode.activeSpeakerWithoutInset) &&
peerTracks.length > 6) {
peerTracks.length > peersInActiveSpeakerLayout) {
/* Here we iterate through the updateSpeakers list
* and do the following:
* Find the index of the peer
Expand All @@ -1064,7 +1075,7 @@ class MeetingStore extends ChangeNotifier
for (var speaker in updateSpeakers) {
int index = peerTracks.indexWhere((previousSpeaker) =>
previousSpeaker.uid == "${speaker.peer.peerId}mainVideo");
if (index > 5) {
if (index > (peersInActiveSpeakerLayout - 1)) {
PeerTrackNode activeSpeaker = peerTracks[index];
peerTracks.removeAt(index);
peerTracks.insert(screenShareCount, activeSpeaker);
Expand Down Expand Up @@ -1344,7 +1355,9 @@ class MeetingStore extends ChangeNotifier
}

void addMessage(HMSMessage message) {
messages.add(message);
if (message.type == "chat") {
messages.add(message);
}
}

void updatePeerAt(HMSPeer peer) {
Expand Down
3 changes: 3 additions & 0 deletions packages/hms_room_kit/lib/src/preview/preview_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ class _PreviewPageState extends State<PreviewPage> {
height: 48,
width: width * 0.50,
child: TextField(
enabled: widget.name
.trim()
.isEmpty,
cursorColor:
HMSThemeColors
.onSurfaceHighEmphasis,
Expand Down
2 changes: 1 addition & 1 deletion packages/hms_room_kit/lib/src/screen_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class _ScreenControllerState extends State<ScreenController> {
value: _previewStore,
child: PreviewPage(
roomCode: Constant.roomCode,
name: widget.options?.userName ?? "",
name: widget.options?.userName?.trim() ?? "",
options: widget.options,
))
: PreviewPermissions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ class _PeerTileState extends State<PeerTile> {
if (mounted) {
Provider.of<PeerTrackNode>(context, listen: false)
.setOffScreenStatus(true);
if (context.read<PeerTrackNode>().track != null) {
// log("HMSVideoViewController remove video track ${context.read<PeerTrackNode>().peer.name}");

///Avoiding remove track
// widget.videoViewController?.removeTrack();
}
}
},
onFocusGained: () {
Expand Down
Loading

0 comments on commit 502d036

Please sign in to comment.