GithubHelp home page GithubHelp logo

100mslive / 100ms-android Goto Github PK

View Code? Open in Web Editor NEW
88.0 10.0 38.0 68.07 MB

Android Video Conferencing App using 100ms SDK

Home Page: https://100ms.live

License: MIT License

Kotlin 95.05% Java 4.95%
android kotlin webrtc 100mslive hacktoberfest

100ms-android's Introduction

Latest Version Documentation Discord Download App Activity Email

๐ŸŽ‰ Sample App using 100ms Android SDK ๐Ÿš€

Here you will find everything you need to build experiences with video using 100ms Android SDK. Dive into our SDKs, quick starts, add real-time video, voice, and screen sharing to your web and mobile applications.

Sample App of 100ms can be downloaded from Play store : https://play.google.com/store/apps/details?id=live.hms.app2

Meeting links can be generated using dashboard

๐Ÿ“ฆ Prebuilt (Room Kit)

Room Kit is library built to take even building the UI off your hands. It uses 100ms SDK to and a dynamic layout decided by Prebuilt in the dashboard to have fully functional video up and running in your app in minutes.
To add the library to your own app, take a look at the Prebuilt Quickstart in the docs.

๐Ÿ› ๏ธ Developing against Prebuilt Room Kit

We don't intend this to be a very common as Room Kit is updated very frequently with new features but the benefit of open source is that if you don't like how something works you can change it yourself! If you wanted to change anything in the Prebuilt library here's how.

  1. Clone this repo.
  2. Find the line in app/build.gradle that says implementation "live.100ms:room-kit:$HMS_ROOM_KIT_VERSION" and change it to implementation project(":room-kit")
  3. Run the app.

Now you'll be loading the room kit library locally with your own changes rather than from the maven library that 100ms publishes to.

To use this in your own code, you can put the library in your local computer and import it in your app.
To put the room kit library in your computer as a library locally:

  1. Open a terminal and cd into the root of this project. Opening the terminal from Android Studio works as well.
  2. Run the following command to build and put the library in your local storage. ./gradlew clean publishToMavenLocal
  3. Verify the library was built correctly by seeing if it is in ls ~/.m2/repository/live/100ms/room-kit
  4. In your app find where the mavenCentral() repository is referenced and add mavenLocal() before it. Eg:
   allprojects {
         repositories {
         mavenLocal()
         mavenCentral()
     }
  }
  1. Add the import for room kit as you would do for any library implementation "live.100ms:room-kit:$HMS_ROOM_KIT_VERSION"

That's it. Once you sync, the library should be available to your app.
This is the recommended method since adding the module to your own app directly would make it difficult to sync with our changes.

โ˜๏ธ Pre-requisites

  • Android Studio
  • Support for Java 11

๐Ÿ“ฑ Supported Devices

The Android SDK supports Android API level 21 and higher. It is built for armeabi-v7a, arm64-v8a, x86, and x86_64 architectures.

๐Ÿ“‘ 100ms SDK Documentation

Refer the Getting Started - Android guide to get detailed SDK information

100ms-android's People

Contributors

a-kverma avatar adityaa30 avatar akashgoswami1 avatar aniketbehera avatar aniketsk avatar bhavesh100ms avatar chinmayrelkar avatar decoder07 avatar deep-codes avatar gulzar1996 avatar jashan1498 avatar pratikshadake avatar pratimmallick avatar stuie avatar ygit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

100ms-android's Issues

Any usage of HmsHlsPlayer

I want to show live stream with HmsHlsPlayer, but I have some error like below. Do you have any example of how to show live streams?

Caused by: androidx.media3.common.ParserException: Input does not start with the #EXTM3U header.
at androidx.media3.exoplayer.hls.playlist.HlsPlaylistParser.parse(HlsPlaylistParser.java:262)
at androidx.media3.exoplayer.hls.playlist.HlsPlaylistParser.parse(HlsPlaylistParser.java:69)
at androidx.media3.exoplayer.upstream.ParsingLoadable.load(ParsingLoadable.java:182)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:414)

Crash initialising the SDK on Android 12 devices for apps targeting Android 12

