Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

[CHORE] Update Jitsi library version #2226

Merged
merged 5 commits into from
Apr 18, 2019
Merged

[CHORE] Update Jitsi library version #2226

merged 5 commits into from
Apr 18, 2019

Conversation

Cool-fire
Copy link
Contributor

@RocketChat/android

Changes:

Implemented the new updated JitsiMeetViewListener methods, removed old methods. Implemented view.join instead of the old view.LoadURLObject

logJitsiMeetViewState("Left video conferencing", map)
finishJitsiVideoConference()
override fun onConferenceTerminated(map: MutableMap<String, Any>?) {
if(map!!.containsKey("error")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using !!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay @filipedelimabrito

logJitsiMeetViewState("Left video conferencing", map)
finishJitsiVideoConference()
override fun onConferenceTerminated(map: MutableMap<String, Any>?) {
if(map!!.containsKey("error")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a place where I can find all the keys like the error for the map?

Copy link
Contributor Author

@Cool-fire Cool-fire Apr 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@filipedelimabrito Actually the Jitsi documentation specified the keys for Map. if the onConferenceTerminated ended successfully no error key will be present else error key will be there. So based on the condition the keys will be present in the map, so here I am just checking for error key.

https://github.com/jitsi/jitsi-meet/tree/master/android#jitsimeetviewlistener

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing it out @Cool-fire.

"url" to url
)
)
var options = JitsiMeetConferenceOptions.Builder()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be val not var.

override fun onConferenceTerminated(map: MutableMap<String, Any>?) {
if(!map.isNullOrEmpty()){
if(map.containsKey("error")) {
logJitsiMeetViewState("Terminated video conferencing with error", map)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way you'll never finish the video conference if there is an error here.

Copy link
Contributor

@philipbrito philipbrito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made the needed changes here.
Thanks for sending this PR @Cool-fire

@philipbrito philipbrito added this to the 3.4.0 milestone Apr 18, 2019
@philipbrito philipbrito changed the title Refactored VideoConferenceActivity to work with updated Jitsi Library [IMPROVEMENT] Update Jitsi library version Apr 18, 2019
@philipbrito philipbrito changed the title [IMPROVEMENT] Update Jitsi library version [CHORE] Update Jitsi library version Apr 18, 2019
@philipbrito philipbrito merged commit 5cd7e77 into RocketChat:develop Apr 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants