diff --git a/app/build.gradle b/app/build.gradle index 3120008..7e087b3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -87,6 +87,10 @@ dokka { prefix = "com.magnitudestudios.GameFace.databinding" suppress = true } + packageOptions { + prefix = "com.magnitudestudios.GameFace.ui.camera.CameraFragmentArgs" + suppress = true + } } dependencies { diff --git a/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/CameraFragment.kt b/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/CameraFragment.kt index 944ce0e..1236e43 100644 --- a/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/CameraFragment.kt +++ b/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/CameraFragment.kt @@ -59,6 +59,7 @@ class CameraFragment : BaseFragment(), View.OnClickListener { private lateinit var peerConnectionFactory: PeerConnectionFactory private var videoCapturer: VideoCapturer? = null + //Local stream setup variables private lateinit var videoSource: VideoSource private lateinit var audioSource: AudioSource @@ -79,12 +80,15 @@ class CameraFragment : BaseFragment(), View.OnClickListener { private lateinit var mainViewModel: MainViewModel private val viewModel: CameraViewModel by navGraphViewModels(R.id.videoCallGraph) + //Maps the Peer UIDs to Video screens private var videoViews : ConcurrentHashMap = ConcurrentHashMap() + private lateinit var membersAdapter : MemberStatusAdapter private val args: CameraFragmentArgs by navArgs() override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { + //Initialize the peer connection factory val initializationOptions = PeerConnectionFactory.InitializationOptions.builder(requireContext().applicationContext).createInitializationOptions() PeerConnectionFactory.initialize(initializationOptions) bind = FragmentCameraBinding.inflate(inflater) @@ -112,6 +116,7 @@ class CameraFragment : BaseFragment(), View.OnClickListener { observeNewPeers() observeMembers() + //Set up the listeners for buttons and root surface bind.root.setOnClickListener { lifecycleScope.launch { bind.callingControls.animate().setDuration(5000).alpha(1.0f) @@ -162,6 +167,11 @@ class CameraFragment : BaseFragment(), View.OnClickListener { }) } + /** + * Observe members: updates the users UI when a member has been added/ their status + * has changed. + * + */ private fun observeMembers() { membersAdapter = MemberStatusAdapter(viewModel.members.value!!) bind.showMembers.adapter = membersAdapter @@ -183,6 +193,13 @@ class CameraFragment : BaseFragment(), View.OnClickListener { }) } + /** + * Observe ICE connection + * Called when the user's potential ICE servers from the API + * have been received, and is ready to join a room, + * or create a room + * + */ private fun observeIceConnection() { viewModel.iceServers.observe(viewLifecycleOwner, { if (it != null) { @@ -196,6 +213,12 @@ class CameraFragment : BaseFragment(), View.OnClickListener { }) } + /** + * Observe new peers: Called whenever a new peer has joined. + * Creates the peer connection, and only send the offer if their UID is lexicographically + * greater than the other peer's. + * + */ private fun observeNewPeers() { viewModel.newPeer.observe(viewLifecycleOwner, { if (!it.isNullOrEmpty() && it != Firebase.auth.currentUser!!.uid) { @@ -205,6 +228,11 @@ class CameraFragment : BaseFragment(), View.OnClickListener { }) } + /** + * Start the camera: sets up the camera and audio constraints and + * stream. The local video track is the local stream from your camera + * + */ private fun startCamera() { Log.e(TAG, "startCamera: " + "STARTING CAMERA") // //Create a new PeerConnectionFactory instance - using Hardware encoder and decoder. @@ -249,7 +277,13 @@ class CameraFragment : BaseFragment(), View.OnClickListener { } + /** + * Creates a peer connection with the specified UID + * + * @param uid The UID of the peer + */ private fun createPeerConnection(uid: String) { + //Configure the connection val rtcConfig = PeerConnection.RTCConfiguration(viewModel.iceServers.value).apply { tcpCandidatePolicy = PeerConnection.TcpCandidatePolicy.DISABLED bundlePolicy = PeerConnection.BundlePolicy.MAXBUNDLE @@ -258,6 +292,7 @@ class CameraFragment : BaseFragment(), View.OnClickListener { keyType = PeerConnection.KeyType.ECDSA } + //Create the peer val peer = peerConnectionFactory.createPeerConnection(rtcConfig, object : CustomPeerConnectionObserver(uid, "localPeerCreation") { override fun onIceCandidate(iceCandidate: IceCandidate) { super.onIceCandidate(iceCandidate) @@ -278,13 +313,16 @@ class CameraFragment : BaseFragment(), View.OnClickListener { }) peer?.let { it.addStream(localStream) - viewModel.addPeer(uid, it) + viewModel.addPeer(uid, it) //Add the peer to the viewModel } - - } - //For UI updates for each participant + /** + * Update connection status UI + * + * @param uid The uid of the member + * @param iceConnectionState The new ICE connection state + */ private fun updateConnectionStatus(uid: String, iceConnectionState: PeerConnection.IceConnectionState) { when (iceConnectionState) { PeerConnection.IceConnectionState.NEW -> { @@ -311,6 +349,11 @@ class CameraFragment : BaseFragment(), View.OnClickListener { } } + /** + * Helper function to check whether there are other members in the call still + * + * @return + */ private fun stillConnectedMembers() : Boolean { viewModel.connections.value?.forEach { if (it.value.iceConnectionState() == PeerConnection.IceConnectionState.COMPLETED || it.value.iceConnectionState() == PeerConnection.IceConnectionState.CONNECTED) { @@ -320,6 +363,11 @@ class CameraFragment : BaseFragment(), View.OnClickListener { return false } + /** + * Removes a peer (UI) + * + * @param uid + */ @Synchronized private fun removePeer(uid: String) { videoViews[uid]?.surface?.release() @@ -332,6 +380,12 @@ class CameraFragment : BaseFragment(), View.OnClickListener { } + /** + * Got a peer stream from the specified UID and is ready to displayed on a screen + * + * @param peerUID The UID of the peer + * @param stream The MediaStream of the peer to attach to screen surface + */ private fun gotPeerStream(peerUID: String, stream: MediaStream ) { Log.e(TAG, "gotRemoteStream: " + "GOT REMOTE STREAM") //we have remote video stream. add to the renderer. @@ -347,6 +401,12 @@ class CameraFragment : BaseFragment(), View.OnClickListener { } } + /** + * Helper function to retrieve/create a screen for peer given their UID + * + * @param peerUID The UID of the peer + * @return A movable screen object + */ private fun getScreen(peerUID: String) : MovableScreen { val videoView : MovableScreen if (!videoViews.containsKey(peerUID)) { @@ -364,25 +424,48 @@ class CameraFragment : BaseFragment(), View.OnClickListener { return videoView } - + /** + * Transitions the local screen into connected mode + * + */ private fun transitionConnected() { bind.localVideo.setCalling() } + /** + * Transition the local screen into disconnected mode + * + */ private fun transitionDisconnected() { bind.localVideo.setLocal() } + /** + * Sets the screen into loading mode (ie when connecting) + * + * @param b - True when loading, false otherwise. + */ private fun setLoading(b: Boolean) { bind.localVideo.setLoading(b) } + + /** + * Connection failed: called when there is an error connecting + * + * @param message + */ private fun connectionFailed(message: String? = null) { activity?.runOnUiThread { if (!message.isNullOrEmpty()) Toast.makeText(context, message, Toast.LENGTH_LONG).show() } } + /** + * Disconnect the current user from all screens + * + * @param userDefined + */ private fun disconnect(userDefined: Boolean = false) { viewModel.hangUp() transitionDisconnected() @@ -407,6 +490,12 @@ class CameraFragment : BaseFragment(), View.OnClickListener { disconnect() } + /** + * Finds the camera devices available for the video stream + * + * @param enumerator + * @return + */ private fun createCameraCapturer(enumerator: CameraEnumerator): VideoCapturer? { val deviceNames = enumerator.deviceNames // Trying to find a front facing camera! diff --git a/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/CameraViewModel.kt b/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/CameraViewModel.kt index 2dab90e..7579898 100644 --- a/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/CameraViewModel.kt +++ b/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/CameraViewModel.kt @@ -61,18 +61,28 @@ import java.util.concurrent.ConcurrentHashMap * @param application */ class CameraViewModel(application: Application) : AndroidViewModel(application), RoomCallback, MemberCallback { + //The name of the connected room private val connectedRoom = MutableLiveData() + //The list of all the members in the room right now. val members = MutableLiveData>(mutableListOf()) + + //New member val newMember = MutableLiveData() + + //Member changed val changedMember = MutableLiveData() + //Maps user UIDs to a peer connection. Thread safe. val connections = MutableLiveData>(ConcurrentHashMap()) + //Keeps track of the current user's connection status val connectionStatus = MutableLiveData>(Resource.loading(false)) + // The UID of the new peer val newPeer = MutableLiveData() + //Retrieve the ICE servers from the API val iceServers = liveData(Dispatchers.IO) { val data = HTTPRequest.getServers() if (data.status == Status.ERROR) { diff --git a/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/MemberStatusAdapter.kt b/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/MemberStatusAdapter.kt index eaf1a71..6c74bbd 100644 --- a/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/MemberStatusAdapter.kt +++ b/app/src/main/java/com/magnitudestudios/GameFace/ui/camera/MemberStatusAdapter.kt @@ -29,6 +29,7 @@ import com.magnitudestudios.GameFace.views.holders.MemberViewHolder /** * Member status adapter + * @see SortedRVAdapter * * @property members * @constructor Create empty Member status adapter diff --git a/app/src/main/java/com/magnitudestudios/GameFace/views/CustomSurfaceView.kt b/app/src/main/java/com/magnitudestudios/GameFace/views/CustomSurfaceView.kt index db263ad..5b3774c 100644 --- a/app/src/main/java/com/magnitudestudios/GameFace/views/CustomSurfaceView.kt +++ b/app/src/main/java/com/magnitudestudios/GameFace/views/CustomSurfaceView.kt @@ -25,11 +25,6 @@ import android.util.Log import android.view.SurfaceHolder import org.webrtc.SurfaceViewRenderer -/** - * Custom surface view - * - * @constructor Create empty Custom surface view - */ class CustomSurfaceView : SurfaceViewRenderer { constructor(context: Context?) : super(context) {} diff --git a/app/src/main/java/com/magnitudestudios/GameFace/views/MovableScreen.kt b/app/src/main/java/com/magnitudestudios/GameFace/views/MovableScreen.kt index 996d9eb..0606ea7 100644 --- a/app/src/main/java/com/magnitudestudios/GameFace/views/MovableScreen.kt +++ b/app/src/main/java/com/magnitudestudios/GameFace/views/MovableScreen.kt @@ -219,7 +219,7 @@ class MovableScreen @JvmOverloads constructor( } /** - * Set calling + * Sets the screen into calling mode * */// Set this surface view as a smaller screen fun setCalling() { @@ -228,7 +228,7 @@ class MovableScreen @JvmOverloads constructor( } /** - * Sets the screen into local + * Sets the screen into local mode * */// Sets this as a fullscreen view fun setLocal() { diff --git a/app/src/main/java/com/magnitudestudios/GameFace/views/VideoLayout.kt b/app/src/main/java/com/magnitudestudios/GameFace/views/VideoLayout.kt index d75ec31..e30dc52 100644 --- a/app/src/main/java/com/magnitudestudios/GameFace/views/VideoLayout.kt +++ b/app/src/main/java/com/magnitudestudios/GameFace/views/VideoLayout.kt @@ -30,7 +30,11 @@ import androidx.recyclerview.widget.ItemTouchHelper import kotlin.math.max /** - * Video layout + * Video layout: this is the Layout for the Video screens. + * Whenever a screen is added dynamically, this view supports + * resizes and puts all the other screens in the correct places + * + * Currently supports up to six screens * * @constructor * diff --git a/docs/app/alltypes/index.html b/docs/app/alltypes/index.html index b168c0d..11d08ad 100644 --- a/docs/app/alltypes/index.html +++ b/docs/app/alltypes/index.html @@ -134,7 +134,6 @@

All Types

com.magnitudestudios.GameFace.views.CustomSurfaceView -

Custom surface view

@@ -644,7 +643,9 @@

All Types

com.magnitudestudios.GameFace.views.VideoLayout -

Video layout

+

Video layout: this is the Layout for the Video screens. +Whenever a screen is added dynamically, this view supports +resizes and puts all the other screens in the correct places

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/connection-failed.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/connection-failed.html index aae0c91..b2d45c7 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/connection-failed.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/connection-failed.html @@ -10,5 +10,9 @@

connectionFailed

private fun connectionFailed(message: String? = null): Unit +

Connection failed: called when there is an error connecting

+

Parameters

+

+message -

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/create-camera-capturer.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/create-camera-capturer.html index e433467..cd57b58 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/create-camera-capturer.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/create-camera-capturer.html @@ -10,5 +10,11 @@

createCameraCapturer

private fun createCameraCapturer(enumerator: CameraEnumerator): VideoCapturer? +

Finds the camera devices available for the video stream

+

Parameters

+

+enumerator -

+

Return
+

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/create-peer-connection.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/create-peer-connection.html index 8813f7d..80e96f8 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/create-peer-connection.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/create-peer-connection.html @@ -10,5 +10,9 @@

createPeerConnection

private fun createPeerConnection(uid: String): Unit +

Creates a peer connection with the specified UID

+

Parameters

+

+uid - The UID of the peer

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/disconnect.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/disconnect.html index 0185286..4697c2b 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/disconnect.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/disconnect.html @@ -10,5 +10,9 @@

disconnect

private fun disconnect(userDefined: Boolean = false): Unit +

Disconnect the current user from all screens

+

Parameters

+

+userDefined -

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/get-screen.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/get-screen.html index fbcd6d0..0b9743f 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/get-screen.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/get-screen.html @@ -10,5 +10,11 @@

getScreen

private fun getScreen(peerUID: String): MovableScreen +

Helper function to retrieve/create a screen for peer given their UID

+

Parameters

+

+peerUID - The UID of the peer

+

Return
+A movable screen object

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/got-peer-stream.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/got-peer-stream.html index a609af4..50fe4a4 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/got-peer-stream.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/got-peer-stream.html @@ -10,5 +10,11 @@

gotPeerStream

private fun gotPeerStream(peerUID: String, stream: MediaStream): Unit +

Got a peer stream from the specified UID and is ready to displayed on a screen

+

Parameters

+

+peerUID - The UID of the peer

+

+stream - The MediaStream of the peer to attach to screen surface

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/index.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/index.html index 779c20b..f146a76 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/index.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/index.html @@ -156,42 +156,54 @@

Functions

connectionFailed

-fun connectionFailed(message: String? = null): Unit +fun connectionFailed(message: String? = null): Unit +

Connection failed: called when there is an error connecting

+

createCameraCapturer

-fun createCameraCapturer(enumerator: CameraEnumerator): VideoCapturer? +fun createCameraCapturer(enumerator: CameraEnumerator): VideoCapturer? +

Finds the camera devices available for the video stream

+

createPeerConnection

-fun createPeerConnection(uid: String): Unit +fun createPeerConnection(uid: String): Unit +

Creates a peer connection with the specified UID

+

disconnect

-fun disconnect(userDefined: Boolean = false): Unit +fun disconnect(userDefined: Boolean = false): Unit +

Disconnect the current user from all screens

+

getScreen

-fun getScreen(peerUID: String): MovableScreen +fun getScreen(peerUID: String): MovableScreen +

Helper function to retrieve/create a screen for peer given their UID

+

gotPeerStream

-fun gotPeerStream(peerUID: String, stream: MediaStream): Unit +fun gotPeerStream(peerUID: String, stream: MediaStream): Unit +

Got a peer stream from the specified UID and is ready to displayed on a screen

+ @@ -205,21 +217,33 @@

Functions

observeIceConnection

-fun observeIceConnection(): Unit +fun observeIceConnection(): Unit +

Observe ICE connection +Called when the user's potential ICE servers from the API +have been received, and is ready to join a room, +or create a room

+

observeMembers

-fun observeMembers(): Unit +fun observeMembers(): Unit +

Observe members: updates the users UI when a member has been added/ their status +has changed.

+

observeNewPeers

-fun observeNewPeers(): Unit +fun observeNewPeers(): Unit +

Observe new peers: Called whenever a new peer has joined. +Creates the peer connection, and only send the offer if their UID is lexicographically +greater than the other peer's.

+ @@ -268,49 +292,64 @@

Functions

removePeer

-fun removePeer(uid: String): Unit +fun removePeer(uid: String): Unit +

Removes a peer (UI)

+

setLoading

-fun setLoading(b: Boolean): Unit +fun setLoading(b: Boolean): Unit +

Sets the screen into loading mode (ie when connecting)

+

startCamera

-fun startCamera(): Unit +fun startCamera(): Unit +

Start the camera: sets up the camera and audio constraints and +stream. The local video track is the local stream from your camera

+

stillConnectedMembers

-fun stillConnectedMembers(): Boolean +fun stillConnectedMembers(): Boolean +

Helper function to check whether there are other members in the call still

+

transitionConnected

-fun transitionConnected(): Unit +fun transitionConnected(): Unit +

Transitions the local screen into connected mode

+

transitionDisconnected

-fun transitionDisconnected(): Unit +fun transitionDisconnected(): Unit +

Transition the local screen into disconnected mode

+

updateConnectionStatus

-fun updateConnectionStatus(uid: String, iceConnectionState: IceConnectionState): Unit +fun updateConnectionStatus(uid: String, iceConnectionState: IceConnectionState): Unit +

Update connection status UI

+ diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-ice-connection.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-ice-connection.html index abf0250..1e6ebc4 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-ice-connection.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-ice-connection.html @@ -10,5 +10,9 @@

observeIceConnection

private fun observeIceConnection(): Unit +

Observe ICE connection +Called when the user's potential ICE servers from the API +have been received, and is ready to join a room, +or create a room

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-members.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-members.html index f25936c..980fa64 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-members.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-members.html @@ -10,5 +10,7 @@

observeMembers

private fun observeMembers(): Unit +

Observe members: updates the users UI when a member has been added/ their status +has changed.

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-new-peers.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-new-peers.html index 62d0d8c..773e18c 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-new-peers.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/observe-new-peers.html @@ -10,5 +10,8 @@

observeNewPeers

private fun observeNewPeers(): Unit +

Observe new peers: Called whenever a new peer has joined. +Creates the peer connection, and only send the offer if their UID is lexicographically +greater than the other peer's.

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/remove-peer.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/remove-peer.html index 60c6b91..ddabb5e 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/remove-peer.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/remove-peer.html @@ -10,5 +10,9 @@

removePeer

@Synchronized private fun removePeer(uid: String): Unit +

Removes a peer (UI)

+

Parameters

+

+uid -

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/set-loading.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/set-loading.html index 3fa1ebf..c342b40 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/set-loading.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/set-loading.html @@ -10,5 +10,11 @@

setLoading

private fun setLoading(b: Boolean): Unit +

Sets the screen into loading mode (ie when connecting)

+

Parameters

+

+b -

  • True when loading, false otherwise.
  • +
+

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/start-camera.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/start-camera.html index e5b4a07..82f10ea 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/start-camera.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/start-camera.html @@ -10,5 +10,7 @@

startCamera

private fun startCamera(): Unit +

Start the camera: sets up the camera and audio constraints and +stream. The local video track is the local stream from your camera

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/still-connected-members.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/still-connected-members.html index 46898a2..5c93c03 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/still-connected-members.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/still-connected-members.html @@ -10,5 +10,8 @@

stillConnectedMembers

private fun stillConnectedMembers(): Boolean +

Helper function to check whether there are other members in the call still

+

Return
+

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/transition-connected.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/transition-connected.html index 7eb96f5..4b7ec6d 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/transition-connected.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/transition-connected.html @@ -10,5 +10,6 @@

transitionConnected

private fun transitionConnected(): Unit +

Transitions the local screen into connected mode

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/transition-disconnected.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/transition-disconnected.html index 247794f..5b00cd0 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/transition-disconnected.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/transition-disconnected.html @@ -10,5 +10,6 @@

transitionDisconnected

private fun transitionDisconnected(): Unit +

Transition the local screen into disconnected mode

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/update-connection-status.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/update-connection-status.html index 2afa04d..83e7420 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/update-connection-status.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-camera-fragment/update-connection-status.html @@ -10,5 +10,11 @@

updateConnectionStatus

private fun updateConnectionStatus(uid: String, iceConnectionState: IceConnectionState): Unit +

Update connection status UI

+

Parameters

+

+uid - The uid of the member

+

+iceConnectionState - The new ICE connection state

diff --git a/docs/app/com.magnitudestudios.-game-face.ui.camera/-member-status-adapter/index.html b/docs/app/com.magnitudestudios.-game-face.ui.camera/-member-status-adapter/index.html index 18bcd38..1311fb3 100644 --- a/docs/app/com.magnitudestudios.-game-face.ui.camera/-member-status-adapter/index.html +++ b/docs/app/com.magnitudestudios.-game-face.ui.camera/-member-status-adapter/index.html @@ -10,6 +10,9 @@

MemberStatusAdapter

class MemberStatusAdapter : SortedRVAdapter<Member>

Member status adapter

+

See Also
+

SortedRVAdapter

+

Constructors

diff --git a/docs/app/com.magnitudestudios.-game-face.views/-custom-surface-view/index.html b/docs/app/com.magnitudestudios.-game-face.views/-custom-surface-view/index.html index 93c821b..4503477 100644 --- a/docs/app/com.magnitudestudios.-game-face.views/-custom-surface-view/index.html +++ b/docs/app/com.magnitudestudios.-game-face.views/-custom-surface-view/index.html @@ -9,7 +9,6 @@

CustomSurfaceView

class CustomSurfaceView : SurfaceViewRenderer -

Custom surface view

Constructors

diff --git a/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/index.html b/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/index.html index 52c7c6c..b15d715 100644 --- a/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/index.html +++ b/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/index.html @@ -150,7 +150,7 @@

Functions

@@ -198,7 +198,7 @@

Functions

diff --git a/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/set-calling.html b/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/set-calling.html index 3aa9995..b8306d4 100644 --- a/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/set-calling.html +++ b/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/set-calling.html @@ -10,6 +10,6 @@

setCalling

fun setCalling(): Unit -

Set calling

+

Sets the screen into calling mode

diff --git a/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/set-local.html b/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/set-local.html index c20fcf7..a9db9da 100644 --- a/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/set-local.html +++ b/docs/app/com.magnitudestudios.-game-face.views/-movable-screen/set-local.html @@ -10,6 +10,6 @@

setLocal

fun setLocal(): Unit -

Sets the screen into local

+

Sets the screen into local mode

diff --git a/docs/app/com.magnitudestudios.-game-face.views/-video-layout/index.html b/docs/app/com.magnitudestudios.-game-face.views/-video-layout/index.html index df4b40d..a2f47d8 100644 --- a/docs/app/com.magnitudestudios.-game-face.views/-video-layout/index.html +++ b/docs/app/com.magnitudestudios.-game-face.views/-video-layout/index.html @@ -9,7 +9,10 @@

VideoLayout

class VideoLayout : ViewGroup -

Video layout

+

Video layout: this is the Layout for the Video screens. +Whenever a screen is added dynamically, this view supports +resizes and puts all the other screens in the correct places

+

Currently supports up to six screens

Types

fun setCalling(): Unit -

Set calling

+

Sets the screen into calling mode

fun setLocal(): Unit -

Sets the screen into local

+

Sets the screen into local mode

diff --git a/docs/app/com.magnitudestudios.-game-face.views/index.html b/docs/app/com.magnitudestudios.-game-face.views/index.html index e26d893..72fdf85 100644 --- a/docs/app/com.magnitudestudios.-game-face.views/index.html +++ b/docs/app/com.magnitudestudios.-game-face.views/index.html @@ -25,9 +25,7 @@

Types

CustomSurfaceView

+class CustomSurfaceView : SurfaceViewRenderer
-class CustomSurfaceView : SurfaceViewRenderer -

Custom surface view

-
@@ -71,7 +69,9 @@

Types

class VideoLayout : ViewGroup -

Video layout

+

Video layout: this is the Layout for the Video screens. +Whenever a screen is added dynamically, this view supports +resizes and puts all the other screens in the correct places