Fatal Exception: java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@86eda928: getName
       at android.os.Parcel.createExceptionOrNull(Parcel.java:2425)
       at android.os.Parcel.createException(Parcel.java:2409)
       at android.os.Parcel.readException(Parcel.java:2392)
       at android.os.Parcel.readException(Parcel.java:2334)
       at android.bluetooth.IBluetoothManager$Stub$Proxy.getName(IBluetoothManager.java:802)
       at android.bluetooth.BluetoothAdapter.getName(BluetoothAdapter.java:1297)
       at live.hms.video.audio.HMSBluetoothManager.logBluetoothAdapterInfo(HMSBluetoothManager.java:431)
       at live.hms.video.audio.HMSBluetoothManager.start(HMSBluetoothManager.java:257)
       at live.hms.video.audio.HMSAudioManager.start(HMSAudioManager.java:299)
       at live.hms.video.sdk.SDKDelegate$join$2$1$1.invokeSuspend(SDKDelegate.kt:540) ...

Screenshot 2021-11-25 at 8 22 24 AM

SDK version: Not using the Android SDK directly but using the HMS react native SDK v0.8.0

Video and Audio tracks are not published when permissions are granted

Steps to reproduce the problem:

  1. User joins a video room without camera and microphone permission
  2. User then grants camera and microphone permission
  3. Video and audio tracks are not published

Zoom allow users to join meeting without camera and microphone permissions as they can still watch other participants screen and listen to audio.

Issue: It looks like video and audio tracks are not automatically published when camera and microphone permissions are granted

Expected result: Video track and audio track should be published as soon as camera and microphone permissions are granted and remote participants should get the callback in onTrackAdded

Crash in HMSNotifications.java

Crash: Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'java.util.Collection java.util.HashMap.values()' on a null object reference

Devices:

  1. Redmi Note 10 (Android 11)
  2. Samsung Galaxy J7 Prime (Android 8.1.0)

Random crash during video session

Stack trace:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Collection java.util.HashMap.values()' on a null object reference
at live.hms.video.sdk.models.HMSNotifications$Peer.getTracks(HMSNotifications.java:21)
at live.hms.video.sdk.managers.InitialPeerListManager.manage(InitialPeerListManager.java:28)
at live.hms.video.sdk.SDKDelegate$transportObserver$1.onNotification(SDKDelegate.java:129)
at live.hms.video.transport.HMSTransport$signalObserver$1.onNotification(HMSTransport.java:290)
at live.hms.video.signal.jsonrpc.JSONRpcSignal$onMessage$2.invokeSuspend(JSONRpcSignal.java:361)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:106)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

App Crashing on Android. 6 while Joining

Crash Type: FATAL
100Ms SDK: lib:2.3.4
Brand: OPPO
Model: CPH1609
Orientation: Portrait
RAM free: 1.24 GB
Disk free: 3.57 GB
Version: Android 6.0
Orientation: Portrait

This happened while joining the room.

Log:
live.hms.app2.ui.meeting.MeetingViewModel$startMeeting$2.onPeerUpdate (MeetingViewModel.kt:403)
live.hms.video.sdk.SDKDelegate.fireUpdates (SDKDelegate.kt:348)
live.hms.video.sdk.SDKDelegate.access$fireUpdates (SDKDelegate.kt:49)
live.hms.video.sdk.SDKDelegate$transportObserver$1.onNotification (SDKDelegate.kt:154)
live.hms.video.transport.HMSTransport$signalObserver$1.onNotification (HMSTransport.kt:290)
live.hms.video.signal.jsonrpc.JSONRpcSignal$onMessage$2.invokeSuspend (JSONRpcSignal.kt:365)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:106)

Illegal Argument Exception (unreproducible)

FATAL EXCEPTION: local-camera-capturer-thread
Process: com.kutumb.android, PID: 11120
java.lang.IllegalArgumentException: supportsCameraApi:2095: Unknown camera ID 1
at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:888)
at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:359)
at org.webrtc.Camera2Session.start(Camera2Session.java:304)
at org.webrtc.Camera2Session.(Camera2Session.java:296)
at org.webrtc.Camera2Session.create(Camera2Session.java:274)
at org.webrtc.Camera2Capturer.createCameraSession(Camera2Capturer.java:35)
at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:272)
at android.os.Handler.handleCallback(Handler.java:914)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:225)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: android.os.ServiceSpecificException: supportsCameraApi:2095: Unknown camera ID 1 (code 3)
at android.os.Parcel.createException(Parcel.java:2088)
at android.os.Parcel.readException(Parcel.java:2042)
at android.os.Parcel.readException(Parcel.java:1990)
at android.hardware.ICameraService$Stub$Proxy.supportsCameraApi(ICameraService.java:800)
at android.hardware.camera2.CameraManager.supportsCameraApiLocked(CameraManager.java:941)
at android.hardware.camera2.CameraManager.supportsCamera2ApiLocked(CameraManager.java:917)
at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:307)
at org.webrtc.Camera2Session.start(Camera2Session.java:304)ย 
at org.webrtc.Camera2Session.(Camera2Session.java:296)ย 
at org.webrtc.Camera2Session.create(Camera2Session.java:274)ย 
at org.webrtc.Camera2Capturer.createCameraSession(Camera2Capturer.java:35)ย 
at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:272)ย 
at android.os.Handler.handleCallback(Handler.java:914)ย 
at android.os.Handler.dispatchMessage(Handler.java:100)ย 
at android.os.Looper.loop(Looper.java:225)ย 
at android.os.HandlerThread.run(HandlerThread.java:67)ย 

Null pointer exception in HMS Track

100ms version: 2.6.2

All android devices crashed at same time during a video call.

Device 1:
Android 9
OnePlus5

Device 2:
Android 13
Samsung Galaxy M33

Stack trace:
Fatal Exception: java.lang.NullPointerException: null cannot be cast to non-null type live.hms.video.media.tracks.HMSTrack
at live.hms.video.media.tracks.HMSTrack.equals(HMSTrack.java:65)
at kotlin.jvm.internal.Intrinsics.areEqual(Intrinsics.java:167)
at com.intouchapp.activities.video.repo.MeetingParticipant.equals(MeetingParticipant.java:49)
at java.util.AbstractList.equals(AbstractList.java:548)
at kotlin.jvm.internal.Intrinsics.areEqual(Intrinsics.java:167)
at kotlinx.coroutines.flow.StateFlowImpl.updateState(StateFlowImpl.java:329)
at kotlinx.coroutines.flow.StateFlowImpl.setValue(StateFlowImpl.java:318)
at com.intouchapp.activities.video.ui.VideoCallViewModel.refreshParticipants(VideoCallViewModel.java:529)
at com.intouchapp.activities.video.ui.VideoCallViewModel$hmsUpdateListener$1.onTrackUpdate(VideoCallViewModel.java:290)
at live.hms.video.sdk.SDKDelegate.fireUpdates(SDKDelegate.java:392)
at live.hms.video.sdk.SDKDelegate.access$fireUpdates(SDKDelegate.java:54)
at live.hms.video.sdk.SDKDelegate$transportObserver$1.onTrackRemove(SDKDelegate.java:206)
at live.hms.video.transport.HMSTransport$subscribeConnectionObserver$1.onTrackRemove(HMSTransport.java:363)
at live.hms.video.connection.subscribe.HMSSubscribeConnection$nativeObserver$1$onRemoveTrack$1.invokeSuspend(HMSSubscribeConnection.java:119)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:106)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)

Camera conflict

I'm connect two users in a room in my app
and camera conflict.
How to disable HMSVideoCapturer and only one user is allowed to use the camera?

Events are using different MutableSharedFlows.

In the MeetingViewModel, there are two events. One for rtmpErrors and another for changeTrackMuteRequest.
They should be moved into a single Flow with a shared sealed data class structure.

For an explanation of what this is, look here.

Frequently getting this error

