Companion
- All Implemented Interfaces:
public class ScreenMeet.Companion
Nested Class Summary
| Modifier and Type | Class | Description | | --- | --- | --- |
Nested Classes
Field Summary
| Modifier and Type | Field | Description |
| --- | --- | --- |
| private final EglBase.Context | eglContext | |
| public final static ScreenMeet.Companion | INSTANCE | |
Fields
Constructor Summary
| Constructor | Description | | --- | --- |
Constructors
Enum Constant Summary
| Enum Constant | Description | | --- | --- |
Enum Constants
Method Summary
All Methods
| Modifier and Type | Method | Description |
| --- | --- | --- |
| final Unit | init(Context appContext, ScreenMeet.Configuration configuration) | SDK initialization method. |
| final Application.ActivityLifecycleCallbacks | activityLifecycleCallback() | IMPORTANT Application class needs to call registerActivityLifecycleCallbacks(ScreenMeet. |
| final Unit | connect(String code, CompletionHandler completion) | Starts ScreenMeet session. |
| final Unit | disconnect() | Leave current ScreenMeet session. |
| final Unit | registerEventListener(SessionEventListener eventListener) | Register to listen session events. |
| final Unit | unregisterEventListener(SessionEventListener eventListener) | Removes particular session activity listener from internal collection. |
| final Unit | shareCamera(Boolean frontCam) | Starts to share device camera Operation result should be expected in |
| final Unit | shareCamera(String deviceName) | Starts to share device camera Operation result should be expected in |
| final Unit | shareScreen() | Starts to share current application and it's windows Operation result should be expected in |
| final Unit | stopVideoSharing(ScreenMeet.VideoSource source) | Stops video stream sharing. |
| final Unit | shareAudio() | Start to share audio from device microphone Operation result should be expected in |
| final Unit | stopAudioSharing() | Stops microphone sharing Operation result should be expected in: |
| final Participant | localParticipant() | Returns local Participant with details and audio/video tracks |
| final List<Participant> | participants() | Returns list of session participants. |
| final VideoElement | currentActiveSpeaker() | Returns a Participant marked as active by server |
| final List<VideoElement> | uiVideos(Boolean includeLocal) | Aggregates all VideoElements from Participants for populating RecyclerView |
| final ScreenMeet.ConnectionState | connectionState() | Returns connection state. |
| 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. |
| 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 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 Unit | setConfidential(String id, Rect rect) | |
| final Unit | unsetConfidential(View view) | Removes view obfuscation on stream |
| final Unit | unsetConfidential(WebView webView, Boolean appliedToContent) | Removes WebView obfuscation on stream |
| final Unit | unsetConfidential(String id) | |
| final List<ChatMessage> | getChatMessages() | Method to retrieve all messages in chat |
| final Unit | sendChatMessage(String text) | Sends a text message to server. |
| final List<Feature> | activeFeatures() | Returns list of ongoing features that you have given approve for (remote control, laser pointer, etc) and that are currently being used. |
| final Unit | stopFeature(Feature feature) | Stops feature if enabled |
| final Unit | setContext(Context context) | |
| final Unit | setFlutterDelegate(FlutterDelegate delegate) | |
| final EglBase.Context | getEglContext() | |
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
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 screen share
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 agent`completion` \- : Session start callback with status @see CompletionHandler
- #### disconnect
final Unit disconnect()
```
Leave current ScreenMeet session. Session remains open 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 keep reference in your 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(ScreenMeet.VideoSource source)
```
Stops video stream sharing. Takes specific source to stop. In case source == null stops all videos streaming. Callback called for each source separately. If source not found - nothing happens 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:
localParticipant
final Participant localParticipant()
```
Returns local Participant with details and audio/video tracks
- #### participants
final List<Participant> participants()
```
Returns list of session participants.
currentActiveSpeaker
final VideoElement currentActiveSpeaker()
```
Returns a Participant marked as active by server
- #### uiVideos
final List<VideoElement> uiVideos(Boolean includeLocal)
```
Aggregates all VideoElements from Participants for populating RecyclerView
Parameters:includeLocal -
specifies if the local Participant should be included in result
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 WebView`applyToContent` \- true applies confidential to WebView content, false - to WebView as whole View
- #### setConfidential
final Unit setConfidential(String id, Rect rect)
```
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
unsetConfidential
final Unit unsetConfidential(String id)
```
- #### getChatMessages
final List<ChatMessage> getChatMessages()
```
Method to retrieve all messages in chat
sendChatMessage
final Unit sendChatMessage(String text)
```
Sends a text message to server. If network is reconnecting - messages would be queued and delivered after connection restored.
- #### activeFeatures
final List<Feature> activeFeatures()
```
Returns list of ongoing features that you have given approve for (remote control, laser pointer, etc) and that are currently being used.
stopFeature
final Unit stopFeature(Feature feature)
```
Stops feature if enabled
- #### setContext
final Unit setContext(Context context)
```
setFlutterDelegate
final Unit setFlutterDelegate(FlutterDelegate delegate)
```
- #### getEglContext
final EglBase.Context getEglContext()
```