Skip to content

Commit

Permalink
Merge pull request #1758 from 100mslive/develop
Browse files Browse the repository at this point in the history
Release 1.10.1: Develop to main
  • Loading branch information
Decoder07 committed Apr 26, 2024
2 parents 022b579 + 593279d commit a95f205
Show file tree
Hide file tree
Showing 63 changed files with 1,268 additions and 468 deletions.
4 changes: 2 additions & 2 deletions .trunk/trunk.yaml
Expand Up @@ -9,8 +9,8 @@ plugins:
lint:
enabled:
- actionlint@1.6.27
- checkov@3.2.60
- osv-scanner@1.7.0
- checkov@3.2.71
- osv-scanner@1.7.2
- trivy@0.50.1
- trufflehog@3.71.0
- oxipng@9.0.0
Expand Down
25 changes: 22 additions & 3 deletions packages/hms_room_kit/CHANGELOG.md
Expand Up @@ -5,7 +5,26 @@
| 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.1.0 - 2024-04-19
## 1.1.1 - 2024-04-26

| Package | Version |
| -------------- | ------------------------------------------------------------------------------------------------------ |
| hms_room_kit | 1.1.1 |
| hmssdk_flutter | 1.10.1 |

### 🚀 Added

- Support for captions in HLS Player

HLS Player now supports captions for better accessibility. This can be enabled or disabled from the player settings.

- Introducing Landscape Mode for HLS Player

HLS Player now supports landscape mode for better viewing experience.

Uses `hmssdk_flutter` package version 1.10.1

## 1.1.0 - 2024-04-22

| Package | Version |
| -------------- | ------------------------------------------------------------------------------------------------------ |
Expand All @@ -32,7 +51,7 @@

Prebuilt no longer uses `flutter_foreground_task` package. For apps that require foreground service, the package can be added on the application level.

Uses `hmssdk_flutter` package version to 1.1.10
Uses `hmssdk_flutter` package version 1.10.0

## 1.0.17 - 2024-04-01

Expand All @@ -41,7 +60,7 @@ Uses `hmssdk_flutter` package version to 1.1.10
| hms_room_kit | 1.0.17 |
| hmssdk_flutter | 1.9.14 |

Uses `hmssdk_flutter` package version to 1.9.14
Uses `hmssdk_flutter` package version 1.9.14

## 1.0.16 - 2024-03-15

Expand Down
1 change: 1 addition & 0 deletions packages/hms_room_kit/README.md
@@ -1,6 +1,7 @@
# 100ms Room Kit 🎉