E/HMSTransport: join: failed โŒ [token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3Nfa2V5IjoiNjEyZjU1MWU2M2ExOWM4ZjI2ZGYzNWY2Iiwicm9vbV9pZCI6IjYxMzA3ZjNkZDkxNzAzZTAzNzViN2VlZiIsInVzZXJfaWQiOiI4MmFiMGI0MmM2YjkiLCJyb2xlIjoibGlzdGVuZXIiLCJ0eXBlIjoiYXBwIiwidmVyc2lvbiI6MiwiaWF0IjoxNjMxMjY2OTc1LCJuYmYiOjE2MzEyNjY5NzUsImV4cCI6MTYzMTM1MzM3NSwianRpIjoiYWE2ZDU0ZjktYTEyOS00YjI1LTlkMWItZTUzM2EzYWFjZWI4In0.x9xtSfTwt0Qk0_NUa2Vg-Gq7c4AARbuw0uA3Ed_w70A]
ServerErrors: [JOIN]: peer is gone [code=41001, action=JOIN, description=peer is gone, cause=null]
at live.hms.video.error.ErrorFactory$WebsocketMethodErrors.ServerErrors(ErrorFactory.kt:356)
at live.hms.video.error.ErrorFactory$WebsocketMethodErrors.ServerErrors$default(ErrorFactory.kt:350)
at live.hms.video.signal.jsonrpc.JSONRpcSignal.onMessage(JSONRpcSignal.kt:279)
at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.kt:333)
at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.kt:245)
at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:106)
at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293)
at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)

IllegalArgumentException

java.lang.IllegalArgumentException: Receiver not registered: live.hms.video.audio.HMSAudioManager$WiredHeadsetReceiver@fc0be69
android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1701)
android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1858)
android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:812)
live.hms.video.audio.HMSAudioManager.unregisterReceiver(HMSAudioManager.java:505)
live.hms.video.audio.HMSAudioManager.stop(HMSAudioManager.java:378)
live.hms.video.sdk.SDKDelegate$tearDownSDKDelegate$2$1.invokeSuspend(SDKDelegate.kt:1131)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
android.os.Handler.handleCallback(Handler.java:942)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loopOnce(Looper.java:223)
android.os.Looper.loop(Looper.java:324)
android.app.ActivityThread.main(ActivityThread.java:8464)
java.lang.reflect.Method.invoke(Method.java:0)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1059)

User is Not Authorized to Join the room

I'm able to create an Authorization token, create a room and connect with hmsclient. After that, when I'm trying to join the room then getting the following error

rawData: {"response":true,"id":6104463,"ok":false,"errorCode":-1,"errorReason":"User is Not Authorized to Join the room {room_id}"}

Integrated version : 'com.github.100mslive:android-sdk:0.9.13'

Crash in HMSVideoCapturer.java

Crash: Fatal Exception: java.lang.NullPointerException
create( LOCAL_CAMERA_CAPTURER_THREAD, SharedEglContext.context ) must not be null

Happens during the initialization of SurfaceViewRenderer

Device:

  1. Redmi 4 Pro (Android 7.1.2)
  2. Mi 5 (Android 8.0.0)
  3. Redmi 8A dual (Android 9)
  4. Oneplus A5000 (Android 9)

Stack trace: Fatal Exception: java.lang.NullPointerException: create(
LOCAL_CAMERA_CAPTURER_THREAD,
SharedEglContext.context
) must not be null
at live.hms.video.media.tracks.HMSVideoCapturer.(HMSVideoCapturer.java:42)
at live.hms.video.media.streams.HMSStreamFactory.makeLocalVideoCapturer(HMSStreamFactory.java:72)
at live.hms.video.transport.HMSTransport.getLocalTrackByType(HMSTransport.java:805)
at live.hms.video.sdk.SDKDelegate.initLocalTracks(SDKDelegate.java:553)
at live.hms.video.sdk.SDKDelegate.getLocalTracksByRoleAndApplySettings(SDKDelegate.java:493)
at live.hms.video.sdk.SDKDelegate.access$getLocalTracksByRoleAndApplySettings(SDKDelegate.java:49)
at live.hms.video.sdk.SDKDelegate$onPolicyChangeHandled$1.invokeSuspend(SDKDelegate.java:376)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:106)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)

