Commit d4b34274 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update VideoConferenceActivity.kt and jitsi version

parent d1b38c0a
...@@ -24,8 +24,7 @@ private const val INTENT_CHAT_ROOM_TYPE = "chat_room_type" ...@@ -24,8 +24,7 @@ private const val INTENT_CHAT_ROOM_TYPE = "chat_room_type"
class VideoConferenceActivity : JitsiMeetActivity(), JitsiVideoConferenceView, class VideoConferenceActivity : JitsiMeetActivity(), JitsiVideoConferenceView,
JitsiMeetViewListener { JitsiMeetViewListener {
@Inject @Inject lateinit var presenter: VideoConferencePresenter
lateinit var presenter: VideoConferencePresenter
private lateinit var chatRoomId: String private lateinit var chatRoomId: String
private lateinit var chatRoomType: String private lateinit var chatRoomType: String
private var view: JitsiMeetView? = null private var view: JitsiMeetView? = null
...@@ -35,9 +34,7 @@ class VideoConferenceActivity : JitsiMeetActivity(), JitsiVideoConferenceView, ...@@ -35,9 +34,7 @@ class VideoConferenceActivity : JitsiMeetActivity(), JitsiVideoConferenceView,
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
chatRoomId = intent.getStringExtra(INTENT_CHAT_ROOM_ID) chatRoomId = intent.getStringExtra(INTENT_CHAT_ROOM_ID)
requireNotNull(chatRoomId) { "no chat_room_id provided in Intent extras" }
chatRoomType = intent.getStringExtra(INTENT_CHAT_ROOM_TYPE) chatRoomType = intent.getStringExtra(INTENT_CHAT_ROOM_TYPE)
requireNotNull(chatRoomType) { "no chat_room_type provided in Intent extras" }
view = JitsiMeetView(this) view = JitsiMeetView(this)
view?.listener = this view?.listener = this
...@@ -54,26 +51,23 @@ class VideoConferenceActivity : JitsiMeetActivity(), JitsiVideoConferenceView, ...@@ -54,26 +51,23 @@ class VideoConferenceActivity : JitsiMeetActivity(), JitsiVideoConferenceView,
logJitsiMeetViewState("Joined video conferencing", map) logJitsiMeetViewState("Joined video conferencing", map)
override fun onConferenceTerminated(map: MutableMap<String, Any>?) { override fun onConferenceTerminated(map: MutableMap<String, Any>?) {
if(!map.isNullOrEmpty()){ map?.let {
if(map.containsKey("error")) { if (it.containsKey("error")) {
logJitsiMeetViewState("Terminated video conferencing with error", map) logJitsiMeetViewState("Terminated video conferencing with error", map)
} } else {
else{
logJitsiMeetViewState("Terminated video conferencing", map) logJitsiMeetViewState("Terminated video conferencing", map)
finishJitsiVideoConference()
} }
} }
finishJitsiVideoConference()
} }
override fun startJitsiVideoConference(url: String, name: String?) { override fun startJitsiVideoConference(url: String, name: String?) {
var options = JitsiMeetConferenceOptions.Builder() JitsiMeetConferenceOptions.Builder()
.setAudioMuted(true) .setAudioMuted(true)
.setVideoMuted(true) .setVideoMuted(true)
.setServerURL(URL(url)) .setServerURL(URL(url))
.setAudioOnly(false) .setAudioOnly(false)
.build() .build().let { view?.join(it) }
view?.join(options)
} }
override fun finishJitsiVideoConference() { override fun finishJitsiVideoConference() {
......
...@@ -56,7 +56,7 @@ ext { ...@@ -56,7 +56,7 @@ ext {
glide : '4.8.0', glide : '4.8.0',
glideTransformations : '4.0.0', glideTransformations : '4.0.0',
jitsi : '+', // TODO Avoid using + (https://github.com/jitsi/jitsi-meet/issues/3987) jitsi : '2.1.0',
// For testing // For testing
junit : '4.12', junit : '4.12',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment