Граф коммитов

3225 Коммитов

Автор SHA1 Сообщение Дата
Joas Schilling e1ead84958
Merge pull request #1586 from nextcloud/fix-leave-different-session-signaling
Fix removing users when an old session id expires in the signaling server.
2019-02-28 13:22:54 +01:00
Joas Schilling 4ca6fc5103
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-28 13:22:23 +01:00
Joachim Bauch 6e1e78ec05
Fix removing users when an old session id expires in the signaling server.
It could happen that an old session id expired while a user already re-joined
a room with a new session id. Once the old session id expired, the user got
removed from the room.

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2019-02-28 13:19:51 +01:00
Joas Schilling 77e1657606
Merge pull request #1590 from nextcloud/bugfix/noid/fix-eslint-on-master
Fix ESlint on master
2019-02-28 11:50:12 +01:00
Joas Schilling 0ee7854edc
Merge pull request #1571 from nextcloud/fix-sharing-own-screen-when-other-peer-is-sharing-the-screen
Fix sharing own screen when other peer is sharing the screen
2019-02-28 11:34:38 +01:00
Joas Schilling 3df2eeb408
Fix ESlint on master
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-28 11:25:43 +01:00
Joas Schilling e3efeb1f70
Merge pull request #1567 from nextcloud/feature/noid/non-empty-room-names
Make  room names non-optional
2019-02-28 08:45:10 +01:00
Joas Schilling c370fec2f8
Merge pull request #1422 from nextcloud/remove_participant_reason
Add reason for removing participant from room
2019-02-28 08:43:18 +01:00
Nextcloud bot 186db38e9e
[tx-robot] updated from transifex 2019-02-28 01:39:35 +00:00
Daniel Calviño Sánchez 0ceca2c0db Prevent saving a room model with an empty name
Although the server will refuse to set an empty room name "validate" was
implemented in "Room" model, which prevents "Room.save" from even
sending the empty name to the server.

The EditableTextLabel now checks too if an "invalid" event was triggered
when calling "Model.save", and if that happens it simply hides the input
showing again the label without changes; it would be better to keep the
input and show the error message instead, but for now it is good enough.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-27 20:03:56 +01:00
Daniel Calviño Sánchez ddae520e8c Adjust acceptance tests to mandatory names in group conversations
Now there is no longer a "New group conversation" item shown in the
conversation list dropdown; instead first the desired conversation name
needs to be typed in the search input and then the group conversation
with that name is selected in the dropdown.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-27 17:43:42 +01:00
Joas Schilling a8c4b5b245 Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-27 17:43:42 +01:00
Joas Schilling 432d930df6
Readd the hack to set the name of one-to-one conversations
because mobile apps and web use it to get the avatar

Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-27 15:26:51 +01:00
Joas Schilling f3d46999f5
Fix integration tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-27 15:26:51 +01:00
Joas Schilling 2893d37da1
Handle empty room names gracefully
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-27 15:26:50 +01:00
Joas Schilling 63d6bb7d32
Update the participant collection when the list changed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-27 15:26:50 +01:00
Joas Schilling 7e54634fb5
Make room names non-optional
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-27 15:26:50 +01:00
Nextcloud bot 1a4f96436a
[tx-robot] updated from transifex 2019-02-27 01:38:01 +00:00
Joas Schilling a12ef77f47
Merge pull request #1580 from nextcloud/bugfix/noid/fix-unit-tests
Fix unit tests
2019-02-26 12:11:39 +01:00
Daniel Calviño Sánchez 83f4c9f32f Add "broadcaster" property to screen offers received from the MCU
SimpleWebRTC expects that screen offers from remote peers include the
"broadcaster" property set to the ID of the peer; this is used to set
the "sharemyscreen" property, which is used to differentiate Peer
objects for sent and received screens.

Screen offers received from the MCU do not include the "broadcaster"
property, so SimpleWebRTC mark the Peer objects created from those
offers as local screens. This causes, for example, that the remote
screen peers are ended when the local screen is stopped.

Due to this, now the "broadcaster" property is added to the screen
offers received from the MCU before they are processed by SimpleWebRTC.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-26 11:52:32 +01:00
Daniel Calviño Sánchez 6dfd5fbf87 Fix stale peers removal when the local screen is shared with no MCU
As screen sharing is unidirectional there are separate Peer objects for
the screen sent to and the screen received from a remote Peer. When the
MCU is used there is a single Peer object for the screen sent to (as it
is sent to the MCU), but when there is no MCU there is one Peer object
for each remote peer that the screen is sent to.

In that later case, the Peer objects for the screen sent to and the
screen received from a remote peer have both the same session ID; the
only difference between them is in the "sharemyscreen" property, which
is "true" for the screen sent to the remote peer.

Due to this, when looking for stale peers the Peer object for the local
screen needs to be ignored; otherwise when the screen offer from the
remote peer is received the Peer object for the local screen would be
seen as stale and removed due to having the same ID and type.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-26 11:52:32 +01:00
Daniel Calviño Sánchez 82723ff34c Fix sharing own screen when other peer is sharing the screen with MCU
When the MCU is used and the local screen is shared the screen is not
directly sent to the remote peers, but to the MCU, which then relays it
to the desired remote peers. Thus, when the local screen should be
shared to a remote peer the MCU has to be notified to send the screen
offer to the remote peer. Then, when the remote peer receives the screen
offer, it creates a new Peer object for the received screen.