SDK fetches websocket base url as fetchInitConfig: config=InitConfig(endpoint=wss://account-disabled-us/v2/ws, and then cannot connect to the websocket

fetchInitConfig: response=Response{protocol=h2, code=200, message=, url=https://prod-init.100ms.live/init?user_agent_v2=os%3Aandroid%2Cos_version%3A33%2Csdk%3Aandroid%2Csdk_version%3A2.9.55%2Cdevice_model%3Asdk_gphone64_arm64%2Cenv%3Aprod%2Cis_prebuilt%3Afalse}
2024-05-26 16:38:26.046 26237-26681 InitService com.livestage.app D fetchInitConfig: config=InitConfig(endpoint=wss://account-disabled-us/v2/ws, logLevel=null, policy=null, rtcConfig=RtcConfiguration(iceServers=[IceServer(urls=[turn:turn-in.100ms.live, turn:turn-in.100ms.live?transport=tcp, turn:turn-in.100ms.live:443, turn:turn-in.100ms.live:443?transport=tcp], username=1716838705:, credential=pxm6mJ9ubV45UybItPq0DFKzhDU=)]), serverConfiguration=ServerConfiguration(enabledFlags=[subscribeDegradation, nonWebRTCDisableOffer, simulcast, publishStats, effectsSDKEnabled, vb], networkHealth=NetworkHealth(timeout=10000, url=https://storage.googleapis.com/100ms-speed-test-download/test1Mb.db, scoreMap={1=RangeLimits(low=1, high=100), 2=RangeLimits(low=100, high=300), 3=RangeLimits(low=300, high=500), 4=RangeLimits(low=500, high=700), 5=RangeLimits(low=700, high=0)}), publishStats=Stats(maxSampleWindowSize=30.0, maxSamplePushInterval=300.0), subscribeStats=Stats(maxSampleWindowSize=60.0, maxSamplePushInterval=300.0)))
2024-05-26 16:38:26.047 26237-26674 JsonRPCSignal com.livestage.app D open: Connecting WebSocket to endpoint=wss://account-disabled-us/v2/ws?peer=1df7c485-c109-47be-9be3-acc3593a472a&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoyLCJ0eXBlIjoiYXBwIiwiYXBwX2RhdGEiOm51bGwsImFjY2Vzc19rZXkiOiI2NDIxNzVjNTA1OTY4NDNhNjAwZTVlNzMiLCJyb2xlIjoic3BlYWtlciIsInJvb21faWQiOiI2NjUzOGZhNmYxZjE0MWNlNzNiY2NmNzgiLCJ1c2VyX2lkIjoiMTU0NzMyODYxNSIsImV4cCI6MTcxNjgzODcwMCwianRpIjoiM2U1MDE2NzUtMDhiZi00YzZmLTliYjMtNTNhZTJkZGE4ZmIzIiwiaWF0IjoxNzE2NzUyMzAwLCJpc3MiOiI2NDIxNzVjNTA1OTY4NDNhNjAwZTVlNzEiLCJuYmYiOjE3MTY3NTIzMDAsInN1YiI6ImFwaSJ9.TJe-rHaqMgzIVf_l5JBc1iMDV-80Rclqh2V6ZEIxWAs&user_agent_v2=os%3Aandroid%2Cos_version%3A33%2Csdk%3Aandroid%2Csdk_version%3A2.9.55%2Cdevice_model%3Asdk_gphone64_arm64%2Cenv%3Aprod%2Cis_prebuilt%3Afalse&protocol_version=2.5&protocol_spec=20240417 โฐ
2024-05-26 16:38:26.053 26237-26681 HMSWebSocketListener com.livestage.app E onFailure message=Unable to resolve host "account-disabled-us": No address associated with hostname
2024-05-26 16:38:26.056 26237-26674 HMSTransport com.livestage.app D internalConnect:: failed โŒ [error=WebSocketConnectionLost: Network connection lost [code=1003, action=NONE, description=Unable to resolve host "account-disabled-us": No address associated with hostname, cause=java.net.UnknownHostException: Unable to resolve host "account-disabled-us": No address associated with hostname]]

How to join a room using room id

Hi,

So in iOS there is a way to do this

HMSConfig(userID: UUID().uuidString,
                roomID: self.roomId, authToken: self.sessionAuth)

but in Andorid there is no HMSConfig to add room id All I see is meta data in the HMSConfig(). How do we join a room using room id in android? any example will be appreciated.

There is no connection timeout

Sometimes it takes forever to connect to a room when we call "join" function of sdk. There has to be a connection timeout + callback so users can retry connecting to the room.

hmsSDK.join(hmsConfig, hmsUpdateListener)

App icon not visible

Screenshot_20211130-180635__01

App icon in foreground service notification is not visible when screen-sharing is turned on
Note: It shows up in other device. (Nokia C3, android v9)

android v9, OnePlus ONEPLUS A5000

getting error inferred type is HMSPeer but HMSRemotePeer was expected

I just tried the sample project. its having releasev2 branch and when i run i get this error:

sample-app-android/app/src/main/java/live/hms/app2/ui/meeting/MeetingViewModel.kt: (534, 27): Type mismatch: inferred type is HMSPeer but HMSRemotePeer was expected

i don't know what wrong have I done.

Local video randomly stops/freezes

Device: One Plus Nord 2 (Android 11)

100ms SDK version - 2.3.5

Issue: - Local video randomly freezes/stops.

Note: It works fine after muting & unmuting the local video track. i.e. the local video renders successfully on surfaceviewrenderer after muting and unmuting the local video track.
From the remote participant's perspective, the video gets stuck at the last rendered video frame.

live.hms.video.error.HMSException: Network connection lost

live.hms.video.error.HMSException: Network connection lost
live.hms.video.error.ErrorFactory$WebSocketConnectionErrors.WebSocketConnectionLost(ErrorFactory.kt:51)
live.hms.video.error.ErrorFactory$WebSocketConnectionErrors.WebSocketConnectionLost$default(ErrorFactory.kt:46)
live.hms.video.signal.jsonrpc.JSONRpcSignal.onFailure(JSONRpcSignal.kt:385)
okhttp3.internal.ws.RealWebSocket.failWebSocket(RealWebSocket.kt:592)
okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:197)
okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
java.lang.Thread.run(Thread.java:1012)
Caused by: java.net.SocketException: Software caused connection abort
java.net.SocketInputStream.socketRead0(SocketInputStream.java:0)
java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
java.net.SocketInputStream.read(SocketInputStream.java:173)
java.net.SocketInputStream.read(SocketInputStream.java:143)
com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:945)
com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:909)
com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readUntilDataAvailable(ConscryptEngineSocket.java:824)
com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.read(ConscryptEngineSocket.java:797)
okio.InputStreamSource.read(JvmOkio.kt:94)
okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:125)
okio.RealBufferedSource.request(RealBufferedSource.kt:206)
okio.RealBufferedSource.require(RealBufferedSource.kt:199)
okio.RealBufferedSource.readByte(RealBufferedSource.kt:209)
okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119)
okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102)
okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293)
okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
java.lang.Thread.run(Thread.java:1012)

