Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
5cd7e774
Unverified
Commit
5cd7e774
authored
Apr 18, 2019
by
Filipe de Lima Brito
Committed by
GitHub
Apr 18, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2226 from Cool-fire/issue-jitsi
[CHORE] Update Jitsi library version
parents
29edff96
748f77bc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
30 deletions
+18
-30
VideoConferenceActivity.kt
...ket/android/videoconference/ui/VideoConferenceActivity.kt
+17
-29
dependencies.gradle
dependencies.gradle
+1
-1
No files found.
app/src/main/java/chat/rocket/android/videoconference/ui/VideoConferenceActivity.kt
View file @
5cd7e774
...
...
@@ -3,14 +3,15 @@ package chat.rocket.android.videoconference.ui
import
android.content.Context
import
android.content.Intent
import
android.os.Bundle
import
androidx.core.os.bundleOf
import
chat.rocket.android.videoconference.presenter.JitsiVideoConferenceView
import
chat.rocket.android.videoconference.presenter.VideoConferencePresenter
import
dagger.android.AndroidInjection
import
org.jitsi.meet.sdk.JitsiMeetActivity
import
org.jitsi.meet.sdk.JitsiMeetConferenceOptions
import
org.jitsi.meet.sdk.JitsiMeetView
import
org.jitsi.meet.sdk.JitsiMeetViewListener
import
timber.log.Timber
import
java.net.URL
import
javax.inject.Inject
fun
Context
.
videoConferenceIntent
(
chatRoomId
:
String
,
chatRoomType
:
String
):
Intent
=
...
...
@@ -23,8 +24,7 @@ private const val INTENT_CHAT_ROOM_TYPE = "chat_room_type"
class
VideoConferenceActivity
:
JitsiMeetActivity
(),
JitsiVideoConferenceView
,
JitsiMeetViewListener
{
@Inject
lateinit
var
presenter
:
VideoConferencePresenter
@Inject
lateinit
var
presenter
:
VideoConferencePresenter
private
lateinit
var
chatRoomId
:
String
private
lateinit
var
chatRoomType
:
String
private
var
view
:
JitsiMeetView
?
=
null
...
...
@@ -34,9 +34,7 @@ class VideoConferenceActivity : JitsiMeetActivity(), JitsiVideoConferenceView,
super
.
onCreate
(
savedInstanceState
)
chatRoomId
=
intent
.
getStringExtra
(
INTENT_CHAT_ROOM_ID
)
requireNotNull
(
chatRoomId
)
{
"no chat_room_id provided in Intent extras"
}
chatRoomType
=
intent
.
getStringExtra
(
INTENT_CHAT_ROOM_TYPE
)
requireNotNull
(
chatRoomType
)
{
"no chat_room_type provided in Intent extras"
}
view
=
JitsiMeetView
(
this
)
view
?.
listener
=
this
...
...
@@ -52,34 +50,24 @@ class VideoConferenceActivity : JitsiMeetActivity(), JitsiVideoConferenceView,
override
fun
onConferenceJoined
(
map
:
MutableMap
<
String
,
Any
>?)
=
logJitsiMeetViewState
(
"Joined video conferencing"
,
map
)
override
fun
onConferenceWillLeave
(
map
:
MutableMap
<
String
,
Any
>?)
=
logJitsiMeetViewState
(
"Leaving video conferencing"
,
map
)
override
fun
onConferenceLeft
(
map
:
MutableMap
<
String
,
Any
>?)
{
logJitsiMeetViewState
(
"Left video conferencing"
,
map
)
override
fun
onConferenceTerminated
(
map
:
MutableMap
<
String
,
Any
>?)
{
map
?.
let
{
if
(
it
.
containsKey
(
"error"
))
{
logJitsiMeetViewState
(
"Terminated video conferencing with error"
,
map
)
}
else
{
logJitsiMeetViewState
(
"Terminated video conferencing"
,
map
)
}
}
finishJitsiVideoConference
()
}
override
fun
onLoadConfigError
(
map
:
MutableMap
<
String
,
Any
>?)
=
logJitsiMeetViewState
(
"Error loading video conference config"
,
map
)
override
fun
onConferenceFailed
(
map
:
MutableMap
<
String
,
Any
>?)
=
logJitsiMeetViewState
(
"Video conference failed"
,
map
)
override
fun
startJitsiVideoConference
(
url
:
String
,
name
:
String
?)
{
view
?.
loadURLObject
(
bundleOf
(
"config"
to
bundleOf
(
"startWithAudioMuted"
to
true
,
"startWithVideoMuted"
to
true
),
"context"
to
bundleOf
(
"user"
to
bundleOf
(
"name"
to
name
),
"iss"
to
"rocketchat-android"
),
"url"
to
url
)
)
JitsiMeetConferenceOptions
.
Builder
()
.
setAudioMuted
(
true
)
.
setVideoMuted
(
true
)
.
setServerURL
(
URL
(
url
))
.
setAudioOnly
(
false
)
.
build
().
let
{
view
?.
join
(
it
)
}
}
override
fun
finishJitsiVideoConference
()
{
...
...
dependencies.gradle
View file @
5cd7e774
...
...
@@ -56,7 +56,7 @@ ext {
glide
:
'4.8.0'
,
glideTransformations
:
'4.0.0'
,
jitsi
:
'
1.2
1.0'
,
jitsi
:
'
2.
1.0'
,
// For testing
junit
:
'4.12'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment