-
public class ScreenMeet.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final EglBase.ContexteglContextpublic final static ScreenMeet.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final Unitinit(Context appContext, ScreenMeet.Configuration configuration)SDK initialization method. final Application.ActivityLifecycleCallbacksactivityLifecycleCallback()IMPORTANT Application class needs to call registerActivityLifecycleCallbacks(ScreenMeet. final Unitconnect(String code, CompletionHandler completion)Starts ScreenMeet session. final Unitdisconnect()Hangup from current ScreenMeet session Confirmation callback: final UnitregisterEventListener(SessionEventListener eventListener)Register to listen session events. final UnitunregisterEventListener(SessionEventListener eventListener)Removes particular session activity listener from internal collection. final UnitshareCamera(Boolean frontCam)Starts to share device camera Operation result should be expected in final UnitshareCamera(String deviceName)Starts to share device camera Operation result should be expected in final UnitshareScreen()Starts to share current application and it's windows Operation result should be expected in final UnitstopVideoSharing()Stops application or camera sharing Operation result should be expected in: final UnitshareAudio()Start to share audio from device microphone Operation result should be expected in final UnitstopAudioSharing()Stops microphone sharing Operation result should be expected in: final ParticipantMediaStatelocalMediaState()MediaState of local participant. final VideoTracklocalVideoTrack()Video track of local participant. final ParticipantcurrentActiveSpeaker()final ArrayList<Participant>participants()Returns list of session participants. final ScreenMeet.ConnectionStateconnectionState()Returns connection state. final UnitsetConfidential(View view)Method which allows to hide confidential Views on stream Reference to View is stored as WeakReference, which means it would be cleared in SDK as soon as main application stops to hold this reference. final UnitsetConfidential(WebView webView, Boolean applyToContent)Method which allows to hide confidential web-content inside WebView on stream IMPORTANT: setJavaScriptEnabled in WebSettings for WebView needs to be trueReference to WebView is stored as WeakReference, which means it would be cleared in SDK as soon as main application stops to hold this reference. final UnitunsetConfidential(View view)Removes view obfuscation on stream final UnitunsetConfidential(WebView webView, Boolean appliedToContent)Removes WebView obfuscation on stream final EglBase.ContextgetEglContext()-
-
Method Detail
-
init
final Unit init(Context appContext, ScreenMeet.Configuration configuration)
SDK initialization method. Best to be called from Application class lifecycleCallback() should be called after init()
- Parameters:
appContext-application context
-
activityLifecycleCallback
final Application.ActivityLifecycleCallbacks activityLifecycleCallback()
IMPORTANT Application class needs to call registerActivityLifecycleCallbacks(ScreenMeet.activityLifecycleCallback()) in order to support screenshare
-
connect
final Unit connect(String code, CompletionHandler completion)
Starts ScreenMeet session. Current method only establishes network connection. To start streaming media use methods:
- Parameters:
code- : Identify session created by agentcompletion- : Session start callback with status @see CompletionHandler
-
disconnect
final Unit disconnect()
Hangup from current ScreenMeet session Confirmation callback:
-
registerEventListener
final Unit registerEventListener(SessionEventListener eventListener)
Register to listen session events. Supports multiple listeners. Each listener stored as a WeakReference, so make sure to store reference in application
- Parameters:
eventListener- the listener
-
unregisterEventListener
final Unit unregisterEventListener(SessionEventListener eventListener)
Removes particular session activity listener from internal collection.
- Parameters:
eventListener- the listener to unregister
-
shareCamera
final Unit shareCamera(Boolean frontCam)
Starts to share device camera Operation result should be expected in
- Parameters:
frontCam- true for front camera, false for back camera.
-
shareCamera
final Unit shareCamera(String deviceName)
Starts to share device camera Operation result should be expected in
- Parameters:
deviceName- specific camera device name from cameraManager.
-
shareScreen
final Unit shareScreen()
Starts to share current application and it's windows Operation result should be expected in
-
stopVideoSharing
final Unit stopVideoSharing()
Stops application or camera sharing Operation result should be expected in:
-
shareAudio
final Unit shareAudio()
Start to share audio from device microphone Operation result should be expected in
-
stopAudioSharing
final Unit stopAudioSharing()
Stops microphone sharing Operation result should be expected in:
-
localMediaState
final ParticipantMediaState localMediaState()
MediaState of local participant. Can be used to update UI state. If session wasn't started, by default, values would be initialized as false
-
localVideoTrack
final VideoTrack localVideoTrack()
Video track of local participant. Can be used to update UI state. If track is not present resulting value is null
-
currentActiveSpeaker
final Participant currentActiveSpeaker()
-
participants
final ArrayList<Participant> participants()
Returns list of session participants.
-
connectionState
final ScreenMeet.ConnectionState connectionState()
Returns connection state. This is basically the signalling socket state.
-
setConfidential
final Unit setConfidential(View view)
Method which allows to hide confidential Views on stream Reference to View is stored as WeakReference, which means it would be cleared in SDK as soon as main application stops to hold this reference.
- Parameters:
view- reference to target View
-
setConfidential
final Unit setConfidential(WebView webView, Boolean applyToContent)
Method which allows to hide confidential web-content inside WebView on stream IMPORTANT: setJavaScriptEnabled in WebSettings for WebView needs to be true
Reference to WebView is stored as WeakReference, which means it would be cleared in SDK as soon as main application stops to hold this reference.
- Parameters:
webView- reference to target WebViewapplyToContent- true applies confidential to WebView content, false - to WebView as whole View
-
unsetConfidential
final Unit unsetConfidential(View view)
Removes view obfuscation on stream
- Parameters:
view- reference to target View
-
unsetConfidential
final Unit unsetConfidential(WebView webView, Boolean appliedToContent)
Removes WebView obfuscation on stream
- Parameters:
webView- reference to target WebView
-
getEglContext
final EglBase.Context getEglContext()
-
-
-
-