The MCU was notified to send the screen offer only if there was no
screen Peer object for the remote peer. Due to this, when a remote peer
shared the screen with the local peer and the local peer then shared the
screen with that remote peer no screen offer was sent, because there was
already a screen Peer object for that remote peer.

To fix this, now the screen offer is sent whenever the local screen is
shared with a remote peer. Note that this should not cause duplicate
offers, as the offer will be sent only when the screen sharing starts or
when a new user joins the call.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-26 11:52:32 +01:00
Daniel Calviño Sánchez 9353040576 Fix sharing own screen when other peer is sharing the screen with no MCU
The explanation below only applies when no MCU is used; the issue
happened both with and without MCU, but the code paths were not modified
when a MCU is used, so the bug is still present in that case.

When the local screen is shared a new screen peer is created for each of
the remote peers. However, when a screen offer is received a new screen
peer is created too; as screen sharing is unidirectional there are
separate Peer objects for the screen sent to and the screen received
from a remote peer. As both Peer objects are for the same remote peer
they have the same session ID; the only difference between them is in
the "sharemyscreen" property, which is "true" for the screen sent to the
remote peer.

Due to all this, when sharing the local screen it is not enough to check
if there is already a screen Peer object with the remote peer id to
prevent creating another one, as that screen Peer object can represent a
screen received from the remote peer; it is necessary to ensure that the
Peer object represents the screen sent to the remote peer using the
"sharemyscreen" property.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-26 11:52:32 +01:00
Peter Edens 4ca16cb2e6
Add reason for removing participant from room so that hook can determine if the user was removed by moderator.
Signed-off-by: Peter Edens <petere@conceiva.com>
2019-02-26 10:15:30 +01:00
Joas Schilling 5489820cd3
Merge pull request #1555 from nextcloud/extract-view-for-local-participant
Extract view for local participant
2019-02-26 09:28:42 +01:00
Joas Schilling b8b8a3a519
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-26 09:25:40 +01:00
Nextcloud bot 73106559a3
[tx-robot] updated from transifex 2019-02-26 01:37:06 +00:00
Daniel Calviño Sánchez 405fb8c153 Move handling of speaking status to LocalVideoView
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:20 +01:00
Daniel Calviño Sánchez dd5e2bb671 Move handling of enabling and disabling the video to LocalVideoView
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:20 +01:00
Daniel Calviño Sánchez 6b99d44212 Collapse if clauses
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:20 +01:00
Daniel Calviño Sánchez 7914c96484 Combine methods to enable and disable video
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:20 +01:00
Daniel Calviño Sánchez c9299b9b81 Use an implicit attribute to store whether the hint was displayed or not
As it is a boolean flag just set once and only needed when the current
user is a guest an implicit attribute added dynamically is now used
instead of an explicit attribute; "_" was prepended to the name too to
mark it as "private".

Note that in the embedded Talk UI there was no explicit attribute, so
the condition would have never passed and the hint would have never been
shown. However, as the embedded Talk UI is currently not used with
guests it was not an issue.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:20 +01:00
Daniel Calviño Sánchez a9a1125b26 Move handling of avatars to LocalVideoView
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:20 +01:00
Daniel Calviño Sánchez 69d01b3cc6 Use explicit CSS classes instead of implicit styles
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez a8e0b83242 Extract initial state of view for a local participant in a call
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez 08b2c6beb8 Remove call with no effect
In the embedded Talk UI the local video container is not hidden, so
there is no need to remove its "hidden" CSS class when the local media
is started.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez bbad46ee16 Remove unused element
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez 055ee3f18e Fix indentation
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez 3f3e7892c0 Combine methods to set video as available or not available
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez 11131de9b7 Combine methods to set audio as available or not available
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez 041c5d77d7 Do not set audio button as enabled when audio is set as available
When the audio is set as available it is followed by a call to
"setAudioEnabled(bool)", so the state of the audio button just set was
always immediately overriden. Moreover, as only the button state but not
the related attribute was set the view was left in an inconsistent
state.

It is currently not possible to directly call "setVideoEnabled(bool)"
from "hasVideo()", so for consistency both "hasAudio()" and "hasVideo()"
expect "setXXXEnabled(bool)" to be explicitly called after they are
called.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez 85d9c1dc27 Do not set media as disabled when media is not available
The audio and video are explicitly set as disabled before they are set
as not available, so there is no need to set them as disabled again.
Moreover, even if they were not explicitly set as disabled it would not
be really necessary to disable the audio and video when they are not
available.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez e485e34022 Combine methods to enable and disable video
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez 3a7b1a3c3a Remove unneeded condition
The condition passes when the video is available, but it will only be
executed anyway if the video is available due to the initial condition
in the method.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez f3a389bd62 Combine methods to enable and disable audio
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez 9aa8ae01f9 Reorder "if" clause in "toggleVideo" to match the one in "toggleAudio"
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez 6631fcc3cb Rename and adjust "videoDisabled" to "videoEnabled"
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez 6ca504db7a Rename and adjust "audioDisabled" to "audioEnabled"
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez b336038451 Rename and adjust "_videoNotFound" to "videoAvailable"
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00
Daniel Calviño Sánchez 17fd6a2a03 Rename and adjust "_audioNotFound" to "audioAvailable"
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-02-25 16:13:19 +01:00