[![Pub Version](https://img.shields.io/pub/v/hms_room_kit)](https://pub.dev/packages/hms_room_kit)
[![Build](https://github.com/100mslive/100ms-flutter/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/100mslive/100ms-flutter/actions/workflows/build.yml)
[![License](https://img.shields.io/github/license/100mslive/100ms-flutter)](https://www.100ms.live/)
[![Documentation](https://img.shields.io/badge/Read-Documentation-blue)](https://docs.100ms.live/flutter/v2/foundation/basics)
[![Discord](https://img.shields.io/discord/843749923060711464?label=Join%20on%20Discord)](https://100ms.live/discord)
Expand Down
15 changes: 8 additions & 7 deletions packages/hms_room_kit/example/pubspec.lock
Expand Up @@ -93,10 +93,10 @@ packages:
dependency: "direct main"
description:
name: cupertino_icons
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
source: hosted
version: "1.0.6"
version: "1.0.8"
dots_indicator:
dependency: transitive
description:
Expand Down Expand Up @@ -206,14 +206,15 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.0"
version: "1.1.1"
hmssdk_flutter:
dependency: transitive
description:
path: "../../hmssdk_flutter"
relative: true
source: path
version: "1.10.0"
name: hmssdk_flutter
sha256: bfa6e6ec411d6f86f6cc054936fb2163c4cd3f8703f8848099689652b3794376
url: "https://pub.dev"
source: hosted
version: "1.10.1"
http:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/hms_room_kit/example/pubspec.yaml
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.1.0
version: 1.1.1

environment:
sdk: ">=2.19.6 <3.0.0"
Expand Down
Binary file not shown.
4 changes: 4 additions & 0 deletions packages/hms_room_kit/lib/src/assets/icons/pause.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/hms_room_kit/lib/src/assets/icons/play.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions packages/hms_room_kit/lib/src/assets/icons/seek_backward.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions packages/hms_room_kit/lib/src/assets/icons/seek_forward.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions packages/hms_room_kit/lib/src/common/utility_components.dart
Expand Up @@ -992,18 +992,18 @@ class UtilityComponents {
MeetingStore meetingStore = Provider.of<MeetingStore>(context);
return GestureDetector(
onTap: () {
if (meetingStore.isLandscapeLocked) {
meetingStore.setLandscapeLock(false);
if (meetingStore.isScreenRotationAllowed) {
meetingStore.allowScreenRotation(false);
} else {
meetingStore.setLandscapeLock(true);
meetingStore.allowScreenRotation(true);
}
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture.asset(
"packages/hms_room_kit/lib/src/assets/icons/rotate.svg",
colorFilter: ColorFilter.mode(
meetingStore.isLandscapeLocked ? Colors.blue : iconColor,
meetingStore.isScreenRotationAllowed ? Colors.blue : iconColor,
BlendMode.srcIn)),
),
);
Expand Down
@@ -1,12 +1,18 @@
library;

///Package imports
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';

///Project imports
import 'package:hms_room_kit/hms_room_kit.dart';
import 'package:hms_room_kit/src/layout_api/hms_room_layout.dart';
import 'package:hms_room_kit/src/meeting/meeting_store.dart';
import 'package:hms_room_kit/src/widgets/bottom_sheets/hls_app_utilities_bottom_sheet.dart';
import 'package:hms_room_kit/src/widgets/common_widgets/hms_embedded_button.dart';
import 'package:provider/provider.dart';

///[HLSHandRaiseMenu] is a widget that is used to render the hand raise menu in case of Viewer near realtime
class HLSHandRaiseMenu extends StatelessWidget {
const HLSHandRaiseMenu({Key? key}) : super(key: key);

Expand Down
90 changes: 44 additions & 46 deletions packages/hms_room_kit/lib/src/hls_viewer/hls_player.dart
Expand Up @@ -28,56 +28,54 @@ class HLSPlayer extends StatelessWidget {
///Renders the HLS Player if the HLS has started
///Otherwise renders the waiting UI
hasHLSStarted
? Align(
alignment: Alignment.center,
child: Selector<HLSPlayerStore, Size>(
selector: (_, hlsPlayerStore) =>
hlsPlayerStore.hlsPlayerSize,
builder: (_, hlsPlayerSize, __) {
return AspectRatio(
aspectRatio:
hlsPlayerSize.width / hlsPlayerSize.height,
child: InkWell(
onTap: () => context
.read<HLSPlayerStore>()
.toggleButtonsVisibility(),
splashFactory: NoSplash.splashFactory,
splashColor: HMSThemeColors.backgroundDim,
child: IgnorePointer(
child: const HMSHLSPlayer(
showPlayerControls: false,
),
),
),
);
}),
)
? Selector<HLSPlayerStore, bool>(
selector: (_, hlsPlayerStore) =>
hlsPlayerStore.isFullScreen,
builder: (_, isFullScreen, __) {
return InteractiveViewer(
minScale: 1,
maxScale: 8,
child: Align(
alignment: Alignment.center,
child: Selector<HLSPlayerStore, Size>(
selector: (_, hlsPlayerStore) =>
hlsPlayerStore.hlsPlayerSize,
builder: (_, hlsPlayerSize, __) {
return InkWell(
onTap: () => context
.read<HLSPlayerStore>()
.toggleButtonsVisibility(),
splashFactory: NoSplash.splashFactory,
splashColor: HMSThemeColors.backgroundDim,
child: AspectRatio(
aspectRatio: hlsPlayerSize.width /
hlsPlayerSize.height,
child: Selector<HLSPlayerStore, bool>(
selector: (_, hlsPlayerStore) =>
hlsPlayerStore.isFullScreen,
builder: (_, isFullScreen, __) {
return IgnorePointer(
child: const HMSHLSPlayer(
showPlayerControls: false,
),
);
}),
),
);
}),
),
);
})
: Center(child: const HLSWaitingUI()),

///This renders the overlay controls for HLS Player
Align(
alignment: Alignment.center,
child: Selector<HLSPlayerStore, bool>(
selector: (_, hlsPlayerStore) =>
hlsPlayerStore.isFullScreen,
builder: (_, isFullScreen, __) {
return isFullScreen
? Selector<HLSPlayerStore, Size>(
selector: (_, hlsPlayerStore) =>
hlsPlayerStore.hlsPlayerSize,
builder: (_, hlsPlayerSize, __) {
return AspectRatio(
aspectRatio: hlsPlayerSize.width /
hlsPlayerSize.height,
child: HLSPlayerOverlayOptions(
hasHLSStarted: hasHLSStarted,
),
);
})
: HLSPlayerOverlayOptions(
hasHLSStarted: hasHLSStarted);
}),
),
alignment: Alignment.center,
child: HLSPlayerOverlayOptions(
hasHLSStarted: hasHLSStarted,
)),

///This renders the circular progress indicator when the player is buffering or failed
Selector<HLSPlayerStore, HMSHLSPlaybackState>(
selector: (_, hlsPlayerStore) =>
hlsPlayerStore.playerPlaybackState,
Expand Down
Expand Up @@ -9,6 +9,10 @@ import 'package:hms_room_kit/src/widgets/bottom_sheets/chat_bottom_sheet.dart';

///[HLSPlayerDesktopControls] is the desktop controls for the HLS Player
class HLSPlayerDesktopControls extends StatefulWidget {
final Orientation orientation;
const HLSPlayerDesktopControls({Key? key, required this.orientation})
: super(key: key);

@override
State<HLSPlayerDesktopControls> createState() =>
_HLSPlayerDesktopControlsState();
Expand All @@ -26,25 +30,25 @@ class _HLSPlayerDesktopControlsState extends State<HLSPlayerDesktopControls> {

@override
Widget build(BuildContext context) {
return Expanded(
child: Column(
children: [
///Renders HLS Stream Description and Chat Bottom Sheet
HLSStreamDescription(
showDescription: showDescription,
toggleDescription: toggleDescription),

///Renders Chat Bottom Sheet only is the description is not visible
if (!showDescription)
Expanded(
child: Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: ChatBottomSheet(
isHLSChat: true,
),
))
],
),
return Column(
children: [
///Renders HLS Stream Description and Chat Bottom Sheet
widget.orientation == Orientation.portrait
? HLSStreamDescription(
showDescription: showDescription,
toggleDescription: toggleDescription)
: const SizedBox(),

///Renders Chat Bottom Sheet only if the description is not visible
if (!showDescription)
Expanded(
child: Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: const ChatBottomSheet(
isHLSChat: true,
),
))
],
);
}
}
Expand Up @@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
///Project imports
import 'package:hms_room_kit/src/hls_viewer/hls_viewer_bottom_navigation_bar.dart';
import 'package:hms_room_kit/src/hls_viewer/hls_viewer_header.dart';
import 'package:hms_room_kit/src/hls_viewer/hls_viewer_mid_section.dart';

///[HLSPlayerOverlayOptions] renders the overlay options for the HLS Player
class HLSPlayerOverlayOptions extends StatelessWidget {
Expand All @@ -14,16 +15,30 @@ class HLSPlayerOverlayOptions extends StatelessWidget {
const HLSPlayerOverlayOptions({super.key, required this.hasHLSStarted});
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
///Here top and bottom navigation bar are in Column
///while mid section is above the Column
///This is done to avoid overflowing in case of
///large transcription
return Stack(
children: [
HLSViewerHeader(
hasHLSStarted: hasHLSStarted,
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
HLSViewerHeader(
hasHLSStarted: hasHLSStarted,
),

///Renders the bottom navigation bar if the HLS has started
///Otherwise does not render the bottom navigation bar
hasHLSStarted ? HLSViewerBottomNavigationBar() : const SizedBox()
],
),

///Renders the bottom navigation bar if the HLS has started
///Otherwise does not render the bottom navigation bar
hasHLSStarted ? HLSViewerBottomNavigationBar() : const SizedBox()
///This renders the pause/play button
Align(
alignment: Alignment.center,
child: hasHLSStarted ? HLSViewerMidSection() : const SizedBox(),
)
],
);
}
Expand Down

0 comments on commit a95f205

Please sign in to comment.