-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into FLUT-298
- Loading branch information
Showing
22 changed files
with
958 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
openjdk64-17.0.10 | ||
openjdk64-17.0.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
138 changes: 138 additions & 0 deletions
138
.../hms_room_kit/lib/src/widgets/bottom_sheets/hls_viewer_quality_selector_bottom_sheet.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_svg/flutter_svg.dart'; | ||
import 'package:hms_room_kit/src/hls_viewer/hls_player_store.dart'; | ||
import 'package:hms_room_kit/src/layout_api/hms_theme_colors.dart'; | ||
import 'package:hms_room_kit/src/meeting/meeting_store.dart'; | ||
import 'package:hms_room_kit/src/widgets/common_widgets/hms_cross_button.dart'; | ||
import 'package:hms_room_kit/src/widgets/common_widgets/hms_subtitle_text.dart'; | ||
import 'package:hms_room_kit/src/widgets/common_widgets/hms_title_text.dart'; | ||
import 'package:hmssdk_flutter/hmssdk_flutter.dart'; | ||
import 'package:provider/provider.dart'; | ||
import 'package:tuple/tuple.dart'; | ||
|
||
class HLSViewerQualitySelectorBottomSheet extends StatefulWidget { | ||
@override | ||
State<HLSViewerQualitySelectorBottomSheet> createState() => | ||
_HLSViewerQualitySelectorBottomSheetState(); | ||
} | ||
|
||
class _HLSViewerQualitySelectorBottomSheetState | ||
extends State<HLSViewerQualitySelectorBottomSheet> { | ||
@override | ||
void initState() { | ||
super.initState(); | ||
context.read<MeetingStore>().addBottomSheet(context); | ||
} | ||
|
||
@override | ||
void deactivate() { | ||
context.read<MeetingStore>().removeBottomSheet(context); | ||
super.deactivate(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
double height = MediaQuery.of(context).size.height; | ||
return SizedBox( | ||
height: MediaQuery.of(context).orientation == Orientation.landscape | ||
? height * 0.8 | ||
: height * 0.4, | ||
child: Container( | ||
decoration: BoxDecoration( | ||
borderRadius: const BorderRadius.only( | ||
topLeft: Radius.circular(16), topRight: Radius.circular(16)), | ||
color: HMSThemeColors.backgroundDefault, | ||
), | ||
child: Selector<HLSPlayerStore, | ||
Tuple2<Map<String, HMSHLSLayer>, int>>( | ||
selector: (_, hlsPlayerStore) => Tuple2( | ||
hlsPlayerStore.layerMap, hlsPlayerStore.layerMap.length), | ||
builder: (context, data, _) { | ||
return Padding( | ||
padding: | ||
const EdgeInsets.only(top: 24.0, left: 16, right: 16), | ||
child: Column( | ||
children: [ | ||
Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: [ | ||
Row( | ||
children: [ | ||
HMSTitleText( | ||
text: "Quality", | ||
textColor: HMSThemeColors.onSurfaceHighEmphasis, | ||
letterSpacing: 0.15, | ||
), | ||
], | ||
), | ||
const Row( | ||
children: [HMSCrossButton()], | ||
), | ||
], | ||
), | ||
Padding( | ||
padding: const EdgeInsets.symmetric(vertical: 16), | ||
child: Divider( | ||
color: HMSThemeColors.borderDefault, | ||
height: 5, | ||
), | ||
), | ||
Expanded( | ||
child: ListView.builder( | ||
itemCount: data.item2, | ||
itemBuilder: (context, index) { | ||
return GestureDetector( | ||
onTap: () { | ||
context.read<HLSPlayerStore>().setHLSLayer( | ||
data.item1.entries | ||
.elementAt(index) | ||
.value); | ||
Navigator.pop(context); | ||
}, | ||
child: ListTile( | ||
horizontalTitleGap: 2, | ||
enabled: false, | ||
contentPadding: EdgeInsets.zero, | ||
title: HMSSubtitleText( | ||
text: | ||
data.item1.entries.elementAt(index).key, | ||
fontSize: 14, | ||
lineHeight: 20, | ||
letterSpacing: 0.10, | ||
fontWeight: FontWeight.w600, | ||
textColor: | ||
HMSThemeColors.onSurfaceHighEmphasis, | ||
), | ||
trailing: context | ||
.read<HLSPlayerStore>() | ||
.selectedLayer == | ||
data.item1.entries | ||
.elementAt(index) | ||
.value | ||
? SizedBox( | ||
height: 24, | ||
width: 24, | ||
child: SvgPicture.asset( | ||
"packages/hms_room_kit/lib/src/assets/icons/tick.svg", | ||
fit: BoxFit.scaleDown, | ||
colorFilter: ColorFilter.mode( | ||
HMSThemeColors | ||
.onSurfaceHighEmphasis, | ||
BlendMode.srcIn), | ||
), | ||
) | ||
: const SizedBox( | ||
height: 24, | ||
width: 24, | ||
), | ||
), | ||
); | ||
}), | ||
) | ||
], | ||
), | ||
); | ||
}), | ||
)); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...es/hmssdk_flutter/android/src/main/kotlin/live/hms/hmssdk_flutter/HMSHLSLayerExtension.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package live.hms.hmssdk_flutter | ||
|
||
import live.hms.hls_player.HmsHlsLayer | ||
|
||
class HMSHLSLayerExtension { | ||
|
||
companion object{ | ||
fun toDictionary(hmsHLSLayer :HmsHlsLayer?): HashMap<Any,Any?>?{ | ||
|
||
if(hmsHLSLayer == null){ | ||
return null; | ||
} | ||
val map = HashMap<Any,Any?>() | ||
if(hmsHLSLayer == HmsHlsLayer.AUTO){ | ||
return map | ||
} | ||
(hmsHLSLayer as HmsHlsLayer.LayerInfo?)?.let { | ||
map["resolution"] = HMSVideoResolutionExtension.toDictionary(it.resolution) | ||
map["bitrate"] = it.bitrate | ||
} | ||
return map | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.