Skip to content

Commit

Permalink
Merge pull request #1642 from 100mslive/develop
Browse files Browse the repository at this point in the history
Release 1.9.3: Develop to main
  • Loading branch information
Decoder07 authored Nov 17, 2023
2 parents 0eec62e + acd71cc commit 0e4d5d1
Show file tree
Hide file tree
Showing 34 changed files with 831 additions and 440 deletions.
16 changes: 8 additions & 8 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 0.1
cli:
version: 1.17.1
version: 1.17.2
plugins:
sources:
- id: trunk
Expand All @@ -9,19 +9,19 @@ plugins:
lint:
enabled:
- [email protected]
- [email protected].13
- [email protected].2
- trivy@0.46.1
- trufflehog@3.61.0
- [email protected].37
- [email protected].3
- trivy@0.47.0
- trufflehog@3.62.1
- [email protected]
- yamllint@1.32.0
- yamllint@1.33.0
- [email protected]
- prettier@3.0.3
- prettier@3.1.0
- git-diff-check
- [email protected]
- [email protected]
- [email protected]
- [email protected].2
- [email protected].3
- [email protected]
runtimes:
enabled:
Expand Down
9 changes: 8 additions & 1 deletion packages/hms_room_kit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
| hms_room_kit | [![Pub Version](https://img.shields.io/pub/v/hms_room_kit)](https://pub.dev/packages/hms_room_kit) |
| hmssdk_flutter | [![Pub Version](https://img.shields.io/pub/v/hmssdk_flutter)](https://pub.dev/packages/hmssdk_flutter) |

## 1.0.6 - 2023-11-17

### 🚀 Added

- Added options to Mute Session or Change Audio Output

## 1.0.5 - 2023-11-09

### 🚀 Fixed
Expand All @@ -23,10 +29,11 @@
### 🚀 Added

- Large Room Support

- Enhanced Participants list to accommodate up to 20,000 peers in a room.

- Added recording state indicator: showcasing "initializing" and "running" states.
- Added `Lower Hand` Capability in Participant list
- Added `Lower Hand` Capability in Participant list

### Fixed

Expand Down
10 changes: 5 additions & 5 deletions packages/hms_room_kit/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ PODS:
- HMSBroadcastExtensionSDK (0.0.9)
- HMSHLSPlayerSDK (0.0.2):
- HMSAnalyticsSDK (= 0.0.2)
- HMSSDK (1.2.0):
- HMSSDK (1.2.1):
- HMSAnalyticsSDK (= 0.0.2)
- HMSWebRTC (= 1.0.5116)
- hmssdk_flutter (1.9.2):
- hmssdk_flutter (1.9.3):
- Flutter
- HMSBroadcastExtensionSDK (= 0.0.9)
- HMSHLSPlayerSDK (= 0.0.2)
- HMSSDK (= 1.2.0)
- HMSSDK (= 1.2.1)
- HMSWebRTC (1.0.5116)
- path_provider_foundation (0.0.1):
- Flutter
Expand Down Expand Up @@ -70,8 +70,8 @@ SPEC CHECKSUMS:
HMSAnalyticsSDK: 4d2a88a729b1eb42f3d25f217c28937ec318a5b7
HMSBroadcastExtensionSDK: d80fe325f6c928bd8e5176290b5a4b7ae15d6fbb
HMSHLSPlayerSDK: 6a54ad4d12f3dc2270d1ecd24019d71282a4f6a3
HMSSDK: 010fdd904b8d221bb297864800503132fd721d9e
hmssdk_flutter: 1d4cfbb745095ebf399eaf533b6cde0c2006d6e1
HMSSDK: 6e176238d9972b78b7831398bbfefc3fddadad55
hmssdk_flutter: ceffbce79af4203f64def3fefe79f8f87c75a49c
HMSWebRTC: ae54e9dd91b869051b283b43b14f57d43b7bf8e1
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
Expand Down
14 changes: 7 additions & 7 deletions packages/hms_room_kit/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,15 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.5"
version: "1.0.6"
hmssdk_flutter:
dependency: transitive
description:
name: hmssdk_flutter
sha256: c560e8bbb938676fdfb3c5bbfc28d4fdd10454e0d56762042027624922d8fbf8
sha256: "70d00820ab5cb02c03c2d4f41be70dd9dc3406521a469b8989d1e650232efd9a"
url: "https://pub.dev"
source: hosted
version: "1.9.2"
version: "1.9.3"
http:
dependency: transitive
description:
Expand Down Expand Up @@ -467,10 +467,10 @@ packages:
dependency: transitive
description:
name: provider
sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f
sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096"
url: "https://pub.dev"
source: hosted
version: "6.0.5"
version: "6.1.1"
share_plus:
dependency: transitive
description:
Expand Down Expand Up @@ -744,10 +744,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3"
sha256: "7c99c0e1e2fa190b48d25c81ca5e42036d5cac81430ef249027d97b0935c553f"
url: "https://pub.dev"
source: hosted
version: "5.0.9"
version: "5.1.0"
xdg_directories:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/hms_room_kit/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.5
version: 1.0.6

environment:
sdk: ">=2.19.6 <3.0.0"
Expand Down
38 changes: 15 additions & 23 deletions packages/hms_room_kit/lib/src/meeting/meeting_header.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
///Dart imports
import 'dart:developer';
import 'dart:io';

///Package imports
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -252,35 +251,28 @@ class _MeetingHeaderState extends State<MeetingHeader> {
///This renders the audio device selection button
///If the role is allowed to publish audio, we render the audio device selection button
///else we render an empty SizedBox
Selector<MeetingStore, HMSAudioDevice?>(
selector: (_, meetingStore) =>
Selector<MeetingStore, Tuple2<HMSAudioDevice?, bool>>(
selector: (_, meetingStore) => Tuple2(
meetingStore.currentAudioDeviceMode,
builder: (_, audioDevice, __) {
meetingStore.isSpeakerOn),
builder: (_, data, __) {
return HMSEmbeddedButton(
onTap: () {
///If the platform is iOS, we use the iOS UI to switch audio output
///on Android we use the [AudioSettingsBottomSheet] to switch audio output
if (Platform.isIOS) {
context
.read<MeetingStore>()
.switchAudioOutputUsingiOSUI();
} else {
showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
context: context,
builder: (ctx) =>
ChangeNotifierProvider.value(
value: context
.read<MeetingStore>(),
child:
const AudioSettingsBottomSheet()));
}
showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
context: context,
builder: (ctx) =>
ChangeNotifierProvider.value(
value: context
.read<MeetingStore>(),
child:
const AudioSettingsBottomSheet()));
},
onColor: HMSThemeColors.backgroundDim,
isActive: true,
child: SvgPicture.asset(
'packages/hms_room_kit/lib/src/assets/icons/${Utilities.getAudioDeviceIconName(audioDevice)}.svg',
'packages/hms_room_kit/lib/src/assets/icons/${!data.item2 ? "speaker_state_off" : Utilities.getAudioDeviceIconName(data.item1)}.svg',
colorFilter: ColorFilter.mode(
HMSThemeColors.onSurfaceHighEmphasis,
BlendMode.srcIn),
Expand Down
9 changes: 8 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 @@ -40,8 +40,13 @@ import 'package:hms_room_kit/src/widgets/toasts/hms_recording_error_toast.dart';
class MeetingPage extends StatefulWidget {
final String meetingLink;
final bool isRoomMute;
final HMSAudioDevice currentAudioDeviceMode;

const MeetingPage(
{Key? key, required this.meetingLink, this.isRoomMute = true})
{Key? key,
required this.meetingLink,
this.isRoomMute = true,
required this.currentAudioDeviceMode})
: super(key: key);

@override
Expand All @@ -65,6 +70,8 @@ class _MeetingPageState extends State<MeetingPage> {
context.read<MeetingStore>().toggleSpeaker();
});
}
context.read<MeetingStore>().currentAudioDeviceMode =
widget.currentAudioDeviceMode;
}

void _enableForegroundService() {
Expand Down
15 changes: 6 additions & 9 deletions packages/hms_room_kit/lib/src/meeting/meeting_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,9 @@ class MeetingStore extends ChangeNotifier
}

void switchAudioOutput({required HMSAudioDevice audioDevice}) {
if (!isSpeakerOn) {
toggleSpeaker();
}
selfChangeAudioDevice = true;
currentAudioDeviceMode = audioDevice;
_hmsSDKInteractor.switchAudioOutput(audioDevice: audioDevice);
Expand Down Expand Up @@ -928,15 +931,6 @@ class MeetingStore extends ChangeNotifier
required HMSPeer peer}) {
log("onTrackUpdate-> track: ${track.toString()} peer: ${peer.name} update: ${trackUpdate.name}");

if (!isSpeakerOn &&
track.kind == HMSTrackKind.kHMSTrackKindAudio &&
trackUpdate == HMSTrackUpdate.trackAdded) {
if (track.runtimeType == HMSRemoteAudioTrack) {
HMSRemoteAudioTrack currentTrack = track as HMSRemoteAudioTrack;
currentTrack.setPlaybackAllowed(false);
}
}

if (peer.isLocal) {
localPeer = peer;
if (track.kind == HMSTrackKind.kHMSTrackKindAudio &&
Expand Down Expand Up @@ -1903,6 +1897,9 @@ class MeetingStore extends ChangeNotifier
// }

void switchAudioOutputUsingiOSUI() {
if (!isSpeakerOn) {
toggleSpeaker();
}
_hmsSDKInteractor.switchAudioOutputUsingiOSUI();
}

Expand Down
7 changes: 6 additions & 1 deletion packages/hms_room_kit/lib/src/meeting_screen_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class MeetingScreenController extends StatefulWidget {
///For more details checkout the [HMSConfig] class
final HMSConfig? config;

///[currentAudioDeviceMode] is the current audio device mode
final HMSAudioDevice currentAudioDeviceMode;

const MeetingScreenController(
{Key? key,
required this.roomCode,
Expand All @@ -52,7 +55,8 @@ class MeetingScreenController extends StatefulWidget {
this.showStats = false,
this.mirrorCamera = true,
this.role,
this.config})
this.config,
this.currentAudioDeviceMode = HMSAudioDevice.AUTOMATIC})
: super(key: key);

@override
Expand Down Expand Up @@ -95,6 +99,7 @@ class _MeetingScreenControllerState extends State<MeetingScreenController> {
return MeetingPage(
meetingLink: widget.roomCode,
isRoomMute: widget.isRoomMute,
currentAudioDeviceMode: widget.currentAudioDeviceMode,
);
},
selector: (_, meetingStore) => meetingStore.localPeer?.role.name);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
///Dart imports
import 'dart:io';

///Package imports
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
Expand Down Expand Up @@ -111,25 +108,17 @@ class PreviewBottomButtonSection extends StatelessWidget {
.contains("audio"))
HMSEmbeddedButton(
onTap: () {
///For iOS, This will open the native audio device selection UI
///
///For Android, it will open a bottom sheet
///with the list of available audio devices
if (Platform.isIOS) {
previewStore.switchAudioOutputUsingiOSUI();
} else {
showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
context: context,
builder: (ctx) => ChangeNotifierProvider.value(
value: previewStore,
child: const PreviewDeviceSettings()));
}
showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
context: context,
builder: (ctx) => ChangeNotifierProvider.value(
value: previewStore,
child: const PreviewDeviceSettings()));
},
isActive: true,
child: SvgPicture.asset(
'packages/hms_room_kit/lib/src/assets/icons/${Utilities.getAudioDeviceIconName(previewStore.currentAudioOutputDevice)}.svg',
'packages/hms_room_kit/lib/src/assets/icons/${previewStore.isRoomMute ? "speaker_state_off" : Utilities.getAudioDeviceIconName(previewStore.currentAudioOutputDevice)}.svg',
colorFilter: ColorFilter.mode(
HMSThemeColors.onSurfaceHighEmphasis,
BlendMode.srcIn),
Expand Down
Loading

0 comments on commit 0e4d5d1

Please sign in to comment.