Skip to content

Commit

Permalink
Merge pull request #1364 from 100mslive/develop
Browse files Browse the repository at this point in the history
Release 1.7.0: Develop to main
  • Loading branch information
ygit authored Jun 20, 2023
2 parents 743ea5d + 766224c commit 8c39c5e
Show file tree
Hide file tree
Showing 235 changed files with 11,845 additions and 2,069 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ example/android/fastlane/Appfile
example/android/fastlane/Fastfile
example/android/fastlane/Pluginfile
example/android/fastlane/README.md
example/android/flutter-hms-4aea6d38fd2a.json
/example/android/fastlane/report.xml

example/ios/fastlane/Appfile
example/ios/fastlane/Fastfile
example/ios/fastlane/Pluginfile
example/ios/flutter-hms-4aea6d38fd2a.json
example/ios/fastlane/README.md
/example/ios/fastlane/report.xml
example/ios/Runner/GoogleService-Info.plist
example/ios/config/GoogleService-Info.plist
*.p8
sample apps/hms-callkit-app/.flutter-plugins
sample apps/hms-callkit-app/.flutter-plugins-dependencies
12 changes: 6 additions & 6 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
version: 0.1
cli:
version: 1.9.1
version: 1.11.0
plugins:
sources:
- id: trunk
ref: v0.0.16
ref: v0.0.17
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- [email protected]
- yamllint@1.31.0
- markdownlint@0.34.0
- yamllint@1.32.0
- markdownlint@0.35.0
- [email protected]
- git-diff-check
- [email protected]
- [email protected]
- gitleaks@8.16.3
- gitleaks@8.17.0
- [email protected]
- [email protected].0
- [email protected].1
runtimes:
enabled:
- [email protected]
Expand Down
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
## 1.7.0 - 2023-06-20

### Breaking

- Removed Session Metadata methods

The `setSessionMetadata` and `getSessionMetadata` methods which were deprecated in previous versions have been removed now.