memory leaks

memory leaks
GC Root: Global variable in native code
โ”‚
โ”œโ”€ live.hms.video.connection.publish.HMSPublishConnection$nativeObserver$1 instance
โ”‚ Leaking: UNKNOWN
โ”‚ Retaining 24 B in 1 objects
โ”‚ Anonymous subclass of live.hms.video.connection.helpers.HMSPeerConnectionObserver
โ”‚ โ†“ HMSPublishConnection$nativeObserver$1.$observer
โ”‚ ~~~~~~~~~

Crashing on Android 8 - java.lang.NoSuchMethodError

Device: Moto G Plus
Android: 8.1.0

SDK version: 2.8.3

Project gradle tools version: 4.2.2

Stack trace:
java.lang.NoSuchMethodError: No virtual method position(I)Ljava/nio/FloatBuffer; in class Ljava/nio/FloatBuffer; or its super classes (declaration of 'java.nio.FloatBuffer' appears in /system/framework/core-oj.jar)
at org.webrtc.GlUtil.createFloatBuffer(GlUtil.java:47)
at org.webrtc.GlGenericDrawer.(GlGenericDrawer.java:75)
at org.webrtc.YuvConverter.(YuvConverter.java:111)
at org.webrtc.YuvConverter.(YuvConverter.java:118)
at org.webrtc.SurfaceTextureHelper.create(SurfaceTextureHelper.java:92)
at live.hms.video.media.capturers.HMSCameraCapturer.(HMSCameraCapturer.kt:48)
at live.hms.video.media.streams.HMSStreamFactory.makeLocalVideoCapturer(HMSStreamFactory.kt:75)
at live.hms.video.transport.HMSTransport.getLocalTrackByType(HMSTransport.kt:972)
at live.hms.video.sdk.SDKDelegate.initLocalTracks(SDKDelegate.kt:790)
at live.hms.video.sdk.SDKDelegate.getLocalTracksByRoleAndApplySettings(SDKDelegate.kt:716)
at live.hms.video.sdk.SDKDelegate.access$getLocalTracksByRoleAndApplySettings(SDKDelegate.kt:55)
at live.hms.video.sdk.SDKDelegate$onPolicyChangeHandled$1.invokeSuspend(SDKDelegate.kt:488)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

