Skip to content

Commit

Permalink
Added required changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Decoder07 committed Apr 29, 2024
1 parent 107ce22 commit eb9063d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
7 changes: 3 additions & 4 deletions packages/hms_room_kit/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,9 @@ packages:
hmssdk_flutter:
dependency: transitive
description:
name: hmssdk_flutter
sha256: bfa6e6ec411d6f86f6cc054936fb2163c4cd3f8703f8848099689652b3794376
url: "https://pub.dev"
source: hosted
path: "../../hmssdk_flutter"
relative: true
source: path
version: "1.10.1"
http:
dependency: transitive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@ class HLSPlayerStore extends ChangeNotifier
notifyListeners();
}

void getHLSLayers(){
HMSHLSPlayerController.getHLSLayers();
void getHLSLayers() async {
var layers = await HMSHLSPlayerController.getHLSLayers();
log("Layers are $layers");
}

@override
Expand Down Expand Up @@ -248,6 +249,7 @@ class HLSPlayerStore extends ChangeNotifier
areClosedCaptionsSupported();
setHLSPlayerStats(true);
startTimer();
getHLSLayers();
isStreamPlaying = true;
isPlayerFailed = false;
break;
Expand Down
7 changes: 3 additions & 4 deletions packages/hms_room_kit/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,9 @@ packages:
hmssdk_flutter:
dependency: "direct main"
description:
name: hmssdk_flutter
sha256: bfa6e6ec411d6f86f6cc054936fb2163c4cd3f8703f8848099689652b3794376
url: "https://pub.dev"
source: hosted
path: "../hmssdk_flutter"
relative: true
source: path
version: "1.10.1"
http:
dependency: transitive
Expand Down
3 changes: 2 additions & 1 deletion packages/hms_room_kit/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ dependencies:
flutter:
sdk: flutter

hmssdk_flutter: 1.10.1
hmssdk_flutter:
path: ../hmssdk_flutter
intl: ^0.18.0
permission_handler: ^11.0.0
provider: ^6.0.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ class HMSHLSLayerExtension {
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

map["resolution"] = HMSVideoResolutionExtension.toDictionary(it.resolution)
map["bitrate"] = it.bitrate
}
return map
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class HMSHLSLayer {

HMSHLSLayer({this.resolution, this.bitrate});

factory HMSHLSLayer.fromMap(Map<String, dynamic> map){
factory HMSHLSLayer.fromMap(Map<dynamic, dynamic> map){
return HMSHLSLayer(
resolution: map['resolution'] != null? HMSResolution.fromMap(map['resolution']):null,
bitrate: map['bitrate']
Expand Down

0 comments on commit eb9063d

Please sign in to comment.