Utilize the Session Store functionality which is more convenient to implement features like Spotlight a Peer in Room, Keep a Message Pinned, etc. Read more about Session Store [here](https://www.100ms.live/docs/flutter/v2/how-to-guides/interact-with-room/room/session-store).

### Added

- Added HLS Player

Introducing the 100ms HLS Player named `HMSHLSPlayer` a comprehensive end-to-end solution for playing Live Streaming content with inbuilt support for [Timed Metadata](https://www.100ms.live/docs/flutter/v2/how-to-guides/record-and-live-stream/hls-player#how-to-get-hls-callbacks), [HLS Diagnostic Stats](https://www.100ms.live/docs/flutter/v2/how-to-guides/record-and-live-stream/hls-player#how-to-know-the-stats-related-to-hls-playback) & [Custom Player Controls](https://www.100ms.live/docs/flutter/v2/how-to-guides/record-and-live-stream/hls-player#hls-player-controls).

Learn more about `HMSHLSPlayer` [here](https://www.100ms.live/docs/flutter/v2/how-to-guides/record-and-live-stream/hls-player).

- Switch Audio Output using Native iOS UI

On iOS devices, you can now show the Native Airplay UI provided by iOS. Users can control the connected device which can be Airpods, any Bluetooth earphones, Wired Headsets, etc through which the Room's audio should be routed.

Learn more about it [here](https://www.100ms.live/docs/flutter/v2/how-to-guides/configure-your-device/speaker/audio-output-routing#switch-audio-output-device-ui-ios-only).

- Added `messageId` to `HMSMessage`

You can now uniquely identify a message using the `messageId` property of `HMSMessage` class.

Checkout more about Messaging [here](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/chat#receiving-chat-messages).

### Changed

- RTMP Streaming can now be started without the `meetingUrl`. It is now an optional parameter. Learn more about RTMP Streaming [here](https://www.100ms.live/docs/flutter/v2/how-to-guides/record-and-live-stream/recording#startstop-streaming-recording).

- [Software Audio Echo Cancellation](https://www.100ms.live/docs/flutter/v2/how-to-guides/configure-your-device/microphone/echo-cancellation) is now enabled by default. To further customize Audio & Video Track Settings, refer the docs [here](https://www.100ms.live/docs/flutter/v2/how-to-guides/interact-with-room/track/set-track-settings).

- On Android, Screen share from a remote peer will now appear correctly occupy the space provided by the enclosing widget. Read more about Screen Share [here](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/screen-share).

Updated to Android SDK 2.6.7 & iOS SDK 0.9.5

**Full Changelog**: [1.6.0...1.7.0](https://github.com/100mslive/100ms-flutter/compare/1.6.0...1.7.0)

## 1.6.0 - 2023-05-04

### New Features
Expand Down
2 changes: 2 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ android {
dependencies {
implementation "live.100ms:android-sdk:${sdkVersions['android']}"
implementation "live.100ms:video-view:${sdkVersions['android']}"
implementation "live.100ms:hls-player:${sdkVersions['android']}"
implementation 'com.google.code.gson:gson:2.9.0'
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
2 changes: 2 additions & 0 deletions android/src/main/kotlin/live/hms/hmssdk_flutter/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ class Constants {
const val SCREEN_SHARE_REQUEST = "REQUEST_SCREEN_SHARE"

const val AUDIO_SHARE_REQUEST = "REQUEST_AUDIO_SHARE"

const val HLS_PLAYER_INTENT = "HLS_PLAYER"
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
package live.hms.hmssdk_flutter

import live.hms.hmssdk_flutter.hms_role_components.AudioParamsExtension
import live.hms.video.media.tracks.HMSTrack
import live.hms.video.media.tracks.HMSAudioTrack
import live.hms.video.utils.HMSLogger
import live.hms.video.media.settings.HMSAudioTrackSettings

class HMSAudioTrackSettingsExtension {
companion object{
fun toDictionary(hmsAudioTrackSettings: HMSAudioTrackSettings?):HashMap<String,Any>? {
val map = HashMap<String,Any>()
companion object {
fun toDictionary(hmsAudioTrackSettings: HMSAudioTrackSettings?): HashMap<String, Any>? {
val map = HashMap<String, Any>()
map["user_hardware_acoustic_echo_canceler"] = hmsAudioTrackSettings?.useHardwareAcousticEchoCanceler!!
map["track_initial_state"] = HMSTrackInitStateExtension.getValueFromHMSTrackInitState(hmsAudioTrackSettings.initialState)
return map
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ import live.hms.video.sdk.models.trackchangerequest.HMSChangeTrackStateRequest

class HMSChangeTrackStateRequestExtension {

companion object{
fun toDictionary(hmsChangeTrackStateRequest: HMSChangeTrackStateRequest?):HashMap<String,Any?>?{
val hashMap = HashMap<String,Any?>()
if(hmsChangeTrackStateRequest==null)return null
hashMap.put("mute",hmsChangeTrackStateRequest.mute)
hashMap.put("requested_by",HMSPeerExtension.toDictionary(hmsChangeTrackStateRequest.requestedBy))
hashMap.put("track",HMSTrackExtension.toDictionary(hmsChangeTrackStateRequest.track))
companion object {
fun toDictionary(hmsChangeTrackStateRequest: HMSChangeTrackStateRequest?): HashMap<String, Any?>? {
val hashMap = HashMap<String, Any?>()
if (hmsChangeTrackStateRequest == null)return null
hashMap.put("mute", hmsChangeTrackStateRequest.mute)
hashMap.put("requested_by", HMSPeerExtension.toDictionary(hmsChangeTrackStateRequest.requestedBy))
hashMap.put("track", HMSTrackExtension.toDictionary(hmsChangeTrackStateRequest.track))

val args=HashMap<String,Any?>()
args.put("track_change_request",hashMap)
val args = HashMap<String, Any?>()
args.put("track_change_request", hashMap)

return args
return args
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
package live.hms.hmssdk_flutter

import live.hms.video.error.HMSException
import live.hms.video.sdk.models.HMSHLSVariant
import java.text.SimpleDateFormat

class HMSHLSVariantExtension {
companion object{
fun toDictionary(hmshlsVariant: HMSHLSVariant?):HashMap<String,Any>?{
val args=HashMap<String,Any>()
companion object {
fun toDictionary(hmshlsVariant: HMSHLSVariant?): HashMap<String, Any>? {
val args = HashMap<String, Any>()
if (hmshlsVariant == null)return null
args["hls_stream_url"] = hmshlsVariant.hlsStreamUrl?:""
args["meeting_url"] = hmshlsVariant.meetingUrl?:""
args["metadata"] = hmshlsVariant.metadata?:""
args["hls_stream_url"] = hmshlsVariant.hlsStreamUrl ?: ""
args["meeting_url"] = hmshlsVariant.meetingUrl ?: ""
args["metadata"] = hmshlsVariant.metadata ?: ""
args["started_at"] =
SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(hmshlsVariant.startedAt).toString()
return args
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import live.hms.video.utils.HMSLogger

class HMSLogSettings {

companion object{
companion object {

fun setLogSettings(maxDirSizeInBytes: Double,logStorageEnabled: Boolean,logLevel: String): HMSLogSettings {
return HMSLogSettings(maxDirSizeInBytes = maxDirSizeInBytes.toLong(), isLogStorageEnabled = logStorageEnabled, level = getLogLevel(logLevel))
fun setLogSettings(maxDirSizeInBytes: Double, logStorageEnabled: Boolean, logLevel: String): HMSLogSettings {
return HMSLogSettings(maxDirSizeInBytes = maxDirSizeInBytes.toLong(), isLogStorageEnabled = logStorageEnabled, level = getLogLevel(logLevel))
}

private fun getLogLevel(logLevel:String?): HMSLogger.LogLevel {
return when(logLevel){
private fun getLogLevel(logLevel: String?): HMSLogger.LogLevel {
return when (logLevel) {
"error" -> HMSLogger.LogLevel.ERROR
"off" -> HMSLogger.LogLevel.OFF
"verbose" -> HMSLogger.LogLevel.VERBOSE
Expand All @@ -21,4 +21,4 @@ class HMSLogSettings {
}
}
}
}
}
33 changes: 16 additions & 17 deletions android/src/main/kotlin/live/hms/hmssdk_flutter/HMSLogsExtension.kt
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
package live.hms.hmssdk_flutter

import live.hms.video.sdk.models.enums.HMSPeerUpdate
import live.hms.video.utils.HMSLogger

class HMSLogsExtension {
companion object{
companion object {
fun toDictionary(
level: HMSLogger.LogLevel,
tag: String,
message: String,
isWebRtCLog: Boolean
) : HashMap<String,Any>{
val map = HashMap<String,Any>()
map["level"]= getValueOfHMSLog(level)!!
isWebRtCLog: Boolean,
): HashMap<String, Any> {
val map = HashMap<String, Any>()
map["level"] = getValueOfHMSLog(level)!!
map["tag"] = tag
map["message"] = message
map["is_web_rtc_log"] = isWebRtCLog

return map
}

fun getValueOfHMSLog(level: HMSLogger.LogLevel?):String?{
if(level==null)return null
fun getValueOfHMSLog(level: HMSLogger.LogLevel?): String? {
if (level == null)return null

return when(level){
HMSLogger.LogLevel.DEBUG-> "debug"
HMSLogger.LogLevel.ERROR-> "error"
HMSLogger.LogLevel.INFO-> "info"
HMSLogger.LogLevel.OFF-> "off"
HMSLogger.LogLevel.VERBOSE->"verbose"
HMSLogger.LogLevel.WARN->"warn"
else-> "defaultUpdate"
return when (level) {
HMSLogger.LogLevel.DEBUG -> "debug"
HMSLogger.LogLevel.ERROR -> "error"
HMSLogger.LogLevel.INFO -> "info"
HMSLogger.LogLevel.OFF -> "off"
HMSLogger.LogLevel.VERBOSE -> "verbose"
HMSLogger.LogLevel.WARN -> "warn"
else -> "defaultUpdate"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ import live.hms.video.sdk.models.HMSMessage
import java.text.SimpleDateFormat

class HMSMessageExtension {
companion object{
fun toDictionary(message:HMSMessage?):HashMap<String,Any>?{
val args=HashMap<String,Any>()
if(message==null)return null
companion object {
fun toDictionary(message: HMSMessage?): HashMap<String, Any>? {
val args = HashMap<String, Any?>()
if (message == null)return null
args["message_id"] = message.messageId
args["message"] = message.message
args["time"] =
SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(message.serverReceiveTime).toString()
args["type"] = message.type
if(message.sender != null)
if (message.sender != null) {
args["sender"] = HMSPeerExtension.toDictionary(message.sender)!!
}
args["hms_message_recipient"] = HMSMessageRecipientExtension.toDictionary(message.recipient)!!
val messageArgs=HashMap<String,Any>()
val messageArgs = HashMap<String, Any>()
messageArgs["message"] = args
return messageArgs
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
package live.hms.hmssdk_flutter

import io.flutter.Log
import live.hms.video.sdk.models.HMSMessageRecipient
import live.hms.video.sdk.models.enums.HMSMessageRecipientType

class HMSMessageRecipientExtension {
companion object{
fun toDictionary(hmsMessageRecipient: HMSMessageRecipient?):HashMap<String,Any?>?{
val hashMap = HashMap<String,Any?>()
if(hmsMessageRecipient==null)return null
companion object {
fun toDictionary(hmsMessageRecipient: HMSMessageRecipient?): HashMap<String, Any?>? {
val hashMap = HashMap<String, Any?>()
if (hmsMessageRecipient == null)return null

hashMap["recipient_peer"] = HMSPeerExtension.toDictionary(hmsMessageRecipient.recipientPeer)

val recipientRoles = ArrayList<HashMap<String,Any?>?>()
val recipientRoles = ArrayList<HashMap<String, Any?>?>()
hmsMessageRecipient.recipientRoles.forEach {
recipientRoles.add(HMSRoleExtension.toDictionary(it))
}
hashMap["recipient_roles"] = if(recipientRoles.size!=0)recipientRoles else null
hashMap["recipient_roles"] = if (recipientRoles.size != 0)recipientRoles else null

hashMap["recipient_type"] = getValueOfHMSMessageRecipient(hmsMessageRecipient.recipientType)
hashMap["recipient_type"] = getValueOfHMSMessageRecipient(hmsMessageRecipient.recipientType)

return hashMap
}

private fun getValueOfHMSMessageRecipient(hmsMessageRecipientType: HMSMessageRecipientType?):String?{
if(hmsMessageRecipientType==null)return null
return when(hmsMessageRecipientType){
HMSMessageRecipientType.BROADCAST-> "broadCast"
HMSMessageRecipientType.PEER-> "peer"
HMSMessageRecipientType.ROLES-> "roles"
else-> "defaultRecipient"
private fun getValueOfHMSMessageRecipient(hmsMessageRecipientType: HMSMessageRecipientType?): String? {
if (hmsMessageRecipientType == null)return null
return when (hmsMessageRecipientType) {
HMSMessageRecipientType.BROADCAST -> "broadCast"
HMSMessageRecipientType.PEER -> "peer"
HMSMessageRecipientType.ROLES -> "roles"
else -> "defaultRecipient"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package live.hms.hmssdk_flutter

import live.hms.video.connection.stats.quality.HMSNetworkQuality
import live.hms.video.sdk.models.HMSPeer
import live.hms.video.sdk.models.enums.HMSPeerUpdate

class HMSNetworkQualityExtension {

Expand All @@ -14,4 +12,4 @@ class HMSNetworkQualityExtension {
return args
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ class HMSPeerExtension {
HMSPeerUpdate.ROLE_CHANGED -> "roleUpdated"
HMSPeerUpdate.METADATA_CHANGED -> "metadataChanged"
HMSPeerUpdate.NAME_CHANGED -> "nameChanged"
HMSPeerUpdate.NETWORK_QUALITY_UPDATED -> "networkQualityUpdated"
HMSPeerUpdate.BECAME_DOMINANT_SPEAKER -> "becameDominantSpeaker"
HMSPeerUpdate.NO_DOMINANT_SPEAKER -> "noDominantSpeaker"
HMSPeerUpdate.RESIGNED_DOMINANT_SPEAKER -> "resignedDominantSpeaker"
HMSPeerUpdate.STARTED_SPEAKING -> "startedSpeaking"
HMSPeerUpdate.STOPPED_SPEAKING -> "stoppedSpeaking"
HMSPeerUpdate.NETWORK_QUALITY_UPDATED -> "networkQualityUpdated"
else -> "defaultUpdate"
}
}
Expand Down
Loading

0 comments on commit 8c39c5e

Please sign in to comment.