Skip to content

Commit

Permalink
Merge pull request #808 from 100mslive/develop
Browse files Browse the repository at this point in the history
Release 0.7.5: Develop to main
  • Loading branch information
ygit authored Aug 18, 2022
2 parents f2e2ce4 + e51c268 commit 8a79197
Show file tree
Hide file tree
Showing 66 changed files with 2,120 additions and 877 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.7.5 - 2022-08-18

- Added support on iOS for sharing audio from local files on your device & from other audio playing apps
- Added ability to apply local peer track settings while initializing HMSSDK
- Added APIs to fetch local peer track settings
- Fixed an issue where exiting from Preview without joining room was not releasing camera access
- Added `destroy` API to cleanup Native HMSSDK instance correctly
- Disabled Hardware Scaler on Android to correct intermittent Video tile flickering
- Updated to Native Android SDK 2.4.8 & Native iOS SDK 0.3.3

## 0.7.4 - 2022-07-29

### Added
Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ Here you will find everything you need to build experiences with video using 100
📲 Download the Sample iOS app here: <https://testflight.apple.com/join/Uhzebmut>

🤖 Download the Sample Android app here: <https://appdistribution.firebase.dev/i/b623e5310929ab70>



100ms Flutter apps are also released on the App Stores, you can download them here:

📲 iOS app on Apple App Store: <https://apps.apple.com/app/100ms-live/id1576541989>

🤖 Android app on Google Play Store: <https://play.google.com/store/apps/details?id=live.hms.flutter>

## 🚂 Setup Guide

1. Sign up on <https://dashboard.100ms.live/register> & visit the Developer tab to access your credentials.
Expand All @@ -30,8 +37,12 @@ Here you will find everything you need to build experiences with video using 100

4. Get the HMSSDK via [pub.dev](https://pub.dev/packages/hmssdk_flutter). Add the `hmssdk_flutter` to your pubspec.yaml.

If you are running Flutter 3.0 or higher, use this branch to add the package: `flutter3.0`
<https://github.com/100mslive/100ms-flutter/tree/flutter3.0>
### Note for Flutter 3.0+

At this moment, Flutter 3.0 or higher is not supported due to ongoing issues in Flutter 3.x release for Platform Views. Refer issues: [107313](https://github.com/flutter/flutter/issues/107313) & [103630](https://github.com/flutter/flutter/issues/103630). We are actively monitoring these issues & once [Flutter](https://github.com/flutter/flutter) team releases a fix for these issues on [stable](https://github.com/flutter/flutter/tree/stable) branch, we'll release a compatible version of 100ms SDK.


Until then, please use Flutter version `2.10.5` or any other 2.x series.

## 🏃‍♀️ How to run the Sample App

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {
}

dependencies {
implementation 'com.github.100mslive.android-sdk:lib:2.4.7'
implementation 'com.github.100mslive.android-sdk:lib:2.4.8'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
implementation "org.jetbrains.kotlin:kotlin-script-runtime:1.5.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
package live.hms.hmssdk_flutter

import live.hms.hmssdk_flutter.hms_role_components.AudioParamsExtension
import live.hms.hmssdk_flutter.hms_role_components.VideoParamsExtension
import live.hms.video.media.codec.HMSAudioCodec
import live.hms.video.media.codec.HMSVideoCodec
import live.hms.video.media.settings.HMSAudioTrackSettings
import live.hms.video.media.settings.HMSTrackSettings
import live.hms.video.media.settings.HMSVideoTrackSettings
import live.hms.video.sdk.HMSSDK

class HMSTrackSettingsExtension {

companion object{
fun toDictionary(hmssdk: HMSSDK):HashMap<String,Any>?{

val map = HashMap<String,Any>();
val hmsTrackSettings:HMSTrackSettings = hmssdk.hmsSettings;

if(hmsTrackSettings.videoSettings != null){
map["video_track_setting"] = HMSVideoTrackSettingsExtension.toDictionary(hmsTrackSettings.videoSettings)!!
}

if(hmsTrackSettings.audioSettings != null){
map["audio_track_setting"] = HMSAudioTrackSettingsExtension.toDictionary(hmsTrackSettings.audioSettings)!!
}

return map
}

fun setTrackSettings(hmsAudioTrackHashMap:HashMap<String, Any?>?,hmsVideoTrackHashMap: HashMap<String,Any?>?):HMSTrackSettings{

var hmsAudioTrackSettings = HMSAudioTrackSettings.Builder()
if (hmsAudioTrackHashMap != null) {
val maxBitRate = hmsAudioTrackHashMap["bit_rate"] as Int?
val volume = hmsAudioTrackHashMap["volume"] as Double?
val useHardwareAcousticEchoCanceler =
hmsAudioTrackHashMap["user_hardware_acoustic_echo_canceler"] as Boolean?
val audioCodec =
AudioParamsExtension.getValueOfHMSAudioCodecFromString(hmsAudioTrackHashMap["audio_codec"] as String?) as HMSAudioCodec?

if (maxBitRate != null) {
hmsAudioTrackSettings = hmsAudioTrackSettings.maxBitrate(maxBitRate)
}

if (volume != null) {
hmsAudioTrackSettings = hmsAudioTrackSettings.volume(volume)
}

if (useHardwareAcousticEchoCanceler != null) {
hmsAudioTrackSettings = hmsAudioTrackSettings.setUseHardwareAcousticEchoCanceler(
useHardwareAcousticEchoCanceler
)
}

if (audioCodec != null) {
hmsAudioTrackSettings = hmsAudioTrackSettings.codec(audioCodec)
}
}


var hmsVideoTrackSettings = HMSVideoTrackSettings.Builder()
if (hmsVideoTrackHashMap != null) {
val maxBitRate = hmsVideoTrackHashMap["max_bit_rate"] as Int?
val maxFrameRate = hmsVideoTrackHashMap["max_frame_rate"] as Int?
val videoCodec =
VideoParamsExtension.getValueOfHMSAudioCodecFromString(hmsVideoTrackHashMap["video_codec"] as String?) as HMSVideoCodec?


if (maxBitRate != null) {
hmsVideoTrackSettings = hmsVideoTrackSettings.maxBitrate(maxBitRate)
}

if (maxFrameRate != null) {
hmsVideoTrackSettings = hmsVideoTrackSettings.maxFrameRate(maxFrameRate)
}
if (videoCodec != null) {
hmsVideoTrackSettings = hmsVideoTrackSettings.codec(videoCodec)
}
}

return HMSTrackSettings.Builder().audio(hmsAudioTrackSettings.build()).video(hmsVideoTrackSettings.build()).build()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class HMSVideoTrackSettingsExtension {
}


fun getValueOfHMSCameraFacing(cameraFacing: HMSVideoTrackSettings.CameraFacing?):String?{
private fun getValueOfHMSCameraFacing(cameraFacing: HMSVideoTrackSettings.CameraFacing?):String?{
if(cameraFacing==null)return null

return when(cameraFacing){
Expand All @@ -29,7 +29,7 @@ class HMSVideoTrackSettingsExtension {
}
}

fun getValueOfHMSVideoCodec(codec: HMSVideoCodec?):String?{
private fun getValueOfHMSVideoCodec(codec: HMSVideoCodec?):String?{
if(codec==null)return null

return when(codec){
Expand Down
Loading

0 comments on commit 8a79197

Please sign in to comment.