Need Mirror Video Option

I am able to see option in setting but it doesn't seems to be working.
I am on version: lib:2.3.4

Please let me know if it is still under development.

java.net.UnknownHostException

Crash: Unable to resolve host "prod-in2.100ms.live": No address associated with hostname

Caused by java.net.UnknownHostException: Unable to resolve host "prod-in2.100ms.live": No address associated with hostname
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:126)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:105)
at java.net.InetAddress.getAllByName(InetAddress.java:1154)
at okhttp3.Dns$Companion$DnsSystem.lookup(Dns.java:49)
at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:164)
at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.java:129)
at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:71)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:205)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:106)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.java:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.java:201)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.java:517)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)

Using @100mslive/react-sdk in a Capacitor mobile app

Describe the bug
Hi, I'm currently using @100mslive/react-sdk in my next js app and everything is working great on desktop and mobile browsers, but i'm now trying to create a mobile app using https://capacitorjs.com/. I've got everything working in the mobile app on both iOS and Android except for the 100ms integration.

When I start live streaming, I am being prompted for camera/video permissions, which I'm granting, but in the mobile app I only see this grey screen with a play button image:
image

For Android, these are the permissions and features I'm setting in my AndroidManifest.xml file:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />

    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>โ€œ
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <uses-feature android:name="android.hardware.audio.output" android:required="true" />
    <uses-feature android:name="android.hardware.camera.any" android:required="true" />
    <uses-feature android:name="android.hardware.camera" android:required="true" />
    <uses-feature android:name="android.hardware.camera.autofocus" android:required="true" />
    <uses-feature android:name="android.hardware.camera.front" android:required="false" />
    <uses-feature android:name="android.hardware.camera.level.full" android:required="false" />
    <uses-feature android:name="android.hardware.camera.flash" android:required="false" />

Also, if i use the developer console i see this error, even though i have granted permission:
image

I realize you have Android and iOS SDKs of 100ms, but as a non-mobile developer, I'm not entirely sure how I would instead use those SDKs on mobile and whether or not they will work with the existing @100mslive/react-sdk library I'm using on the client.

Any information would be greatly appreciated, thanks! ๐Ÿ™๐Ÿผ

To Reproduce
Steps to reproduce the behavior:

  1. Install @100mslive/react-sdk in a react or next js app
  2. Install capacitor to generate a mobile app
  3. Attempt to start a livestream from within an Android or iOS app
  4. See that only a grey screen with a playhead image is shown and the livestream never starts

Expected behavior
The video stream should start properly and use the mobile device's camera

Screenshots
image

Smartphone (please complete the following information):

  • Device: Pixel 7, Pixel 6 pro and Pixel 4
  • OS: Android/Tiramisu

Additional context
I'm not sure if this is the correct repo to create this issue in, so please let me know if there is a better place to put it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.