Compare commits

...

25 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé
8c720d7efd feat(security) enable CodeQL Analysis 2021-08-17 17:55:46 +02:00
AJ-عجائب البرمجة
8106fb06e4 fix(rn,sidebar) fix not appearing on RTL languages 2021-08-17 13:15:22 +02:00
Calin Chitu
036ef0f387 fix(video-menu) fixed position for horizontal filmstrip view 2021-08-17 13:54:54 +03:00
Calinteodor
307699a34c feat(toolbox) added android screen share flag
Fixes issue #9435
2021-08-17 13:42:29 +03:00
tmoldovan8x8
c23375793e fix(rn): import React from react package 2021-08-17 13:14:20 +03:00
hmuresan
4dc642fb4d feat(callstats) Add callStatsConfigParams config 2021-08-16 13:15:44 +03:00
Andrei Gavrilescu
d47e67c28c fix(screen-share): never mute audio screen share track #9725 2021-08-16 12:24:01 +03:00
hmuresan
db0b861353 chore(deps) lib-jitsi-meet@latest
6eaffc4b11...c23abfa2bc
2021-08-16 12:12:03 +03:00
Calinteodor
e40d4a48b8 feat(av-moderation) id and aria-label updates for av-moderation test (#9592)
* feat(av-moderation) raised hand ask to unmute aria-label

* feat(av-moderation) fixed test

* feat(av-moderation) added id for notification buttons

* feat(av-moderation) fixed lint error

* feat(av-moderation) added id for non raised hand participant

* feat(av-moderation) added extra id naming for ask to unmute button and participant items

* feat(av-moderation) fixed lint errors

* feat(av-moderation) changed id to participantID

* feat(av-moderation) removed semicolon

* squash: Drop unused id for participantItem.

* squash: Drop unused fields for raisedHand.

Co-authored-by: Дамян Минков <damencho@jitsi.org>
2021-08-15 00:27:18 -05:00
Jade Guiton
8c82c0f56e feat(polls) Ability to create polls inside Jitsi (#9166)
* feat(polls) Added boilerplate code for polls feature

* feat(polls) Implemented simple poll creation and answer modals in web app

feat(polls) Added button to create a poll in toolbar
feat(polls) Added Modal to answer an incoming poll
feat(polls) Implemented basic client-side sending and reception of polls
feat(polls): linked Poll creation to poll answering
fix(polls) Linted code
feat(polls.create) Added fields for question and answers (#3)
* feat(polls.create) Added fields for question and answers + keyboard navigation
* feat(polls.create) Minor changes, added some comments
feat(PollAnswer Component): Component to display modal to answer poll #1 (#2)
* fix(polls) removing necessity of current_poll_id variable
* fix(polls) linting, polls are now updated when an answer is sent
* feat(polls answer) added translation
* fix(polls answer) remove extra comments, fixed typo
* improvement (polls answer) use useSelector instead of mapStateToProps. cleaner code
* fix (polls create) renamed sender to senderId
* fix (polls answer) turned arrow function into useCallBack
feat(PollResults Component): Component to display poll results (#1)
* feat(PollResults Component): fist version of the component
* feat(detailed votes): Display the detailed results of a poll
* feat(Poll results): Use display name instead of ids in detailed results mode
* fix(Poll): change title to question
* fix(Poll type): import Poll type from types.js
* fix(Poll): change title to question
* fix(Poll): get participants out of the map
* fix(Poll): replace filter with find
feat(polls.create) Added "+" and "x" buttons in poll creation form + improved keyboard navigation a bit
feat (polls) Answer modal now display results in real time after validation or skip
feat(polls.create) Minor improvements to poll creation form
feat(poll result) Added default message when trying to display no answer
fix (polls) result windows is now small by default
fix (polls) sanitizes imports to allow startup on react native

* feat(polls.native) Implemented native toolbar button & poll create modal

feat( poll native) added poll creation button in native toolbar
improvement(polls) only one file used for PollCreateButton
feat (polls native) added an example dialog
feat (polls native) added possibility to create and delete options in poll creation
improvement (polls) better styling for PollCreateDialog

* feat(polls) Added ability to drag&drop answers in web poll creation form

* feat(polls) Added native poll answer modal + chat integration, refactored components

Merge branch 'polls-native' of https://github.com/jade-guiton/jitsi-meet into polls-native
improvement (poll) Better styling for poll answer, now uses icons
feat(poll.PollResults): Add native version of PollResults
feat(poll.PollResults): Post results in chat in Native
fix(poll.PollResults): Fix linter error in ChatMessage
feat(polls.native) Improved styling for native poll answer dialog (required some internal changes)

* fix(polls) Heavily refactored and added bars to poll results, other minor changes

fix(poll.create): Move title to Dialog title
feat(poll.create) Minor changes to poll creation / answer dialogs
fix(poll.create) Refactored and improved translations
feat(poll) Improved CSS for modals in web version
fix(poll.pollcreate): Fix button size in native
fix(polls) Refactored poll results component and other minor changes
fix (polls) remove double import
refactor(poll) Heavily refactored poll results (native + web)
feat(polls.results) Added percentage bars and vote counts in web poll results, minor changes to mobile poll results

* fix(polls) Fixes and linting

fix(polls) Reformatted and fixed some linter and Flow errors
fix(polls.results) Fixed voter list border appearing with 0 voters

* feat(polls): Add modal with detailed votes that can be open from the result summary in the chat

* fix(polls) Fixes, refactorings, and minor design changes

feat(polls.results): Refactored poll chat message and improved design in web app
feat(polls.results) Same as last commit, but for mobile version
refactor(polls.results) Refactored PollResultsMessage and removed unnecessary prop in PollResults
fix(polls.results) Fixed all remaining linter and Flow errors
improvement(polls) removed console logs, added comments
fix (polls) linting
fix(polls.results) Fixed bug with poll chat message displaying the wrong name
feat(polls.results) Minor improvement on poll results display (web)
fix(poll.results): Use getParticipantDisplayName to get participant name and avoid empty string as name

* Feat(poll.results): Remember voters names to display after they left the conference (#10)

* feat(poll.results): Add the sender name in Poll object to remember names if participants leave the conference. Names are also updated if changed
* refactor(poll.results): Refactor the memorization of the names of voters to use the same logic as in  the chat
* refactor(poll.results): use Map instead of Array.From(
* refactor(poll.answer): change the way names are stored in poll answers to persist if participant left the call
* Update react/features/polls/components/AbstractPollAnswerDialog.js
* Update react/features/polls/components/AbstractPollCreateDialog.js
* refactor(poll.answer): use voterName instead of senderName to avoid confusion with senderId the id of the sender of the poll
* improvement(polls) Simplified poll answer voter name logic

Co-authored-by: Fabien Zucchet <fabien.zucchet@student-cs.fr>
Co-authored-by: Jade Guiton <guiton.jade@gmail.com>

* fix(poll.native): Fix UI overflow when asking long questions & long options in the mobile app (#11)

Co-authored-by: Fabien Zucchet <fabien.zucchet@student-cs.fr>

* fix(polls) Fixed close button behavior in answer and results dialog (#12)

* fix(polls) Fixed close button behavior in answer and results dialog
* fix(polls) Fixed linter error

* fix(polls) Added a poll queue to avoid overwriting open modals (#13)

* fix(polls) Added a poll queue to avoid overwriting open modals
* fix(polls) Updated documentation for action RECEIVE_POLL

* Refactor(poll.chatresults): Add message in chat with hidden results until the participant has answered (#14)

* refactor(poll.chat): Display poll results in chat when the poll is created instead of when the participant has ansered
* refactor(poll.chat): Hide results until the participant has answered, skipped or canceled a responde to the poll
* Use getParticipantDisplayName instead of only getStore()
* Hide results also in native
* fix(polls) Fixed previous merge

Co-authored-by: Fabien Zucchet <fabien.zucchet@student-cs.fr>
Co-authored-by: Jade Guiton <jade.guiton@centralesupelec.fr>

* minor improvements (polls)

refactor (polls) uniformized string for command names
refactor (polls) changed pollId type to number everywhere

* feat(polls) Added persistence to polls using sendMessage instead of sendCommandOnce (#16)

* feat(polls) Using sendMessage instead of sendCommandOnce, switched poll IDs to string, and ability to receive old polls from backend
* improvement(polls) Linted everything, fixed Flow errors, and added Prosody plugin for polls
* improvement(polls) Historic polls are now displayed in chronological order

* (polls) Minor improvements (#17)

* renaming (polls) Renaming senderId -> voterID for voters
* improvement (polls) sender's name is now provided with poll
* comments (polls) updated comments for senderName types
* fix(polls) Finished merging with json-messages feature
* fix(polls) Fixed incorrect json-message sent with 0 polls

Co-authored-by: Jade Guiton <guiton.jade@gmail.com>

* Move polls to tab (#23)

* Draft(polls): Move polls to polls-pane ; first version for web
* Draft(polls): Move polls to polls-pane ; clean styled.js and remove Participant objects
* fix missing newline at the end of file
* Change behaviour to allow answer poll later
* Fix(polls): change pollId type from number to string for consistency
* feat(polls-pane): Ability to answer to a poll in polls-pane
* feat(polls-pane): Ability to create to a poll in polls-pane
* feat (polls.pane) display a notification when a new poll arrives
* refactor(polls-pane): Update CSS to have a design closer to the mockups
* fix(poll.vote count): Fix votes counting when computing percentage
* fix(poll.vote count): Fix votes counting when computing percentage
* refresh fork with jitsi/jitsi-meet
* design (polls) Better look for poll creation
* refactor(polls pane): Move polls-pane as a chat tab
* Remove the first version of the polls-pane and the button to open it
* Fix notifications and typo
* Translate new polls tab in chat
* Change polls_pane to polls-pane
* Remove unless functions
* Remove usage of styled.js
* Improve responsiveness
* Separate web and native logic
* Remove Create a Poll button in web toolbox
* improvement (polls) added auto scrolling to bottom when a new poll arrives
* Add tabs to swicth between polls and chat in native
* Add AbstractPollsPane
* Add AbstractPollCreate
* Add AbstractPollAnswer
* Add PollAnswer, PollItem and PollList for native
* Add PollCreate for native
* Remove dialogs in web and native
* Remove dialog queue
* Remove useless files
* Move _polls.scss outside dialog folder
* Add possibility to skip answer
* Add (useless for now) see details link
* Add possibility to show detailed results for a poll
* Resize progress bar to make details display
* refactor, design (polls) better style to native design chat
* fix (polls) Removed unecessary files
* translate (polls) added french translation to empty polls
* design fix (polls.native) 'show details' now correctly switch between progress bar and voters mode
* Change See detailed results for Show details and add cursor: pointer
* Fix progress bars not aligned with text
* fix (polls.native) added autoselection of newly created option
* Remove poll answer
* improvement(polls.create) Improved web poll creation form marginally
* improvement(polls.change) Simplified answer removal by reusing poll-answer command
* fix linter
* Fix(translation): update translation

Co-authored-by: Fabien Zucchet <fabien.zucchet@student-cs.fr>
Co-authored-by: spineki <marras.antoine@gmail.com>
Co-authored-by: Fabien Zucchet <fabien.zucchet@viarezo.fr>

* Merge pull request #22 from jade-guiton/polls-with-notification

feat (polls) chat notification badge now display the sum of unread  messages and unread polls
fix(translation): Fix missing translation
Fix flow error

* Cleaned up, fixed, and uniformized translations

* Small improvements to PollAnswer and PollResult + Much refactoring

Specifically:
- "Change vote" button now says "Vote" if voting was skipped
- Clicking on "Change vote" resets the voting form to the last submitted answers instead of a blank slate

- The "answered" field of Polls was replaced by "showResults" and "lastVote"
- The "setAnsweredStatus" action was replaced by "registerVote" and "retractVote"
- Some newly unreachable/useless code was removed
- "showDetails" state is now handled by AbstractPollResults instead of PollItem

* fix(polls tab): change tab underline color to #525252

* fix(poll create): Enforce at least two options to create a poll

* fix(poll create): change 'remove option' color to #E04757

* fix(poll create): Update Poll create CSS to adapt to design

* fix(poll answer): Adapt CSS to make poll answer closer to mockup

* fix(poll result): Udpdate poll result CSS to match mockups

* fix(poll result): Udpdate poll result CSS to match mockups

* fix(poll create): Display 'remove option' only when there is at least 3 options

* fix(polls button): Add hover, active, focus and disabled state to polls buttons

* Last improvements for web

* Native design fixes

* Fix rebase issue in land/main.json

* Fix french translation after rebase

* Fixmobile behaviour

* Fixed keyboard navigation in web poll creation form

* Fixed Flow error related to "no polls" icon in PollsList

* fix(polls): Enabled polls Prosody module in Debian config files

* doc(polls) Added comments to the Prosody module code

* fix(polls): Switched from using an internal LJM event to ones from the public API

* Capitalize I of setIsPollsTabFocused

* extract the 2 button modes into a const

* remove extra new lines

* Rename CLOSE_POLL_TAB for POLL_TAB_CLOSED for clarity

* Rename answers2 for answersParsed for clarity

* use switch instead of if/else chain

* improve syntax for localId fetching

* Refactor: Use BUTTON_MODE.CONTAINED variable instead of 'contained'

* Disable send poll button if not enough data is provided in the form (#30)

* Feat: Add notification badge on chat and poll tabs (#31)

* Feat: Add notification badge on chat and poll tabs

* Add badge equivalent for native

* Update displayNameForm text to mention polls (#34)

* Disable polls UI with a config in config.js (#33)

* Change remove option text color from red to grey (#32)

Co-authored-by: spineki <marras.antoine@gmail.com>
Co-authored-by: Fabien Zucchet <fabien.zucchet@student-cs.fr>
Co-authored-by: Fabien Zucchet <80532941+fabienzucchet@users.noreply.github.com>
Co-authored-by: Fabien Zucchet <fabien.zucchet@viarezo.fr>
2021-08-14 08:29:42 -05:00
dimitardelchev93
c123ff9e15 feat: Add search to speaker stats (#9510)
* Additional setting to add search to speaker stats

* Add translation for speaker stats search placeholder

* Unset speaker stats search input autocomplete

* Fix lint errors for speaker stats search

* Change setting to disableSpeakerStatsSearch

* Better Object.prototype.hasOwnProperty.call alternative

* Make SpeakerStatsSearch a functional component

* Align header with input and use material-ui styles instead of scss and remove SpeakerStats header and fix dialog close

* Resolve code style remark in SpeakerStats constructor

* Resolve component empty return value remark in SpeakerStatsSearch

* Resolve get config property in outside function remark in SpeakerStatsSearch

* Resolve unnecessary anonymous function remark in SpeakerStatsSearch
2021-08-13 11:10:05 -05:00
tmoldovan8x8
ae33755913 feat(rn,sdk) add setConfigOverride to JitsiMeetConferenceOptions
Allows for overriding any (overridable, of course) config option.
2021-08-13 12:03:41 +02:00
BlackXixo
bcc870daa7 fix(lang) update Spanish translation 2021-08-13 11:31:37 +02:00
dependabot[bot]
a6a95ad13b chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /resources/load-test
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 08:23:15 +02:00
Saúl Ibarra Corretgé
195508ea60 chore(deps) lib-jitsi-meet@latest
* fix(ProxyConnection) add new required stubs
* fix(tpc) fix extracting ssrc map when using single stream
* fix(transcribing): send transcripton_language only when necessary (#1677)

97ff597425...6eaffc4b11
2021-08-12 16:26:45 -05:00
José Luís Andrade
5ce4b82c2c update portuguese translation (#9703)
* update portuguese translation

"participantsPane" section

* Update main-pt.json

add "security" translation

* Update main-pt.json

add "lobby" translation
2021-08-12 14:42:23 -05:00
Mauro José da Silva
ab1c016108 fix(lang) update Brazilian Portuguese translations 2021-08-11 09:53:35 +02:00
Дамян Минков
29dd0cf726 fix: Adds a null check in mod_limits_exceptions.
It is failing on prosody 0.11.4 with mod_limits_exception.lua:29: attempt to call method 'set_stanza_size_limit' (a nil value). That prosody misses set_stanza_size_limit.
2021-08-10 14:34:20 -05:00
durduman
1e0c25d816 fix(ios) remove exitPictureInPicture() call from resetBounds(bounds:) 2021-08-10 15:49:31 +02:00
José Luís Andrade
dfd28c501b fix(lang) update portuguese translation 2021-08-10 07:51:04 +02:00
Дамян Минков
ed98eca326 feat: Rises the stanza limit for unlimited jids (jicofo).
c5c4449fbc/doc/debian/jitsi-meet-prosody/prosody.cfg.lua-jvb.example (L24)
2021-08-09 11:33:40 -05:00
Andrei Gavrilescu
c5c4449fbc chore(deps) lib-jitsi-meet@latest (#9686)
* feat(transcribing): configurable transcription language

40fd6bdeaa...97ff597425
2021-08-09 13:46:38 +03:00
Andrei Gavrilescu
e45cab9a80 feat(transcribing): configurable transcription language (#9684)
* configurable transcription language

* merge conflict

* set default config value

* fix lint
2021-08-09 12:29:50 +03:00
Дамян Минков
6f44368647 fix(av-moderation): Fixes approving and dismissing the notification.
When participants panel is open and we approve a participant to unmute, the notification was not hidden as we were not correctly updating the state. We were expecting a participant object, but an id of the participant was used.
2021-08-06 15:04:26 -05:00
Jaya Allamsetty
a31a10ba38 fix(logging): Set the log level to debug again.
Plan is to make the Strophe logs more restrictive.
Revert "fix(logging) reduce overly vebose logging"

This reverts commit 09af88088d.
2021-08-06 12:46:29 -04:00
94 changed files with 4007 additions and 354 deletions

71
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '45 20 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'java', 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -40,10 +40,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
* Room name.
*/
private String room;
/**
* Conference subject.
*/
private String subject;
/**
* JWT token used for authentication.
*/
@@ -54,19 +50,16 @@ public class JitsiMeetConferenceOptions implements Parcelable {
*/
private Bundle colorScheme;
/**
* Config. See: https://github.com/jitsi/jitsi-meet/blob/master/config.js
*/
private Bundle config;
/**
* Feature flags. See: https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/flags/constants.js
*/
private Bundle featureFlags;
/**
* Set to {@code true} to join the conference with audio / video muted or to start in audio
* only mode respectively.
*/
private Boolean audioMuted;
private Boolean audioOnly;
private Boolean videoMuted;
/**
* USer information, to be used when no token is specified.
*/
@@ -80,10 +73,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
return room;
}
public String getSubject() {
return subject;
}
public String getToken() {
return token;
}
@@ -96,18 +85,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
return featureFlags;
}
public boolean getAudioMuted() {
return audioMuted;
}
public boolean getAudioOnly() {
return audioOnly;
}
public boolean getVideoMuted() {
return videoMuted;
}
public JitsiMeetUserInfo getUserInfo() {
return userInfo;
}
@@ -118,19 +95,16 @@ public class JitsiMeetConferenceOptions implements Parcelable {
public static class Builder {
private URL serverURL;
private String room;
private String subject;
private String token;
private Bundle colorScheme;
private Bundle config;
private Bundle featureFlags;
private Boolean audioMuted;
private Boolean audioOnly;
private Boolean videoMuted;
private JitsiMeetUserInfo userInfo;
public Builder() {
config = new Bundle();
featureFlags = new Bundle();
}
@@ -162,7 +136,7 @@ public class JitsiMeetConferenceOptions implements Parcelable {
* @return - The {@link Builder} object itself so the method calls can be chained.
*/
public Builder setSubject(String subject) {
this.subject = subject;
setConfigOverride("subject", subject);
return this;
}
@@ -193,11 +167,11 @@ public class JitsiMeetConferenceOptions implements Parcelable {
/**
* Indicates the conference will be joined with the microphone muted.
* @param muted - Muted indication.
* @param audioMuted - Muted indication.
* @return - The {@link Builder} object itself so the method calls can be chained.
*/
public Builder setAudioMuted(boolean muted) {
this.audioMuted = muted;
public Builder setAudioMuted(boolean audioMuted) {
setConfigOverride("startWithAudioMuted", audioMuted);
return this;
}
@@ -209,7 +183,7 @@ public class JitsiMeetConferenceOptions implements Parcelable {
* @return - The {@link Builder} object itself so the method calls can be chained.
*/
public Builder setAudioOnly(boolean audioOnly) {
this.audioOnly = audioOnly;
setConfigOverride("startAudioOnly", audioOnly);
return this;
}
@@ -219,7 +193,7 @@ public class JitsiMeetConferenceOptions implements Parcelable {
* @return - The {@link Builder} object itself so the method calls can be chained.
*/
public Builder setVideoMuted(boolean videoMuted) {
this.videoMuted = videoMuted;
setConfigOverride("startWithVideoMuted", videoMuted);
return this;
}
@@ -261,6 +235,36 @@ public class JitsiMeetConferenceOptions implements Parcelable {
return this;
}
public Builder setConfigOverride(String config, String value) {
this.config.putString(config, value);
return this;
}
public Builder setConfigOverride(String config, int value) {
this.config.putInt(config, value);
return this;
}
public Builder setConfigOverride(String config, boolean value) {
this.config.putBoolean(config, value);
return this;
}
public Builder setConfigOverride(String config, Bundle bundle) {
this.config.putBundle(config, bundle);
return this;
}
public Builder setConfigOverride(String config, String[] list) {
this.config.putStringArray(config, list);
return this;
}
/**
* Builds the immutable {@link JitsiMeetConferenceOptions} object with the configuration
* that this {@link Builder} instance specified.
@@ -271,13 +275,10 @@ public class JitsiMeetConferenceOptions implements Parcelable {
options.serverURL = this.serverURL;
options.room = this.room;
options.subject = this.subject;
options.token = this.token;
options.colorScheme = this.colorScheme;
options.config = this.config;
options.featureFlags = this.featureFlags;
options.audioMuted = this.audioMuted;
options.audioOnly = this.audioOnly;
options.videoMuted = this.videoMuted;
options.userInfo = this.userInfo;
return options;
@@ -290,17 +291,12 @@ public class JitsiMeetConferenceOptions implements Parcelable {
private JitsiMeetConferenceOptions(Parcel in) {
serverURL = (URL) in.readSerializable();
room = in.readString();
subject = in.readString();
token = in.readString();
colorScheme = in.readBundle();
config = in.readBundle();
featureFlags = in.readBundle();
userInfo = new JitsiMeetUserInfo(in.readBundle());
byte tmpAudioMuted = in.readByte();
audioMuted = tmpAudioMuted == 0 ? null : tmpAudioMuted == 1;
byte tmpAudioOnly = in.readByte();
audioOnly = tmpAudioOnly == 0 ? null : tmpAudioOnly == 1;
byte tmpVideoMuted = in.readByte();
videoMuted = tmpVideoMuted == 0 ? null : tmpVideoMuted == 1;
}
Bundle asProps() {
@@ -317,21 +313,6 @@ public class JitsiMeetConferenceOptions implements Parcelable {
props.putBundle("colorScheme", colorScheme);
}
Bundle config = new Bundle();
if (audioMuted != null) {
config.putBoolean("startWithAudioMuted", audioMuted);
}
if (audioOnly != null) {
config.putBoolean("startAudioOnly", audioOnly);
}
if (videoMuted != null) {
config.putBoolean("startWithVideoMuted", videoMuted);
}
if (subject != null) {
config.putString("subject", subject);
}
Bundle urlProps = new Bundle();
// The room is fully qualified
@@ -379,14 +360,11 @@ public class JitsiMeetConferenceOptions implements Parcelable {
public void writeToParcel(Parcel dest, int flags) {
dest.writeSerializable(serverURL);
dest.writeString(room);
dest.writeString(subject);
dest.writeString(token);
dest.writeBundle(colorScheme);
dest.writeBundle(config);
dest.writeBundle(featureFlags);
dest.writeBundle(userInfo != null ? userInfo.asBundle() : new Bundle());
dest.writeByte((byte) (audioMuted == null ? 0 : audioMuted ? 1 : 2));
dest.writeByte((byte) (audioOnly == null ? 0 : audioOnly ? 1 : 2));
dest.writeByte((byte) (videoMuted == null ? 0 : videoMuted ? 1 : 2));
}
@Override

View File

@@ -73,6 +73,9 @@ var config = {
// Enables reactions feature.
// enableReactions: false,
// Disables polls feature.
// disablePolls: false,
// Disables ICE/UDP by filtering out local and remote UDP candidates in
// signalling.
// webrtcIceUdpDisable: false,
@@ -144,6 +147,9 @@ var config = {
// Sets the preferred resolution (height) for local video. Defaults to 720.
// resolution: 720,
// Specifies whether there will be a search field in speaker stats or not
// disableSpeakerStatsSearch: false,
// How many participants while in the tile view mode, before the receiving video quality is reduced from HD to SD.
// Use -1 to disable.
// maxFullResolutionParticipants: 2,
@@ -230,6 +236,17 @@ var config = {
// subtitles and buttons can be configured)
// transcribingEnabled: false,
// If true transcriber will use the application language.
// The application language is either explicitly set by participants in their settings or automatically
// detected based on the environment, e.g. if the app is opened in a chrome instance which is using french as its
// default language then transcriptions for that participant will be in french.
// Defaults to true.
// transcribeWithAppLanguage: true,
// Transcriber language. This settings will only work if "transcribeWithAppLanguage" is explicitly set to false.
// Available languages can be found in lang/language.json.
// preferredTranscribeLanguage: 'en',
// Enables automatic turning on captions when recording is started
// autoCaptionOnRecord: false,
@@ -513,6 +530,28 @@ var config = {
// callStatsID: '',
// callStatsSecret: '',
// The callstats initialize config params as described in the API:
// https://docs.callstats.io/docs/javascript#callstatsinitialize-with-app-secret
// callStatsConfigParams: {
// disableBeforeUnloadHandler: true, // disables callstats.js's window.onbeforeunload parameter.
// applicationVersion: "app_version", // Application version specified by the developer.
// disablePrecalltest: true, // disables the pre-call test, it is enabled by default.
// siteID: "siteID", // The name/ID of the site/campus from where the call/pre-call test is made.
// additionalIDs: { // additionalIDs object, contains application related IDs.
// customerID: "Customer Identifier. Example, walmart.",
// tenantID: "Tenant Identifier. Example, monster.",
// productName: "Product Name. Example, Jitsi.",
// meetingsName: "Meeting Name. Example, Jitsi loves callstats.",
// serverName: "Server/MiddleBox Name. Example, jvb-prod-us-east-mlkncws12.",
// pbxID: "PBX Identifier. Example, walmart.",
// pbxExtensionID: "PBX Extension Identifier. Example, 5625.",
// fqExtensionID: "Fully qualified Extension Identifier. Example, +71 (US) +5625.",
// sessionID: "Session Identifier. Example, session-12-34"
// },
// collectLegacyStats: true, //enables the collection of legacy stats in chrome browser
// collectIP: true //enables the collection localIP address
// },
// Enables sending participants' display names to callstats
// enableDisplayNameInStats: false,
@@ -583,6 +622,9 @@ var config = {
},
analytics: {
// True if the analytics should be disabled
// disabled: false,
// The Google Analytics Tracking ID:
// googleAnalyticsTrackingId: 'your-tracking-id-UA-123456-1'

View File

@@ -574,3 +574,41 @@
background: #36383C;
border-radius: 3px;
}
.chat-tabs-container {
width: 100%;
border-bottom: thin solid #292929;
display: flex;
justify-content: space-around;
}
.chat-tab {
font-size: 1.2em;
padding-bottom: 0.5em;
width: 50%;
text-align: center;
color: #8B8B8B;
cursor: pointer;
}
.chat-tab-focus {
border-bottom-style: solid;
color: #FFF;
}
.chat-tab-title {
margin-right: 8px;
}
.chat-tab-badge {
background-color: #165ecc;
border-radius: 50%;
box-sizing: border-box;
font-weight: 700;
overflow: hidden;
text-align: center;
text-overflow: ellipsis;
vertical-align: middle;
padding: 0 4px;
color: #FFF;
}

448
css/_polls.scss Normal file
View File

@@ -0,0 +1,448 @@
.poll-dialog {
font-size: 1rem;
h1, span, li, strong {
color: #bce;
}
ol {
margin: 0;
}
}
.poll-question-field {
padding: 8px 16px;
padding-bottom: 24px;
border-bottom: 1px solid #525252;
}
.poll-header {
padding: 8px 16px;
}
.poll-answer-container{
padding: 8px;
background: #3D3D3D;
border-radius: 3px;
margin-bottom: 8px;
}
.poll-answer-field-list, .poll-answer-list, .poll-result-list {
list-style-type: none;
padding: 0 16px;
margin: 0;
}
ol.poll-result-list {
margin-bottom: 1.5em;
}
.poll-result-list > li {
margin-bottom: 8px;
}
.poll-answer-field {
flex-direction: column;
align-items: stretch;
margin-bottom: 16;
}
.poll-answer-field:last-child {
margin-bottom: 0;
}
.poll-create-option-row {
display: 'flex';
margin-bottom: 4;
}
// Needeed to override atlaskit default blue color
.poll-create-container .jsYMHu {
background: #292929;
border-color: #808090;
color: white // #808090
}
.poll-add-button {
display: flex;
justify-content: center;
padding: 8px 16px;
}
.poll-remove-option-button {
background: 0 0;
border: none;
color: #8B8B8B;
padding-left: 0;
}
.poll-create-add-option {
border: none;
background-color: #292929;
padding: 3px;
width: 100%;
}
.poll-icon-button, .poll-drag-handle {
.jitsi-icon svg {
fill: #bce;
}
}
.poll-drag-handle {
background-color: transparent;
border: none;
cursor: grab;
padding-left: 8;
display: flex;
}
.poll-dragged {
opacity: 0.5;
* {
cursor: grabbing !important;
}
}
.poll-question {
font-size: 1.2em;
font-weight: 600;
margin-bottom: 0.5em;
}
.poll-answer-voters {
font-size: 1em;
font-weight: lighter;
list-style-type: none;
border: #616161 solid 1px;
border-radius: 3px;
padding: 2px 6px;
margin: 4px 0px 12px;
background-color: #616161;
}
.poll-answer-header {
display: flex;
justify-content: space-between;
}
.poll-answer-vote-name {
flex-shrink: 1;
overflow-wrap: anywhere
}
.poll-answer-vote-count-container{
display: flex;
}
.poll-answer-vote-count {
margin-left: 10px;
white-space: nowrap;
flex: 1;
text-align: right;
}
.poll-answer-short-results{
display: flex;
min-width: 10em;
justify-content: space-between;
align-items: center;
}
.poll-bar-container, .poll-bar {
border-radius: 3px;
height: 6px;
}
.poll-bar-container {
background-color: #616161;
max-width: 160px;
margin-top: 3px;
flex: 1;
}
.poll-bar {
background-color: #246FE5;
}
.poll-message-footer {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
margin-top: 5px;
}
.poll-notice {
font-weight: 100;
margin-right: 10px;
}
.poll-show-details {
background-color: transparent;
border: none;
&:hover {
text-decoration: underline;
}
}
.poll-result-links {
display: flex;
flex-direction: row;
justify-content: space-between;
}
a.poll-detail-link, a.poll-change-vote-link {
color: #246FE5;
cursor: pointer;
text-decoration: none;
}
.polls-pane-content {
display: flex;
flex-direction: column;
font-weight: 600;
height: 85%;
align-items: stretch;
}
.pane-content{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.empty-pane-icon {
width: 50%;
padding: 24px;
}
.empty-pane-icon svg {
fill: #3D3D3D;
width: 100%;
height: auto;
}
.empty-pane-message {
text-align: center;
}
.poll-results {
color: white;
}
.poll-answer {
h1, strong ,span {
color: white;
}
}
.poll-results, .poll-answer {
margin-bottom: 16px;
background: #292929;
border-radius: 8px;
padding: 12px 8px;
border-width: thin;
border-style: solid;
border-color: #616161;
}
.poll-create-label {
color: white;
margin-bottom: 4;
display: flex;
}
.expandable-input{
resize: none;
width: 100%;
height: 40px;
box-sizing: border-box;
overflow: hidden;
border: 1px solid #666666;
background-color: #141414;
color: #FFF;
border-radius: 6px;
padding: 10px 16px;
}
.poll-container {
box-sizing: border-box;
flex: 1;
overflow-y: auto;
position: relative;
padding: 16px;
& > * + *:not(.ignore-child) {
margin-top: 16px;
}
&::-webkit-scrollbar {
display: none;
}
}
.poll-create-header {
font-size: 20px;
margin: 20px 16px;
font-weight: 600;
}
.poll-create-container {
padding: 8px 0;
}
.poll-footer {
display: flex;
justify-content: flex-end;
padding: 8px 16px;
height: 40px;
align-items: stretch;
& > *:not(:last-child) {
margin-right: 16px;
}
}
.poll-primary-button {
align-items: center;
background-color: #0056E0;
border: 0;
border-radius: 6px;
display: flex;
font-weight: unset;
justify-content: center;
font-size: 15px;
flex: 1;
&:hover {
background-color: #246FE5;
}
&:active {
background-color: #0045B3;
}
&:focus {
background-color: #0045B3;
border: 3px solid #99BBF3;
}
&:disabled {
background-color: #00225A;
color: #858585;
}
& > *:not(:last-child) {
margin-right: 8px;
}
}
.poll-secondary-button {
align-items: center;
background-color: #3D3D3D;
border: 0;
border-radius: 6px;
display: flex;
font-weight: unset;
justify-content: center;
font-size: 15px;
height: 40px;
width: 100%;
&:hover {
background-color: #525252;
}
&:active {
background-color: #292929;
}
&:focus {
background-color: #292929;
border: 3px solid #858585;
}
&:disabled {
background-color: #141414;
color: #858585;
}
& > *:not(:last-child) {
margin-right: 8px;
}
}
.poll-small-primary-button {
align-items: center;
background-color: #0056E0;
border: 0;
border-radius: 6px;
display: flex;
font-weight: unset;
justify-content: center;
font-size: 15px;
height: 40px;
width: 50%;
&:hover {
background-color: #246FE5;
}
&:active {
background-color: #0045B3;
}
&:focus {
background-color: #0045B3;
border: 3px solid #99BBF3;
}
&:disabled {
background-color: #00225A;
color: #858585;
}
& > *:not(:last-child) {
margin-right: 8px;
}
}
.poll-small-secondary-button {
align-items: center;
background-color: #3D3D3D;
border: 0;
border-radius: 6px;
display: flex;
font-weight: unset;
justify-content: center;
font-size: 15px;
height: 40px;
width: 50%;
&:hover {
background-color: #525252;
}
&:active {
background-color: #292929;
}
&:focus {
background-color: #292929;
border: 3px solid #858585;
}
&:disabled {
background-color: #141414;
color: #858585;
}
& > *:not(:last-child) {
margin-right: 8px;
}
}

View File

@@ -108,5 +108,6 @@ $flagsImagePath: "../images/";
@import 'participants-pane';
@import 'reactions-menu';
@import 'plan-limit';
@import 'polls';
/* Modules END */

View File

@@ -65,6 +65,7 @@ Component "conference.jitmeet.example.com" "muc"
modules_enabled = {
"muc_meeting_id";
"muc_domain_mapper";
"polls";
--"token_verification";
}
admins = { "focusUser@auth.jitmeet.example.com" }

View File

@@ -29,10 +29,6 @@
* Room name.
*/
@property (nonatomic, copy, nullable) NSString *room;
/**
* Conference subject.
*/
@property (nonatomic, copy, nullable) NSString *subject;
/**
* JWT token used for authentication.
*/
@@ -49,13 +45,7 @@
*/
@property (nonatomic, readonly, nonnull) NSDictionary *featureFlags;
/**
* Set to YES to join the conference with audio / video muted or to start in audio
* only mode respectively.
*/
@property (nonatomic) BOOL audioOnly;
@property (nonatomic) BOOL audioMuted;
@property (nonatomic) BOOL videoMuted;
@property (nonatomic, readonly, nonnull) NSDictionary *config;
/**
* Set to YES to enable the welcome page. Typically SDK users won't need this enabled
@@ -71,15 +61,17 @@
- (void)setFeatureFlag:(NSString *_Nonnull)flag withBoolean:(BOOL)value;
- (void)setFeatureFlag:(NSString *_Nonnull)flag withValue:(id _Nonnull)value;
/**
* CallKit call handle, to be used when implementing incoming calls.
*/
@property (nonatomic, copy, nullable) NSString *callHandle;
- (void)setConfigOverride:(NSString *_Nonnull)config withBoolean:(BOOL)value;
- (void)setConfigOverride:(NSString *_Nonnull)config withValue:(id _Nonnull)value;
- (void)setConfigOverride:(NSString *_Nonnull)config withDictionary:(NSDictionary * _Nonnull)dictionary;
- (void)setConfigOverride:(NSString *_Nonnull)config withArray:( NSArray * _Nonnull)array;
/**
* CallKit call UUID, to be used when implementing incoming calls.
*/
@property (nonatomic, copy, nullable) NSUUID *callUUID;
- (void)setAudioOnly:(BOOL)audioOnly;
- (void)setAudioMuted:(BOOL)audioMuted;
- (void)setVideoMuted:(BOOL)videoMuted;
- (void)setCallHandle:(NSString *_Nonnull)callHandle;
- (void)setCallUUID:(NSUUID *_Nonnull)callUUID;
- (void)setSubject:(NSString *_Nonnull)subject;
@end
@@ -88,23 +80,15 @@
@property (nonatomic, copy, nullable, readonly) NSURL *serverURL;
@property (nonatomic, copy, nullable, readonly) NSString *room;
@property (nonatomic, copy, nullable, readonly) NSString *subject;
@property (nonatomic, copy, nullable, readonly) NSString *token;
@property (nonatomic, copy, nullable) NSDictionary *colorScheme;
@property (nonatomic, readonly, nonnull) NSDictionary *featureFlags;
@property (nonatomic, readonly) BOOL audioOnly;
@property (nonatomic, readonly) BOOL audioMuted;
@property (nonatomic, readonly) BOOL videoMuted;
@property (nonatomic, readonly) BOOL welcomePageEnabled;
@property (nonatomic, nullable) JitsiMeetUserInfo *userInfo;
@property (nonatomic, copy, nullable, readonly) NSString *callHandle;
@property (nonatomic, copy, nullable, readonly) NSUUID *callUUID;
+ (instancetype _Nonnull)fromBuilder:(void (^_Nonnull)(JitsiMeetConferenceOptionsBuilder *_Nonnull))initBlock;
- (instancetype _Nonnull)init NS_UNAVAILABLE;

View File

@@ -26,35 +26,23 @@ static NSString *const WelcomePageEnabledFeatureFlag = @"welcomepage.enabled";
@implementation JitsiMeetConferenceOptionsBuilder {
NSNumber *_audioOnly;
NSNumber *_audioMuted;
NSNumber *_videoMuted;
NSMutableDictionary *_featureFlags;
NSMutableDictionary *_config;
}
@dynamic audioOnly;
@dynamic audioMuted;
@dynamic videoMuted;
@dynamic welcomePageEnabled;
- (instancetype)init {
if (self = [super init]) {
_serverURL = nil;
_room = nil;
_subject = nil;
_token = nil;
_colorScheme = nil;
_config = [[NSMutableDictionary alloc] init];
_featureFlags = [[NSMutableDictionary alloc] init];
_audioOnly = nil;
_audioMuted = nil;
_videoMuted = nil;
_userInfo = nil;
_callHandle = nil;
_callUUID = nil;
}
return self;
@@ -68,32 +56,48 @@ static NSString *const WelcomePageEnabledFeatureFlag = @"welcomepage.enabled";
_featureFlags[flag] = value;
}
#pragma mark - Dynamic properties
- (void)setAudioOnly:(BOOL)audioOnly {
_audioOnly = [NSNumber numberWithBool:audioOnly];
}
- (BOOL)audioOnly {
return _audioOnly && [_audioOnly boolValue];
[self setConfigOverride:@"startAudioOnly" withBoolean:audioOnly];
}
- (void)setAudioMuted:(BOOL)audioMuted {
_audioMuted = [NSNumber numberWithBool:audioMuted];
}
- (BOOL)audioMuted {
return _audioMuted && [_audioMuted boolValue];
[self setConfigOverride:@"startWithAudioMuted" withBoolean:audioMuted];
}
- (void)setVideoMuted:(BOOL)videoMuted {
_videoMuted = [NSNumber numberWithBool:videoMuted];
[self setConfigOverride:@"startWithVideoMuted" withBoolean:videoMuted];
}
- (BOOL)videoMuted {
return _videoMuted && [_videoMuted boolValue];
- (void)setCallHandle:(NSString *_Nonnull)callHandle {
[self setConfigOverride:@"callHandle" withValue:callHandle];
}
- (void)setCallUUID:(NSUUID *_Nonnull)callUUID {
[self setConfigOverride:@"callUUID" withValue:[callUUID UUIDString]];
}
- (void)setSubject:(NSString *_Nonnull)subject {
[self setConfigOverride:@"subject" withValue:subject];
}
- (void)setConfigOverride:(NSString *_Nonnull)config withBoolean:(BOOL)value {
[self setConfigOverride:config withValue:[NSNumber numberWithBool:value]];
}
- (void)setConfigOverride:(NSString *_Nonnull)config withDictionary:(NSDictionary*)dictionary {
_config[config] = dictionary;
}
- (void)setConfigOverride:(NSString *_Nonnull)config withArray:( NSArray * _Nonnull)array {
_config[config] = array;
}
- (void)setConfigOverride:(NSString *_Nonnull)config withValue:(id _Nonnull)value {
_config[config] = value;
}
#pragma mark - Dynamic properties
- (void)setWelcomePageEnabled:(BOOL)welcomePageEnabled {
[self setFeatureFlag:WelcomePageEnabledFeatureFlag
withBoolean:welcomePageEnabled];
@@ -105,48 +109,17 @@ static NSString *const WelcomePageEnabledFeatureFlag = @"welcomepage.enabled";
return n != nil ? [n boolValue] : NO;
}
#pragma mark - Private API
- (NSNumber *)getAudioOnly {
return _audioOnly;
}
- (NSNumber *)getAudioMuted {
return _audioMuted;
}
- (NSNumber *)getVideoMuted {
return _videoMuted;
}
@end
@implementation JitsiMeetConferenceOptions {
NSNumber *_audioOnly;
NSNumber *_audioMuted;
NSNumber *_videoMuted;
NSDictionary *_featureFlags;
NSDictionary *_config;
}
@dynamic audioOnly;
@dynamic audioMuted;
@dynamic videoMuted;
@dynamic welcomePageEnabled;
#pragma mark - Dynamic properties
- (BOOL)audioOnly {
return _audioOnly && [_audioOnly boolValue];
}
- (BOOL)audioMuted {
return _audioMuted && [_audioMuted boolValue];
}
- (BOOL)videoMuted {
return _videoMuted && [_videoMuted boolValue];
}
- (BOOL)welcomePageEnabled {
NSNumber *n = _featureFlags[WelcomePageEnabledFeatureFlag];
@@ -159,21 +132,15 @@ static NSString *const WelcomePageEnabledFeatureFlag = @"welcomepage.enabled";
if (self = [super init]) {
_serverURL = builder.serverURL;
_room = builder.room;
_subject = builder.subject;
_token = builder.token;
_colorScheme = builder.colorScheme;
_audioOnly = [builder getAudioOnly];
_audioMuted = [builder getAudioMuted];
_videoMuted = [builder getVideoMuted];
_config = builder.config;
_featureFlags = [NSDictionary dictionaryWithDictionary:builder.featureFlags];
_userInfo = builder.userInfo;
_callHandle = builder.callHandle;
_callUUID = builder.callUUID;
}
return self;
@@ -198,26 +165,6 @@ static NSString *const WelcomePageEnabledFeatureFlag = @"welcomepage.enabled";
props[@"colorScheme"] = self.colorScheme;
}
NSMutableDictionary *config = [[NSMutableDictionary alloc] init];
if (_audioOnly != nil) {
config[@"startAudioOnly"] = @(self.audioOnly);
}
if (_audioMuted != nil) {
config[@"startWithAudioMuted"] = @(self.audioMuted);
}
if (_videoMuted != nil) {
config[@"startWithVideoMuted"] = @(self.videoMuted);
}
if (_subject != nil) {
config[@"subject"] = self.subject;
}
if (_callHandle != nil) {
config[@"callHandle"] = self.callHandle;
}
if (_callUUID != nil) {
config[@"callUUID"] = [self.callUUID UUIDString];
}
NSMutableDictionary *urlProps = [[NSMutableDictionary alloc] init];
// The room is fully qualified.
@@ -241,7 +188,7 @@ static NSString *const WelcomePageEnabledFeatureFlag = @"welcomepage.enabled";
props[@"userInfo"] = [self.userInfo asDict];
}
urlProps[@"config"] = config;
urlProps[@"config"] = _config;
props[@"url"] = urlProps;
return props;

View File

@@ -144,7 +144,6 @@ public class PiPViewCoordinator {
/// screen size changes
public func resetBounds(bounds: CGRect) {
currentBounds = bounds
exitPictureInPicture()
}
/// Stop the dragging gesture of the root view

View File

@@ -586,6 +586,7 @@
},
"speaker": "Говорещ",
"speakerStats": {
"search": "Търсене",
"hours": "{{count}}ч",
"minutes": "{{count}}мин",
"name": "Име",

View File

@@ -802,6 +802,7 @@
},
"speaker": "Sprecher/-in",
"speakerStats": {
"search": "Suche",
"hours": "{{count}} Std. ",
"minutes": "{{count}} Min. ",
"name": "Name",

View File

@@ -206,6 +206,7 @@
"e2eeDescription": "El cifrado de extremo a extremo es actualmente EXPERIMENTAL. Tenga en cuenta que activarlo puede deshabilitar servicios como: grabación, transmisión en vivo y participación telefónica. Además, esta reunión solo funcionará con personas que se unan con un navegador.",
"e2eeWarning": "ADVERTENCIA: No todos los participantes de esta reunión soportan el cifrado de extremo a extremo. Si usted habilita esta opción, ellos no podrán verlo ni oírlo.",
"enterDisplayName": "Por favor ingresa tu nombre aquí",
"enterDisplayNameToJoin": "Por favor ingresa tu nombre para unirte",
"error": "Error",
"externalInstallationMsg": "Necesita instalar nuestra extensión para compartir pantalla.",
"externalInstallationTitle": "Extensión requerida",
@@ -952,4 +953,4 @@
"reject": "Rechazar",
"toggleLabel": "Activar sala de espera"
}
}
}

View File

@@ -58,7 +58,7 @@
"today": "Aujourd'hui"
},
"chat": {
"enter": "Entrez dans le salon de chat",
"enter": "Entrez dans le salon",
"error": "Erreur : votre message n'a pas été envoyé. Raison : {{error}}",
"fieldPlaceHolder": "Tapez votre message ici",
"messagebox": "Saisissez un message",
@@ -66,15 +66,19 @@
"noMessagesMessage": "Il n'y a pas encore de messages dans cette réunion. Démarrez une conversation ici !",
"nickname": {
"popover": "Choisissez un pseudonyme",
"title": "Entrez un pseudonyme pour utiliser le chat"
"title": "Entrez un pseudonyme pour utiliser le chat et les sondages"
},
"privateNotice": "Message privé à {{recipient}}",
"title": "Chat",
"you": "vous",
"message": "Message",
"messageAccessibleTitle": "{{user}} dit: ",
"messageAccessibleTitleMe": "Je dis: ",
"smileysPanel": "Panneaux des Émojis"
"smileysPanel": "Panneaux des Émojis",
"tabs": {
"chat": "Chat",
"polls": "Sondages"
},
"title": "Chat et Sondages",
"you": "vous"
},
"chromeExtensionBanner": {
"installExtensionText": "Installer l'extension pour l'intégration de Google Calendar et Office 365",
@@ -568,6 +572,34 @@
},
"passwordSetRemotely": "défini par un autre participant",
"passwordDigitsOnly": "Jusqu'à {{number}} chiffres",
"polls": {
"create": {
"addOption": "Ajouter une option",
"answerPlaceholder": "Option {{index}}",
"create": "Créer un sondage",
"cancel": "Annuler",
"pollOption" : "Option {{index}}",
"pollQuestion" : "Question du sondage",
"questionPlaceholder": "Poser une question",
"removeOption": "Supprimer l'option",
"send": "Envoyer"
},
"answer": {
"skip": "Passer",
"submit": "Envoyer"
},
"results": {
"vote": "Voter",
"changeVote": "Changer le vote",
"empty": "Il n'y a pas encore de sondages dans cette réunion. Démarrez un sondage ici !",
"hideDetailedResults": "Cacher les détails",
"showDetailedResults": "Montrer les détails"
},
"notification": {
"title": "Un nouveau sondage a été ajouté à la réunion",
"description": "Ouvrez l'onget des sondages pour voter"
}
},
"poweredby": "produit par",
"prejoin": {
"audioAndVideoError": "Erreur audio et video:",

View File

@@ -125,9 +125,11 @@
"appNotInstalled": "Precisa da aplicação móvel {{app}} para participar na reunião com o seu telefone.",
"description": "Não acontece nada? Estamos a tentar iniciar a sua reunião na aplicação desktop {{app}}. Tente novamente ou inicie na aplicação web {{app}}.",
"descriptionWithoutWeb": "Não aconteceu nada? Tentamos iniciar a sua reunião na aplicação desktop {{app}}.",
"downloadApp": "Transfira a Aplicação",
"downloadApp": "Transfira a aplicação",
"ifDoNotHaveApp": "Se ainda não tem a aplicação:",
"ifHaveApp": "Se já tem a aplicação:",
"joinInApp": "Participe nesta reunião utilizando a aplicação",
"launchWebButton": "Iniciar na web",
"openApp": "Continue na aplicação",
"title": "A iniciar a sua reunião na {{app}}...",
"tryAgainButton": "Tente novamente no desktop"
},
@@ -488,6 +490,28 @@
"newDeviceAudioTitle": "Novo dispositivo de áudio detectado",
"newDeviceAction": "Usar"
},
"participantsPane": {
"close": "Fechar",
"header": "Participantes",
"headings": {
"lobby": "Sala de espera ({{count}})",
"participantsList": "Participantes da reunião ({{count}})",
"waitingLobby": "Aguardam na sala de espera ({{count}})"
},
"actions": {
"allow": "Permitir aos participantes:",
"blockEveryoneMicCamera": "Bloquear o microfone e a câmara de todos",
"invite": "Convidar alguém",
"askUnmute": "Pedir para ligar o microfone",
"mute": "Silenciar",
"muteAll": "Silenciar todos",
"muteEveryoneElse": "Silenciar todos os outros",
"startModeration": "Ligar o microfone ou a câmara.",
"stopEveryonesVideo": "Desligar a câmara de todos",
"stopVideo": "Desligar a câmara",
"unblockEveryoneMicCamera": "Desbloquear o microfone e a câmara de todos"
}
},
"passwordSetRemotely": "Definido por outro participante",
"passwordDigitsOnly": "Até {{number}} dígitos",
"poweredby": "distribuído por",
@@ -600,6 +624,12 @@
"sectionList": {
"pullToRefresh": "Puxe para atualizar"
},
"security": {
"about": "Pode adicionar uma $t(lockRoomPassword) à sua reunião. Os participantes terão de fornecer a $t(lockRoomPassword) antes de serem autorizados a participar na reunião.",
"aboutReadOnly": "Os participantes moderadores podem acrescentar uma $t(lockRoomPassword) à reunião. Os participantes terão de fornecer a $t(lockRoomPassword) antes de serem autorizados a participar na reunião.",
"insecureRoomNameWarning": "O nome da sala é inseguro. Participantes indesejados podem juntar-se à sua conferência. Considere proteger a sua reunião utilizando o botão de segurança.",
"securityOptions": "Opções de segurança"
},
"settings": {
"calendar": {
"about": "A integração do calendário {{appName}} é utilizada para aceder com segurança ao seu calendário para que este possa ler os próximos eventos.",
@@ -633,7 +663,7 @@
"speakers": "Participantes",
"startAudioMuted": "Todos começam com microfone desligado",
"startVideoMuted": "Todos começam com câmara desligada",
"talkWhileMuted": "se fala e está com microfone desligado",
"talkWhileMuted": "Se fala e está com microfone desligado",
"title": "Definições"
},
"settingsView": {
@@ -888,5 +918,41 @@
"sendFeedback": "Enviar comentários",
"terms": "Termos",
"title": "Videoconferências mais seguras, flexíveis e totalmente gratuitas"
},
"lobby": {
"admit": "Aceitar",
"admitAll": "Aceitar todos",
"knockingParticipantList": "Lista de participantes a expulsar",
"allow": "Permitir",
"backToKnockModeButton": "Sem senha, peça para aderir em vez disso",
"dialogTitle": "Modo sala de espera",
"disableDialogContent": "O modo sala de espera está actualmente activada. Esta característica assegura que os participantes indesejados não possam juntar-se à sua reunião. Quer desativá-la?",
"disableDialogSubmit": "Desativar",
"emailField": "Introduza o seu endereço de e-mail",
"enableDialogPasswordField": "Definir senha (opcional)",
"enableDialogSubmit": "Habilitar",
"enableDialogText": "O modo sala de espera permite-lhe proteger a sua reunião apenas permitindo a entrada de pessoas após uma aprovação formal por um moderador.",
"enterPasswordButton": "Introduza a senha da reunião",
"enterPasswordTitle": "Introduzir a senha para participar na reunião",
"invalidPassword": "Senha inválida",
"joiningMessage": "Participará na reunião assim que alguém aceitar o seu pedido",
"joinWithPasswordMessage": "Tentando aderir com senha, por favor aguarde...",
"joinRejectedMessage": "O seu pedido de adesão foi rejeitado por um moderador.",
"joinTitle": "Junte-se à reunião",
"joiningTitle": "Pedir para participar na reunião...",
"joiningWithPasswordTitle": "Participando com senha...",
"knockButton": "Pedir para participar",
"knockTitle": "Alguém quer juntar-se à reunião",
"nameField": "Introduza o seu nome",
"notificationLobbyAccessDenied": "{{targetParticipantName}} foi recusada a adesão por {{originParticipantName}}",
"notificationLobbyAccessGranted": "{{targetParticipantName}} foi autorizado a aderir por {{originParticipantName}}",
"notificationLobbyDisabled": "A sala de espera foi desactivada por {{originParticipantName}}",
"notificationLobbyEnabled": "A sala de espera foi activada por {{originParticipantName}}",
"notificationTitle": "Sala de espera",
"passwordField": "Introduza a senha da reunião",
"passwordJoinButton": "Solicitar",
"reject": "Rejeitar",
"rejectAll": "Rejeitar todos",
"toggleLabel": "Ativar sala de espera"
}
}

View File

@@ -5,6 +5,7 @@
"copyInvite": "Copiar convite da reunião",
"copyLink": "Copiar link da reunião",
"copyStream": "Copiar link da transmissão ao vivo",
"contacts": "contatos",
"countryNotSupported": "Ainda não suportamos este destino.",
"countryReminder": "Ligando de fora dos EUA? Por favor, certifique-se de começar com o código do país!",
"defaultEmail": "Seu email padrão",
@@ -16,18 +17,14 @@
"inviteMoreMailSubject": "Entre na reunião {{appName}}",
"inviteMorePrompt": "Convide mais pessoas",
"linkCopied": "Link copiado para a área de transferência",
"loading": "Procurando por pessoas e números de telefone",
"loadingNumber": "Validando o número de telefone",
"loadingPeople": "Procurando por pessoas para convidar",
"noResults": "Nenhum resultado de busca correspondente",
"noValidNumbers": "Por favor, digite um número de telefone",
"outlookEmail": "E-mail Outlook ",
"searchNumbers": "Adicionar números de telefone",
"searchPeople": "Pesquisar pessoas",
"searchPeopleAndNumbers": "Pesquisar por pessoas ou adicionar seus números de telefone",
"phoneNumbers": "números de telefone",
"searching": "Procurando...",
"shareInvite": "Compartilhar convite da reunião",
"shareLink": "Compartilhando o link da reunião",
"shareStream": "Compartilhar o link da transmissão ao vivo",
"sipAddresses": "endereços SIP",
"telephone": "Telefone: {{number}}",
"title": "Convide pessoas para sua reunião",
"yahooEmail": "E-mail Yahoo"
@@ -61,6 +58,7 @@
"today": "Hoje"
},
"chat": {
"enter": "Entrar no bate-papo",
"error": "Erro: sua mensagem não foi enviada. Motivo: {{error}}",
"fieldPlaceHolder": "Digite sua mensagem aqui",
"messagebox": "Digite uma mensagem",
@@ -72,12 +70,17 @@
},
"privateNotice": "Mensagem privada para {{recipient}}",
"title": "Bate-papo",
"you": "você"
"you": "você",
"message": "Mensagem",
"messageAccessibleTitle": "{{user}} disse:",
"messageAccessibleTitleMe": "Você disse:",
"smileysPanel": "Painel de Emojis"
},
"chromeExtensionBanner": {
"installExtensionText": "Instale a extensão para integrar com Google Calendar e Office 365",
"buttonText": "Instalar extensão do Chrome",
"dontShowAgain": "Não me mostre isso de novo"
"dontShowAgain": "Não me mostre isso de novo",
"close": "Fechar"
},
"connectingOverlay": {
"joiningRoom": "Conectando você à reunião…"
@@ -174,12 +177,14 @@
"alreadySharedVideoMsg": "Outro participante já está compartilhando um vídeo. Esta conferência permite apenas um vídeo compartilhado por vez.",
"alreadySharedVideoTitle": "Somente um vídeo compartilhado é permitido por vez",
"applicationWindow": "Janela de aplicativo",
"authenticationRequired": "Autenticação requerida",
"Back": "Voltar",
"cameraConstraintFailedError": "Sua câmera não satisfaz algumas condições necessárias.",
"cameraNotFoundError": "A câmera não foi encontrada.",
"cameraNotSendingData": "Estamos incapazes de acessar sua câmera. Verifique se outra aplicação está usando este dispositivo, selecione outro dispositivo do menu de configurações ou recarregue a aplicação.",
"cameraNotSendingDataTitle": "Incapaz de acessar a câmera",
"cameraPermissionDeniedError": "Não foi permitido acessar a sua câmera. Você ainda pode entrar na conferência, mas sem exibir o seu vídeo. Clique no botão da câmera para tentar reparar.",
"cameraTimeoutError": "Não foi possível iniciar fonte de vídeo. Tempo esgotado!",
"cameraUnknownError": "Não pode usar a câmera por uma razão desconhecida.",
"cameraUnsupportedResolutionError": "Sua câmera não suporta a resolução de vídeo requerida.",
"Cancel": "Cancelar",
@@ -194,7 +199,7 @@
"connectError": "Oops! Alguma coisa está errada e nós não pudemos conectar à conferência.",
"connectErrorWithMsg": "Oops! Alguma coisa está errada e não podemos conectar à conferência: {{msg}}",
"connecting": "Conectando",
"contactSupport": "Contate o suporte",
"contactSupport": "Entrar em contato com o suporte",
"copied": "Copiado",
"copy": "Copiar",
"dismiss": "Dispensar",
@@ -204,28 +209,31 @@
"e2eeLabel": "Enable End-to-End Encryption",
"e2eeWarning": "WARNING: Not all participants in this meeting seem to have support for End-to-End encryption. If you enable it they won't be able to see nor hear you.",
"enterDisplayName": "Digite seu nome aqui",
"enterDisplayNameToJoin": "Digite seu nome para participar",
"embedMeeting": "Reunião em formato compacto",
"error": "Erro",
"gracefulShutdown": "Nosso serviço está em manutenção. Tente novamente mais tarde.",
"grantModeratorDialog": "Tem certeza que quer participar como moderador da reunião?",
"grantModeratorTitle": "Permitir moderador",
"hideShareAudioHelper": "Não mostre este diálogo novamente",
"IamHost": "Eu sou o anfitrião",
"incorrectRoomLockPassword": "Senha incorreta",
"incorrectPassword": "Usuário ou senha incorretos",
"internalError": "Oops! Alguma coisa está errada. O seguinte erro ocorreu: {{error}}",
"internalErrorTitle": "Erro interno",
"kickMessage": "Você pode contatar com {{participantDisplayName}} para obter mais detalhes.",
"kickMessage": "Você pode entrar em contato com {{participantDisplayName}} para obter mais detalhes.",
"kickParticipantButton": "Remover",
"kickParticipantDialog": "Tem certeza de que deseja remover este participante?",
"kickParticipantTitle": "Chutar este participante?",
"kickTitle": "Ai! {{participantDisplayName}} expulsou você da reunião",
"kickParticipantTitle": "Remover este participante?",
"kickTitle": "{{participantDisplayName}} removeu você da reunião",
"liveStreaming": "Transmissão ao Vivo",
"liveStreamingDisabledBecauseOfActiveRecordingTooltip": "Não é possível transmitir enquanto a gravação está ativa",
"liveStreamingDisabledForGuestTooltip": "Visitantes não podem iniciar transmissão ao vivo.",
"liveStreamingDisabledTooltip": "Iniciar transmissão ao vivo desativada.",
"lockMessage": "Falha ao travar a conferência.",
"lockMessage": "Falha ao bloquear a conferência.",
"lockRoom": "Adicionar reunião $t(lockRoomPasswordUppercase)",
"lockTitle": "Bloqueio falhou",
"logoutQuestion": "Deseja encerrar a sessão e finalizar a conferência?",
"login": "Entrar",
"logoutTitle": "Encerrar sessão",
"maxUsersLimitReached": "O limite para o número máximo de participantes foi atingido. A conferência está cheia. Entre em contato com o proprietário da reunião ou tente novamente mais tarde!",
"maxUsersLimitReachedTitle": "Limite máximo de participantes atingido",
@@ -234,28 +242,42 @@
"micNotSendingData": "Vá para as configurações do seu computador para ativar o som do microfone e ajustar seu nível",
"micNotSendingDataTitle": "Seu microfone está mudo pelas configurações do sistema",
"micPermissionDeniedError": "Não foi permitido acessar o seu microfone. Você ainda pode entrar na conferência, mas sem enviar áudio. Clique no botão do microfone para tentar reparar.",
"micTimeoutError": "Não foi possível iniciar fonte de áudio. Tempo esgotado!",
"micUnknownError": "Não pode usar o microfone por uma razão desconhecida.",
"muteEveryoneElseDialog": "Uma vez silenciados, você não poderá reativar o som deles, mas eles poderão reativar o som a qualquer momento.",
"muteEveryoneElseTitle": "Silenciar todo mundo exceto {{whom}}?",
"muteEveryoneDialog": "Tem certeza que deseja silenciar todos? Você não poderá ativar o som deles, mas eles podem ativar o som eles mesmo a qualquer momento.",
"muteEveryoneTitle": "Silenciar todos?",
"muteEveryoneElsesVideoDialog": "Você não poderá reativar posteriormente, mas cada participante pode ativar sua própria câmera a qualquer momento.",
"muteEveryoneElsesVideoTitle": "Desativar a câmera de todos exceto {{whom}}?",
"muteEveryonesVideoDialog": "Tem certeza que deseja desativar a câmera de todos? Você não poderá reativar posteriormente, mas cada participante pode ativar sua própria câmera a qualquer momento.",
"muteEveryonesVideoDialogOk": "Desabilitar",
"muteEveryonesVideoTitle": "Desativar a câmera de todos?",
"muteEveryoneSelf": "a si próprio",
"muteEveryoneStartMuted": "Todos iniciam silenciados daqui para frente",
"muteParticipantBody": "Você não está habilitado para tirar o mudo deles, mas eles podem tirar o mudo deles mesmos a qualquer tempo.",
"muteParticipantButton": "Mudo",
"muteParticipantDialog": "Tem certeza de que deseja silenciar este participante? Você não poderá desfazer isso, mas o participante pode reabilitar o áudio a qualquer momento.",
"muteParticipantsVideoDialog": "Tem certeza de que deseja desativar a câmera deste participante? Você não poderá reativar posteriormente, mas o participante pode ativar sua própria câmera a qualquer momento.",
"muteParticipantTitle": "Deixar mudo este participante?",
"Ok": "Ok",
"passwordLabel": "A reunião foi travada por um participante. Por favor, insira a $t(lockRoomPassword) para entrar.",
"muteParticipantsVideoButton": "Desativar a câmera",
"muteParticipantsVideoTitle": "Desativar a câmera deste participante?",
"muteParticipantsVideoBody": "Você não poderá reativar posteriormente, mas o participante pode ativar sua própria câmera a qualquer momento.",
"noDropboxToken": "Nenhum token do Dropbox válido",
"Ok": "OK",
"password": "Senha",
"passwordLabel": "A reunião foi bloqueada por um participante. Por favor, insira a $t(lockRoomPassword) para entrar.",
"passwordNotSupported": "A configuração de uma reunião $t(lockRoomPassword) não é suportada.",
"passwordNotSupportedTitle": "$t(lockRoomPasswordUppercase) não suportado",
"passwordRequired": "$t(lockRoomPasswordUppercase) requerido",
"permissionErrorTitle": "Permissão necessária",
"permissionCameraRequiredError": "É necessário permitir acesso à câmera para participar de reuniões com vídeo. Ative a permissão nas configurações",
"permissionMicRequiredError": "É necessário permitir acesso ao microfone para participar de reuniões com áudio. Ative a permissão nas configurações",
"popupError": "Seu navegador está bloqueando janelas popup deste site. Habilite os popups nas configurações de segurança no seu navegador e tente novamente.",
"popupErrorTitle": "Popup bloqueado",
"readMore": "mais...",
"recording": "Gravando",
"recordingDisabledBecauseOfActiveLiveStreamingTooltip": "Não é possível transmitir enquanto a gravação está ativa",
"recordingDisabledForGuestTooltip": "Visitantes não podem iniciar gravações.",
"recordingDisabledTooltip": "Iniciar gravação desativada.",
"rejoinNow": "Reconectar agora",
"remoteControlAllowedMessage": "{{user}} aceitou sua requisição de controle remoto!",
@@ -272,7 +294,7 @@
"reservationError": "Erro de sistema de reserva",
"reservationErrorMsg": "Código do erro: {{code}}, mensagem: {{msg}}",
"retry": "Tentar novamente",
"screenSharingAudio": "Compartilha áudio",
"screenSharingAudio": "Compartilhar áudio",
"screenSharingFailed": "Oops! Alguma coisa de errado aconteceu, não é possível habilitar o compartilhamento de tela!",
"screenSharingFailedTitle": "Falha ao compartilhar a tela!",
"screenSharingPermissionDeniedError": "Oops! Alguma coisa está errada com suas permissões de compartilhamento de tela. Recarregue e tente de novo.",
@@ -282,15 +304,26 @@
"sendPrivateMessageTitle": "Enviar em privado?",
"serviceUnavailable": "Serviço indisponível",
"sessTerminated": "Chamada terminada",
"sessionRestarted": "Chamada reiniciada pelo bridge",
"Share": "Compartilhar",
"shareAudio": "Continuar",
"shareAudioTitle": "Como compartilhar áudio",
"shareAudioWarningTitle": "Você precisa parar o compartilhamento de tela antes de compartilhar seu áudio",
"shareAudioWarningH1": "Se você quiser compartilhar apenas seu áudio:",
"shareAudioWarningD1": "você precisa parar o compartilhamento de tela antes de compartilhar seu áudio.",
"shareAudioWarningD2": "você precisa reiniciar o compartilhamento de tela e selecionar a opção \"compartilhar áudio\".",
"shareMediaWarningGenericH2": "Se você quiser compartilhar sua tela e seu áudio",
"shareVideoLinkError": "Por favor, forneça um link do youtube correto.",
"shareVideoTitle": "Compartilhar um vídeo",
"shareYourScreen": "Compartilhar sua tela",
"shareYourScreenDisabled": "Compartilhamento de tela desativada.",
"shareYourScreenDisabledForGuest": "Visitantes não podem compartilhar tela.",
"startLiveStreaming": "Iniciar transmissão ao vivo",
"startRecording": "Iniciar gravação",
"startRemoteControlErrorMessage": "Um erro ocorreu enquanto tentava iniciar uma sessão de controle remoto!",
"shareScreenWarningTitle": "Você precisa parar o compartilhamento de áudio antes de compartilhar sua tela",
"shareScreenWarningH1": "Se você quiser compartilhar apenas sua tela:",
"shareScreenWarningD1": "você precisa parar o compartilhamento de áudio antes de compartilhar sua tela.",
"shareScreenWarningD2": "você precisa parar o compartilhamento de áudio, iniciar o compartilhamento de tela e selecionar a opção \"compartilhar áudio\".",
"stopLiveStreaming": "Parar transmissão ao vivo",
"stopRecording": "Parar a gravação",
"stopRecordingWarning": "Tem certeza que deseja parar a gravação?",
@@ -303,13 +336,20 @@
"tokenAuthFailedTitle": "Falha de autenticação",
"transcribing": "Transcrevendo",
"unlockRoom": "Remove a reunião $t(lockRoomPassword)",
"user": "Usuário",
"userIdentifier": "identificação do usuário",
"userPassword": "senha do usuário",
"videoLink": "Link do vídeo",
"viewUpgradeOptions": "Ver opções de atualização",
"viewUpgradeOptionsContent": "Para obter acesso ilimitado a recursos premium tais como gravação, transcrição, streaming RTMP e muito mais, você precisa atualizar seu plano.",
"viewUpgradeOptionsTitle": "Você descobriu um recurso premium!",
"WaitForHostMsg": "A conferência <b>{{room}}</b> ainda não começou. Se você é o anfitrião, faça a autenticação. Do contrário, aguarde a chegada do anfitrião.",
"WaitForHostMsgWOk": "A conferência <b>{{room}}</b> ainda não começou. Se você é o anfitrião, pressione Ok para autenticar. Do contrário, aguarde a chegada do anfitrião.",
"WaitingForHost": "Esperando o anfitrião...",
"WaitForHostMsgWOk": "A conferência <b>{{room}}</b> ainda não começou. Se você é o anfitrião, pressione OK para autenticar. Do contrário, aguarde a chegada do anfitrião.",
"WaitingForHostTitle": "Esperando o anfitrião...",
"Yes": "Sim",
"yourEntireScreen": "Toda sua tela"
"yourEntireScreen": "Toda sua tela",
"remoteUserControls": "Controles de usuários remotos de {{username}}",
"localUserControls": "Controles de usuários locais"
},
"dialOut": {
"statusMessage": "está agora {{status}}"
@@ -323,27 +363,27 @@
"embedMeeting": {
"title": "Reunião em formato compacto"
},
"virtualBackground": {
"apply": "Aplicar",
"title": "Fundos virtuais",
"blur": "Desfoque",
"slightBlur": "Desfoque suave",
"removeBackground": "Remover fundo",
"addBackground": "Adicionar novo fundo",
"pleaseWait": "Aguarde...",
"none": "Nenhum",
"uploadedImage": "Imagem enviada {{index}}",
"deleteImage": "Excluir imagem",
"image1" : "Praia",
"image2" : "Parede branca neutra",
"image3" : "Quarto branco vazio",
"image4" : "Luminária preta",
"image5" : "Montanha",
"image6" : "Floresta",
"image7" : "Alvorada",
"desktopShareError": "Não foi possível compartilhar o desktop",
"desktopShare":"Compartilhar desktop",
"webAssemblyWarning": "Não há suporte para WebAssembly"
"virtualBackground": {
"apply": "Aplicar",
"title": "Fundos virtuais",
"blur": "Desfoque",
"slightBlur": "Desfoque suave",
"removeBackground": "Remover fundo",
"addBackground": "Adicionar novo fundo",
"pleaseWait": "Aguarde...",
"none": "Nenhum",
"uploadedImage": "Imagem enviada {{index}}",
"deleteImage": "Excluir imagem",
"image1": "Praia",
"image2": "Parede branca neutra",
"image3": "Quarto branco vazio",
"image4": "Luminária preta",
"image5": "Montanha",
"image6": "Floresta",
"image7": "Alvorada",
"desktopShareError": "Não foi possível compartilhar o desktop",
"desktopShare": "Compartilhar desktop",
"webAssemblyWarning": "Não há suporte para WebAssembly"
},
"feedback": {
"average": "Média",
@@ -352,7 +392,8 @@
"good": "Boa",
"rateExperience": "Avalie sua experiência na reunião",
"veryBad": "Muito ruim",
"veryGood": "Muito boa"
"veryGood": "Muito boa",
"star": "Estrela"
},
"incomingCall": {
"answer": "Responder",
@@ -369,6 +410,7 @@
"country": "País",
"dialANumber": "Para entrar na reunião, disque um desses números e depois insira o PIN.",
"dialInConferenceID": "PIN:",
"copyNumber": "Copiar número",
"dialInNotSupported": "Desculpe, a discagem não é atualmente suportada.",
"dialInNumber": "Discar:",
"dialInSummaryError": "Ocorreu um erro ao buscar a informação de discagem. Tente novamente mais tarde.",
@@ -377,6 +419,11 @@
"inviteLiveStream": "Para ver a transmissão ao vivo da reunião, clique no link: {{url}}",
"invitePhone": "Para participar por telefone, toque aqui: {{number}},,{{conferenceID}}#\n",
"invitePhoneAlternatives": "Procurando um número de discagem diferente?\nVeja os números de discagem da reunião: {{url}} \n\n\nSe você também estiver discando através de um telefone da sala, participe sem conectar-se ao áudio: {{silentUrl}}",
"inviteSipEndpoint": "Para participar usando o endereço SIP, insira isto: {{sipUri}}",
"inviteTextiOSPersonal": "{{name}} está convidando você para uma reunião.",
"inviteTextiOSJoinSilent": "Se você estiver discando através de um telefone da sala, use este link para participar sem conectar-se ao áudio: {{silentUrl}}.",
"inviteTextiOSInviteUrl": "Clique no seguinte link para entrar: {{inviteUrl}}.",
"inviteTextiOSPhone": "Para participar por telefone, use este número: {{number}},,{{conferenceID}}#. Se você estiver procurando um número diferente, esta é a lista completa: {{didUrl}}.",
"inviteURLFirstPartGeneral": "Você foi convidado para uma reunião.",
"inviteURLFirstPartPersonal": "{{name}} está convidando você para uma reunião.\n",
"inviteURLSecondPart": "\nEntre na reunião:\n{{url}}\n",
@@ -387,6 +434,7 @@
"noRoom": "Nenhuma sala foi especificada para entrar.",
"numbers": "Números de discagem",
"password": "$t(lockRoomPasswordUppercase):",
"sip": "endereço SIP",
"title": "Compartilhar",
"tooltip": "Compartilhar link e discagem para esta reunião",
"label": "Informações da reunião"
@@ -405,6 +453,7 @@
"support": "Suporte",
"supportMsg": "Se isso continuar acontecendo, chegar a"
},
"jitsiHome": "Logo de {{logo}} (direciona para página inicial)",
"keyboardShortcuts": {
"focusLocal": "Focar no seu vídeo",
"focusRemote": "Focar no vídeo de outro participante",
@@ -417,10 +466,10 @@
"showSpeakerStats": "Exibir estatísticas do alto falante",
"toggleChat": "Abrir ou fechar o painel de bate-papo",
"toggleFilmstrip": "Mostrar ou ocultar miniaturas de vídeo",
"toggleParticipantsPane": "Exibir ou ocultar o quadro de participantes",
"toggleScreensharing": "Trocar entre câmera e compartilhamento de tela",
"toggleShortcuts": "Mostrar ou ocultar atalhos de teclado",
"videoMute": "Iniciar ou parar sua câmera",
"videoQuality": "Gerenciar qualidade da chamada"
"videoMute": "Iniciar ou parar sua câmera"
},
"liveStreaming": {
"limitNotificationDescriptionWeb": "Devido a alta demanda sua transmissão será limitada a {{limit}} minutos. Para transmissão ilimitada tente <a href={{url}} rel='noopener noreferrer' target='_blank'>{{app}}</a>.",
@@ -496,19 +545,24 @@
"focus": "Foco da conferência",
"focusFail": "{{component}} não disponível - tente em {{ms}} seg",
"grantedTo": "Direitos de moderador concedido para {{to}}!",
"hostAskedUnmute": "O anfitrião deseja que você ative o som",
"invitedOneMember": "{{name}} foi convidado(a)",
"invitedThreePlusMembers": "{{name}} e {{count}} outros foram convidados",
"invitedTwoMembers": "{{first}} e {{second}} foram convidados",
"kickParticipant": "{{kicked}} foi chutado por {{kicker}}",
"kickParticipant": "{{kicked}} foi removido por {{kicker}}",
"me": "Eu",
"moderator": "Direitos de moderador concedidos!",
"muted": "Você iniciou uma conversa em mudo.",
"mutedTitle": "Você está mudo!",
"mutedRemotelyTitle": "Você foi silenciado por {{participantDisplayName}}!",
"mutedRemotelyDescription": "Você sempre pode ativar o som quando estiver pronto para falar. Retire o som quando terminar para manter o ruído longe da reunião.",
"videoMutedRemotelyTitle": "Sua câmera foi desativada por {{participantDisplayName}}!",
"videoMutedRemotelyDescription": "Você pode ativar sua câmera a qualquer momento.",
"passwordRemovedRemotely": "$t(lockRoomPasswordUppercase) removido por outro participante",
"passwordSetRemotely": "$t(lockRoomPasswordUppercase) definido por outro participante",
"raisedHand": "{{name}} gostaria de falar.",
"screenShareNoAudio": "O compartilhamento de áudio não foi selecionado na tela de escolha de janela.",
"screenShareNoAudioTitle": "Compartilhamento de áudio não selecionado",
"somebody": "Alguém",
"startSilentTitle": "Você entrou sem saída de áudio!",
"startSilentDescription": "Volte à reunião para habilitar o áudio",
@@ -521,18 +575,41 @@
"OldElectronAPPTitle": "Vulnerabilidade de segurança!",
"oldElectronClientDescription1": "Você está usando um versão antiga do cliente Jitsi Meet que possui uma conhecida vulnerabilidade de segurança. Por favor tenha certeza de atulizar para a nossa ",
"oldElectronClientDescription2": "última versão",
"oldElectronClientDescription3": " agora!"
"oldElectronClientDescription3": " agora!",
"moderationInEffectDescription": "Levante a mão se quiser falar",
"moderationInEffectCSDescription": "Levante a mão se quiser compartilhar seu vídeo",
"moderationInEffectVideoDescription": "Levante a mão se quiser que seu vídeo fique visível",
"moderationInEffectTitle": "O microfone foi silenciado pelo moderador",
"moderationInEffectCSTitle": "O compartilhamento de conteúdo foi desativado pelo moderador",
"moderationInEffectVideoTitle": "O vídeo foi desativado pelo moderador",
"moderationRequestFromModerator": "O anfitrião deseja que você ative o som",
"moderationRequestFromParticipant": "Quer falar",
"moderationStartedTitle": "Moderação iniciada",
"moderationStoppedTitle": "Moderação encerrada",
"moderationToggleDescription": "por {{participantDisplayName}}",
"raiseHandAction": "Levantar a mão",
"groupTitle": "Notificações"
},
"participantsPane": {
"close": "Fechar",
"headings": {
"lobby": "Sala de espera ({{count}})",
"participantsList": "Participantes da reunião ({{count}})"
},
"actions": {
"invite": "Convidar alguém",
"muteAll": "Silenciar todos",
"stopVideo": "Parar vídeo"
"participantsPane": {
"close": "Fechar",
"header": "Participantes",
"headings": {
"lobby": "Sala de espera ({{count}})",
"participantsList": "Participantes da reunião ({{count}})",
"waitingLobby": "Aguardando na sala de espera ({{count}})"
},
"actions": {
"allow": "Permitir aos participantes:",
"blockEveryoneMicCamera": "Bloquear microfone e câmera de todos",
"invite": "Convidar alguém",
"askUnmute": "Pedir para ativar som",
"mute": "Silenciar",
"muteAll": "Silenciar todos",
"muteEveryoneElse": "Silenciar todos os demais",
"startModeration": "Ativar som eles mesmos ou iniciar vídeo",
"stopEveryonesVideo": "Parar vídeo de todos",
"stopVideo": "Parar vídeo",
"unblockEveryoneMicCamera": "Desbloquear microfone e câmera de todos"
}
},
"passwordSetRemotely": "Definido por outro participante",
@@ -588,7 +665,8 @@
"lookGood": "Seu microfone está funcionando corretamente",
"or": "ou",
"premeeting": "Pré-reunião",
"showScreen": "Habiltar tela pré-reunião",
"showScreen": "Habilitar tela pré-reunião",
"keyboardShortcuts": "Habilitar atalhos de teclado",
"startWithPhone": "Iniciar com o áudio da ligação",
"screenSharingError": "Erro de compartilhamento de tela:",
"videoOnlyError": "Erro de vídeo:",
@@ -610,6 +688,7 @@
"ringing": "Tocando..."
},
"profile": {
"avatar": "avatar",
"setDisplayNameLabel": "Definir seu nome de exibição",
"setEmailInput": "Digite e-mail",
"setEmailLabel": "Definir seu e-mail de Gravatar",
@@ -624,12 +703,15 @@
"beta": "BETA",
"busy": "Estamos trabalhando para liberar recursos de gravação. Tente novamente em alguns minutos.",
"busyTitle": "Todas as gravações estão atualmente ocupadas",
"copyLink": "Copiar Link",
"error": "A gravação falhou. Tente novamente.",
"errorFetchingLink": "Erro ao buscar link da gravação.",
"expandedOff": "Gravação finalizada",
"expandedOn": "A reunião está sendo gravada.",
"expandedPending": "Iniciando gravação...",
"failedToStart": "Falha ao iniciar a gravação",
"fileSharingdescription": "Compartilhar gravação com participantes da reunião",
"linkGenerated": "Geramos um link para sua gravação.",
"live": "AOVIVO",
"loggedIn": "Conectado como {{userName}}",
"off": "Gravação parada",
@@ -639,11 +721,13 @@
"pending": "Preparando para gravar a reunião...",
"rec": "REC",
"serviceDescription": "Sua gravação será salva pelo serviço de gravação",
"serviceDescriptionCloud": "Gravação na nuvem",
"serviceName": "Serviço de gravação",
"signIn": "Entrar",
"signOut": "Sair",
"unavailable": "Oops! O {{serviceName}} está indisponível. Estamos trabalhando para resolver o problema. Por favor, tente mais tarde.",
"unavailableTitle": "Gravação indisponível"
"unavailableTitle": "Gravação indisponível",
"uploadToCloud": "Enviar para a nuvem"
},
"sectionList": {
"pullToRefresh": "Puxe para atualizar"
@@ -662,8 +746,13 @@
"signedIn": "Atualmente acessando eventos do calendário para {{email}}. Clique no botão Desconectar abaixo para parar de acessar os eventos da agenda.",
"title": "Calendário"
},
"desktopShareFramerate": "Taxa de quadros do compartilhamento de desktop",
"desktopShareWarning": "Você precisa reiniciar o compartilhamento de tela para que as novas configurações tenham efeito.",
"desktopShareHighFpsWarning": "Uma taxa de quadros mais alta para compartilhamento de desktop pode afetar sua largura de banda. Você precisa reiniciar o compartilhamento de tela para que as novas configurações tenham efeito.",
"devices": "Dispositivos",
"followMe": "Todos me seguem",
"framesPerSecond": "quadros por segundo",
"incomingMessage": "Mensagem recebida",
"language": "Idioma",
"loggedIn": "Conectado como {{name}}",
"microphones": "Microfones",
@@ -671,12 +760,18 @@
"more": "Mais",
"name": "Nome",
"noDevice": "Nenhum",
"participantJoined": "Participante Entrou",
"participantLeft": "Participante Saiu",
"playSounds": "Tocar sons",
"sameAsSystem": "Igual ao sistema ({{label}})",
"selectAudioOutput": "Saída de áudio",
"selectCamera": "Câmera",
"selectMic": "Microfone",
"sounds": "Sons",
"speakers": "Alto-faltantes",
"startAudioMuted": "Todos iniciam mudos",
"startVideoMuted": "Todos iniciam ocultos",
"talkWhileMuted": "Falar mesmo silenciado",
"title": "Configurações"
},
"settingsView": {
@@ -716,6 +811,7 @@
},
"startupoverlay": {
"policyText": " ",
"genericTitle": "A reunião precisa usar seu microfone e câmera.",
"title": "O {{app}} precisa usar seu microfone e câmera."
},
"suspendedoverlay": {
@@ -727,12 +823,14 @@
"accessibilityLabel": {
"audioOnly": "Alternar para apenas áudio",
"audioRoute": "Selecionar o dispositivo de som",
"boo": "Vaia",
"callQuality": "Gerenciar qualidade do vídeo",
"cc": "Alternar legendas",
"chat": "Alternar para janela de chat",
"clap": "Aplauso",
"document": "Alternar para documento compartilhado",
"download": "Baixe nossos aplicativos",
"embedMeeting": "Reunião em modo compacto",
"embedMeeting": "Reunião em formato compacto",
"feedback": "Deixar feedback",
"fullScreen": "Alternar para tela cheia",
"grantModerator": "Atribuir Moderador",
@@ -740,6 +838,8 @@
"help": "Ajuda",
"invite": "Convidar pessoas",
"kick": "Remover participante",
"laugh": "Risada",
"like": "Gostei",
"lobbyButton": "Habilitar/desabilitar sala de espera",
"localRecording": "Alternar controles de gravação local",
"lockRoom": "Ativar/desativar senha de reunião",
@@ -748,36 +848,51 @@
"moreOptions": "Mostrar mais opções",
"mute": "Alternar mudo do áudio",
"muteEveryone": "Silenciar todos",
"muteEveryoneElse": "Silenciar todos os demais",
"muteEveryonesVideo": "Desativar a câmera de todos",
"muteEveryoneElsesVideo": "Desativar a câmera de todos os demais",
"participants": "Participantes",
"party": "Festa",
"pip": "Alternar modo Picture-in-Picture",
"privateMessage": "Enviar mensagem privada",
"profile": "Editar seu perfil",
"raiseHand": "Alternar levantar a mão",
"reactionsMenu": "Abrir / fechar menu de reações",
"recording": "Alternar gravação",
"remoteMute": "Silenciar participante",
"remoteVideoMute": "Desativar a câmera do participante",
"security": "Opções de segurança",
"Settings": "Alternar configurações",
"shareaudio": "Compartilhar áudio",
"sharedvideo": "Alternar compartilhamento de vídeo do YouTube",
"shareRoom": "Convidar alguém",
"shareYourScreen": "Alternar compartilhamento de tela",
"shortcuts": "Alternar atalhos",
"show": "Mostrar no palco",
"speakerStats": "Alternar estatísticas do apresentador",
"surprised": "Surpresa",
"tileView": "Alternar visualização em blocos",
"toggleCamera": "Alternar câmera",
"toggleFilmstrip": "Alterar tira de filme",
"videomute": "Alternar mudo do vídeo",
"videoblur": "Alternar desfoque de vídeo"
"videoblur": "Alternar desfoque de vídeo",
"selectBackground": "Selecionar Fundo",
"expand": "Expandir",
"collapse": "Recolher"
},
"addPeople": "Adicionar pessoas à sua chamada",
"audioSettings": "Configurações de áudio",
"videoSettings": "Configurações de vídeo",
"audioOnlyOff": "Desabilitar modo de largura de banda baixa",
"audioOnlyOn": "Habilitar modo de largura de banda baixa",
"audioRoute": "Selecionar o dispositivo de som",
"authenticate": "Autenticar",
"boo": "Vaia",
"callQuality": "Gerenciar qualidade do vídeo",
"chat": "Abrir ou fechar o bate-papo",
"clap": "Aplauso",
"closeChat": "Fechar chat",
"closeReactionsMenu": "Fechar menu de reações",
"documentClose": "Fechar documento compartilhado",
"documentOpen": "Abrir documento compartilhado",
"download": "Baixe nossos aplicativos",
@@ -791,6 +906,8 @@
"hangup": "Sair",
"help": "Ajuda",
"invite": "Convidar pessoas",
"laugh": "Risada",
"like": "Gostei",
"lobbyButtonDisable": "Desabilitar sala de espera",
"lobbyButtonEnable": "Habilitar sala de espera",
"login": "Iniciar sessão",
@@ -800,6 +917,7 @@
"moreOptions": "Mais opções",
"mute": "Mudo / Não mudo",
"muteEveryone": "Silenciar todos",
"muteEveryonesVideo": "Desativar a câmera de todos",
"noAudioSignalTitle": "Não há entrada de áudio vindo do seu microfone!",
"noAudioSignalDesc": "Se você não o desativou propositalmente das configurações do sistema ou do hardware, considere trocar o dispositivo.",
"noAudioSignalDescSuggestion": "Se você não o desativou propositalmente das configurações do sistema ou do hardware, considere trocar para o dispositivo sugerido.",
@@ -808,28 +926,38 @@
"noisyAudioInputTitle": "O seu microfone parece estar barulhento!",
"noisyAudioInputDesc": "Parece que o microfone está fazendo barulho, considere silenciar ou alterar o dispositivo.",
"openChat": "Abrir chat",
"openReactionsMenu": "Abrir menu de reações",
"participants": "Participantes",
"party": "Festa",
"pip": "Entrar em modo Quadro-a-Quadro",
"privateMessage": "Enviar mensagem privada",
"profile": "Editar seu perfil",
"raiseHand": "Erguer / Baixar sua mão",
"raiseYourHand": "Levantar a mão",
"reactionBoo": "Enviar reação de vaia",
"reactionClap": "Enviar reação de aplauso",
"reactionLaugh": "Enviar reação de risada",
"reactionLike": "Enviar reação de gostei",
"reactionParty": "Enviar reação de festa",
"reactionSurprised": "Enviar reação de surpresa",
"security": "Opções de segurança",
"Settings": "Configurações",
"shareaudio": "Compartilhar áudio",
"sharedvideo": "Compartilhar um vídeo do YouTube",
"shareRoom": "Convidar alguém",
"shortcuts": "Ver atalhos",
"speakerStats": "Estatísticas do Apresentador",
"startScreenSharing": "Iniciar compart. de tela",
"startSubtitles": "Iniciar legendas",
"stopAudioSharing": "Parar compart. de áudio",
"stopScreenSharing": "Parar compart. de tela",
"stopSubtitles": "Parar legendas",
"stopSharedVideo": "Parar vídeo do YouTube",
"surprised": "Surpresa",
"talkWhileMutedPopup": "Tentando falar? Você está em mudo.",
"tileViewToggle": "Alternar visualização em blocos",
"toggleCamera": "Alternar câmera",
"videomute": "Iniciar ou parar a câmera",
"startvideoblur": "Desfocar meu plano de fundo",
"stopvideoblur": "Desativar desfoque de fundo",
"selectBackground": "Selecionar fundo"
},
"transcribing": {
@@ -856,6 +984,7 @@
"react-nativeGrantPermissions": "Selecione <b><i>Permitir</i></b> quando seu navegador perguntar pelas permissões.",
"safariGrantPermissions": "Selecione <b><i>OK</i></b> quando seu navegador perguntar pelas permissões."
},
"volumeSlider": "Controle de volume",
"videoSIPGW": {
"busy": "Estamos trabalhando para liberar recursos. Por favor, tente novamente em alguns minutos.",
"busyTitle": "O serviço da sala está ocupado",
@@ -878,26 +1007,29 @@
"ld": "LD",
"ldTooltip": "Ver vídeo em baixa definição",
"lowDefinition": "Baixa definição (LD)",
"onlyAudioAvailable": "Somente áudio disponível",
"onlyAudioSupported": "Suportamos somente áudio neste navegador.",
"sd": "SD",
"sdTooltip": "Ver vídeo em definição padrão",
"standardDefinition": "Definição padrão"
},
"videothumbnail": {
"connectionInfo": "Informações da Conexão",
"domute": "Mudo",
"domuteVideo": "Desativar a câmera",
"domuteOthers": "Silenciar todos os demais",
"domuteVideoOfOthers": "Desativar a câmera de todos os demais",
"flip": "Inverter",
"grantModerator": "Atribuir Moderador",
"kick": "Expulsar",
"kick": "Remover",
"moderator": "Moderador",
"mute": "Participante está mudo",
"muted": "Mudo",
"videoMuted": "Câmera desativada",
"remoteControl": "Controle remoto",
"show": "Mostrar no palco",
"videomute": "O participante parou a câmera"
},
"welcomepage": {
"addMeetingName": "Adicionar nome da reunião",
"accessibilityLabel": {
"join": "Toque para entrar",
"roomname": "Digite o nome da sala"
@@ -914,8 +1046,14 @@
"getHelp": "Obter ajuda",
"go": "IR",
"goSmall": "IR",
"join": "CRIAR / ENTRAR",
"headerTitle": "Jitsi Meet",
"headerSubtitle": "Reuniões com segurança e alta qualidade",
"info": "Informações",
"join": "CRIAR / ENTRAR",
"jitsiOnMobile": "Jitsi em dispositivos móveis baixe nossos aplicativos e inicie uma reunião em qualquer lugar",
"mobileDownLoadLinkIos": "Baixar aplicativo móvel para iOS",
"mobileDownLoadLinkAndroid": "Baixar aplicativo móvel para Android",
"mobileDownLoadLinkFDroid": "Baixar aplicativo móvel para F-Droid",
"moderatedMessage": "Ou <a href=\"{{url}}\" rel=\"noopener noreferrer\" target=\"_blank\">agende uma URL de reunião</a> antes, onde você é o único moderador.",
"privacy": "Política de Privacidade",
"recentList": "Recente",
@@ -926,27 +1064,38 @@
"roomname": "Digite o nome da sala",
"roomnameHint": "Digite o nome ou a URL da sala que você deseja entrar. Você pode digitar um nome, e apenas deixe para as pessoas que você quer se reunir digitem o mesmo nome.",
"sendFeedback": "Enviar comentários",
"startMeeting": "Iniciar reunião",
"terms": "Termos",
"title": "Videoconferências mais seguras, flexíveis e totalmente gratuitas"
"title": "Videoconferências mais seguras, flexíveis e totalmente gratuitas",
"logo": {
"calendar": "Logo do Calendário",
"microsoftLogo": "Logo da Microsoft",
"logoDeepLinking": "Logo do Jitsi Meet",
"desktopPreviewThumbnail": "Miniatura de Visualização do Desktop",
"googleLogo": "Logo do Google",
"policyLogo": "Logo da Política de Privacidade"
}
},
"lonelyMeetingExperience": {
"youAreAlone": "Você é o único na reunião",
"button": "Convidar outros"
"button": "Convidar outros",
"youAreAlone": "Você é o único na reunião"
},
"helpView": {
"header": "Centro de ajuda"
},
"lobby": {
"admit": "Aceitar",
"admitAll": "Aceitar todos",
"knockingParticipantList": "Remover lista de participantes",
"allow": "Permitir",
"backToKnockModeButton": "Sem senha, peça para se juntar",
"dialogTitle": "modo Lobby",
"disableDialogContent": "O modo Lobby está habilitado. Este recurso evita que particpantes não convidados juntem-se à sua conferência. Deseja desabilitar?",
"dialogTitle": "Modo sala de espera",
"disableDialogContent": "O modo sala de espera está habilitado. Este recurso evita que particpantes não convidados juntem-se à sua conferência. Deseja desabilitar?",
"disableDialogSubmit": "Desabilitar",
"emailField": "Informe seu email",
"enableDialogPasswordField": "Definir senha (opcional)",
"enableDialogSubmit": "Habilitar",
"enableDialogText": "O modo Lobby protege a sua conferência, permitindo a entrada de participantes apenas após a aprovação formal do moderador.",
"enableDialogText": "O modo sala de espera protege a sua conferência, permitindo a entrada de participantes apenas após a aprovação formal do moderador.",
"enterPasswordButton": "Informe a senha da conferência",
"enterPasswordTitle": "Informe a senha para se juntar à conferência",
"invalidPassword": "Senha inválida",
@@ -961,12 +1110,13 @@
"nameField": "Informe seu nome",
"notificationLobbyAccessDenied": "{{targetParticipantName}} foi rejeitado por {{originParticipantName}}",
"notificationLobbyAccessGranted": "{{targetParticipantName}} foi aceito por {{originParticipantName}}",
"notificationLobbyDisabled": "Sala de Espera foi desabilitada por {{originParticipantName}}",
"notificationLobbyEnabled": "Sala de Espera foi habilitada por {{originParticipantName}}",
"notificationLobbyDisabled": "Sala de espera foi desabilitada por {{originParticipantName}}",
"notificationLobbyEnabled": "Sala de espera foi habilitada por {{originParticipantName}}",
"notificationTitle": "Sala de espera",
"passwordField": "Informe a senha da conferência",
"passwordJoinButton": "Solicitar",
"reject": "Rejeitar",
"toggleLabel": "Habilitar lobby"
"rejectAll": "Rejeitar todos",
"toggleLabel": "Habilitar sala de espera"
}
}

View File

@@ -58,7 +58,7 @@
"today": "Today"
},
"chat": {
"enter": "Enter chat room",
"enter": "Enter room",
"error": "Error: your message was not sent. Reason: {{error}}",
"fieldPlaceHolder": "Type your message here",
"messagebox": "Type a message",
@@ -66,15 +66,19 @@
"noMessagesMessage": "There are no messages in the meeting yet. Start a conversation here!",
"nickname": {
"popover": "Choose a nickname",
"title": "Enter a nickname to use chat"
"title": "Enter a nickname to use chat and polls"
},
"privateNotice": "Private message to {{recipient}}",
"title": "Chat",
"you": "you",
"message": "Message",
"messageAccessibleTitle": "{{user}} says:",
"messageAccessibleTitleMe": "me says:",
"smileysPanel": "Emoji panel"
"smileysPanel": "Emoji panel",
"tabs": {
"chat": "Chat",
"polls": "Polls"
},
"title": "Chat and Polls",
"you": "you"
},
"chromeExtensionBanner": {
"installExtensionText": "Install the extension for Google Calendar and Office 365 integration",
@@ -614,6 +618,34 @@
},
"passwordSetRemotely": "Set by another participant",
"passwordDigitsOnly": "Up to {{number}} digits",
"polls": {
"create": {
"addOption": "Add option",
"answerPlaceholder": "Option {{index}}",
"create": "Create a poll",
"cancel": "Cancel",
"pollOption" : "Poll option {{index}}",
"pollQuestion" : "Poll Question",
"questionPlaceholder": "Ask a question",
"removeOption": "Remove option",
"send": "Send"
},
"answer": {
"skip": "Skip",
"submit": "Submit"
},
"results": {
"vote": "Vote",
"changeVote": "Change vote",
"empty": "There are no polls in the meeting yet. Start a poll here!",
"hideDetailedResults": "Hide details",
"showDetailedResults": "Show details"
},
"notification": {
"title": "A new poll was added to this meeting",
"description": "Open polls tab to vote"
}
},
"poweredby": "powered by",
"prejoin": {
"audioAndVideoError": "Audio and video error:",
@@ -802,6 +834,7 @@
},
"speaker": "Speaker",
"speakerStats": {
"search": "Search",
"hours": "{{count}}h",
"minutes": "{{count}}m",
"name": "Name",

View File

@@ -12,9 +12,6 @@ var loggingConfig = {
// {@link #defaultLogLevel}:
'modules/RTC/TraceablePeerConnection.js': 'info',
'modules/statistics/CallStats.js': 'info',
'modules/sdp/SDPUtil.js': 'info',
'modules/xmpp/JingleSessionPC.js': 'info',
'modules/xmpp/strophe.jingle.js': 'info',
'modules/xmpp/strophe.util.js': 'log'
};

4
package-lock.json generated
View File

@@ -11087,8 +11087,8 @@
}
},
"lib-jitsi-meet": {
"version": "github:jitsi/lib-jitsi-meet#6a3df11ffa7a2204b579326e23cdaa85a79521d1",
"from": "github:jitsi/lib-jitsi-meet#6a3df11ffa7a2204b579326e23cdaa85a79521d1",
"version": "github:jitsi/lib-jitsi-meet#c23abfa2bcd2b04710e4180f9b878bacba33ba16",
"from": "github:jitsi/lib-jitsi-meet#c23abfa2bcd2b04710e4180f9b878bacba33ba16",
"requires": {
"@jitsi/js-utils": "1.0.2",
"@jitsi/sdp-interop": "github:jitsi/sdp-interop#5fc4af6dcf8a6e6af9fedbcd654412fd47b1b4ae",

View File

@@ -56,7 +56,7 @@
"jquery-i18next": "1.2.1",
"js-md5": "0.6.1",
"jwt-decode": "2.2.0",
"lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#6a3df11ffa7a2204b579326e23cdaa85a79521d1",
"lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#c23abfa2bcd2b04710e4180f9b878bacba33ba16",
"libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
"lodash": "4.17.21",
"moment": "2.29.1",

View File

@@ -34,6 +34,8 @@ import '../large-video/middleware';
import '../lobby/middleware';
import '../notifications/middleware';
import '../overlay/middleware';
import '../polls/middleware';
import '../polls/subscriber';
import '../reactions/middleware';
import '../recent-list/middleware';
import '../recording/middleware';

View File

@@ -41,6 +41,7 @@ import '../lobby/reducer';
import '../notifications/reducer';
import '../overlay/reducer';
import '../participants-pane/reducer';
import '../polls/reducer';
import '../reactions/reducer';
import '../recent-list/reducer';
import '../recording/reducer';

View File

@@ -53,20 +53,20 @@ export const disableModeration = (mediaType: MediaType, actor: Object) => {
* @returns {Object}
*/
export function dismissPendingAudioParticipant(participant: Object) {
return dismissPendingParticipant(participant, MEDIA_TYPE.AUDIO);
return dismissPendingParticipant(participant.id, MEDIA_TYPE.AUDIO);
}
/**
* Hides the notification with the participant that asked to unmute.
*
* @param {Object} participant - The participant for which the notification to be hidden.
* @param {string} id - The participant id for which the notification to be hidden.
* @param {MediaType} mediaType - The media type.
* @returns {Object}
*/
export function dismissPendingParticipant(participant: Object, mediaType: MediaType) {
export function dismissPendingParticipant(id: string, mediaType: MediaType) {
return {
type: DISMISS_PENDING_PARTICIPANT,
participant,
id,
mediaType
};
}

View File

@@ -135,7 +135,7 @@ ReducerRegistry.register('features/av-moderation', (state = initialState, action
}
if (videoModerationEnabled) {
hasStateChanged = _updatePendingParticipant(MEDIA_TYPE.VIDEO, participant, state);
hasStateChanged = hasStateChanged || _updatePendingParticipant(MEDIA_TYPE.VIDEO, participant, state);
}
// If the state has changed we need to return a new object reference in order to trigger subscriber updates.
@@ -183,19 +183,19 @@ ReducerRegistry.register('features/av-moderation', (state = initialState, action
}
case DISMISS_PENDING_PARTICIPANT: {
const { participant, mediaType } = action;
const { id, mediaType } = action;
if (mediaType === MEDIA_TYPE.AUDIO) {
return {
...state,
pendingAudio: state.pendingAudio.filter(pending => pending.id !== participant.id)
pendingAudio: state.pendingAudio.filter(pending => pending.id !== id)
};
}
if (mediaType === MEDIA_TYPE.VIDEO) {
return {
...state,
pendingVideo: state.pendingVideo.filter(pending => pending.id !== participant.id)
pendingVideo: state.pendingVideo.filter(pending => pending.id !== id)
};
}

View File

@@ -3,6 +3,7 @@
import _ from 'lodash';
import { getName } from '../../app/functions';
import { determineTranscriptionLanguage } from '../../transcribing/functions';
import { JitsiTrackErrors } from '../lib-jitsi-meet';
import {
getLocalParticipant,
@@ -231,6 +232,7 @@ export function getConferenceOptions(stateful: Function | Object) {
}
options.applicationName = getName();
options.transcriptionLanguage = determineTranscriptionLanguage(options);
// Disable analytics, if requessted.
if (options.disableThirdPartyRequests) {

View File

@@ -50,6 +50,7 @@ export default [
*/
'callHandle',
'callStatsConfIDNamespace',
'callStatsConfigParams',
'callStatsID',
'callStatsSecret',
@@ -91,6 +92,7 @@ export default [
'disableJoinLeaveSounds',
'disableLocalVideoFlip',
'disableNS',
'disablePolls',
'disableProfile',
'disableRemoteControl',
'disableRemoteMute',
@@ -98,6 +100,7 @@ export default [
'disableRtx',
'disableShortcuts',
'disableShowMoreStats',
'disableSpeakerStatsSearch',
'disableSimulcast',
'disableThirdPartyRequests',
'disableTileView',

View File

@@ -50,7 +50,7 @@ class BaseDialog<P: Props, S: State> extends AbstractDialog<P, S> {
* @returns {ReactElement}
*/
render() {
const { _dialogStyles, style } = this.props;
const { _dialogStyles, style, t, titleKey } = this.props;
return (
<TouchableWithoutFeedback>
@@ -65,13 +65,18 @@ class BaseDialog<P: Props, S: State> extends AbstractDialog<P, S> {
_dialogStyles.dialog,
style
] }>
<TouchableOpacity
onPress = { this._onCancel }
style = { styles.closeWrapper }>
<Icon
src = { IconClose }
style = { _dialogStyles.closeStyle } />
</TouchableOpacity>
<View style = { styles.headerWrapper }>
<Text style = { styles.dialogTitle }>
{ titleKey ? t(titleKey) : ' ' }
</Text>
<TouchableOpacity
onPress = { this._onCancel }
style = { styles.closeWrapper }>
<Icon
src = { IconClose }
style = { _dialogStyles.closeStyle } />
</TouchableOpacity>
</View>
{ this._renderContent() }
</View>
</KeyboardAvoidingView>

View File

@@ -28,6 +28,12 @@ type Props = BaseProps & {
*/
contentKey: string | { key: string, params: Object},
/**
* The handler for the event when clicking the 'confirmNo' button.
* Defaults to onCancel if absent.
*/
onDecline?: Function,
t: Function
}
@@ -55,11 +61,11 @@ class ConfirmDialog extends BaseSubmitDialog<Props, *> {
* @inheritdoc
*/
_renderAdditionalButtons() {
const { _dialogStyles, cancelKey, t } = this.props;
const { _dialogStyles, cancelKey, onDecline, t } = this.props;
return (
<TouchableOpacity
onPress = { this._onCancel }
onPress = { onDecline || this._onCancel }
style = { [
_dialogStyles.button,
brandedDialog.buttonFarLeft,

View File

@@ -81,10 +81,20 @@ export const brandedDialog = {
},
closeWrapper: {
alignSelf: 'flex-end',
padding: BoxModel.padding
},
dialogTitle: {
fontWeight: 'bold',
paddingLeft: BoxModel.padding * 2
},
headerWrapper: {
alignItems: 'center',
flexDirection: 'row',
justifyContent: 'space-between'
},
mainWrapper: {
alignSelf: 'stretch',
padding: BoxModel.padding * 2,

View File

@@ -71,6 +71,12 @@ type Props = {
*/
isModal: boolean,
/**
* The handler for the event when clicking the 'confirmNo' button.
* Defaults to onCancel if absent.
*/
onDecline?: Function,
/**
* Disables rendering of the submit button.
*/
@@ -268,7 +274,8 @@ class StatelessDialog extends Component<Props> {
}
const {
t /* The following fixes a flow error: */ = _.identity
t /* The following fixes a flow error: */ = _.identity,
onDecline
} = this.props;
return (
@@ -276,7 +283,7 @@ class StatelessDialog extends Component<Props> {
appearance = 'subtle'
id = { CANCEL_BUTTON_ID }
key = 'cancel'
onClick = { this._onCancel }
onClick = { onDecline || this._onCancel }
type = 'button'>
{ t(this.props.cancelKey || 'dialog.Cancel') }
</Button>

View File

@@ -92,6 +92,12 @@ export const IOS_RECORDING_ENABLED = 'ios.recording.enabled';
*/
export const IOS_SCREENSHARING_ENABLED = 'ios.screensharing.enabled';
/**
* Flag indicating if screen sharing should be enabled in android.
* Default: enabled (true).
*/
export const ANDROID_SCREENSHARING_ENABLED = 'android.screensharing.enabled';
/**
* Flag indicating if kickout is enabled.
* Default: enabled (true).

View File

@@ -64,3 +64,13 @@ export const SEND_MESSAGE = 'SEND_MESSAGE';
* }
*/
export const SET_PRIVATE_MESSAGE_RECIPIENT = 'SET_PRIVATE_MESSAGE_RECIPIENT';
/**
* The type of action which signals the update a _isPollsTabFocused.
*
* {
* isPollsTabFocused: boolean,
* type: SET_PRIVATE_MESSAGE_RECIPIENT
* }
*/
export const SET_IS_POLL_TAB_FOCUSED = 'SET_IS_POLL_TAB_FOCUSED';

View File

@@ -5,7 +5,8 @@ import {
CLEAR_MESSAGES,
CLOSE_CHAT,
SEND_MESSAGE,
SET_PRIVATE_MESSAGE_RECIPIENT
SET_PRIVATE_MESSAGE_RECIPIENT,
SET_IS_POLL_TAB_FOCUSED
} from './actionTypes';
/**
@@ -97,3 +98,16 @@ export function setPrivateMessageRecipient(participant: Object) {
type: SET_PRIVATE_MESSAGE_RECIPIENT
};
}
/**
* Set the value of _isPollsTabFocused.
*
* @param {boolean} isPollsTabFocused - The new value for _isPollsTabFocused.
* @returns {Function}
*/
export function setIsPollsTabFocused(isPollsTabFocused: boolean) {
return {
isPollsTabFocused,
type: SET_IS_POLL_TAB_FOCUSED
};
}

View File

@@ -4,7 +4,7 @@ import { Component } from 'react';
import type { Dispatch } from 'redux';
import { getLocalParticipant } from '../../base/participants';
import { sendMessage } from '../actions';
import { sendMessage, setIsPollsTabFocused } from '../actions';
import { SMALL_WIDTH_THRESHOLD } from '../constants';
/**
@@ -22,11 +22,31 @@ export type Props = {
*/
_isOpen: boolean,
/**
* True if the polls feature is enabled.
*/
_isPollsEnabled: boolean,
/**
* Whether the poll tab is focused or not.
*/
_isPollsTabFocused: boolean,
/**
* All the chat messages in the conference.
*/
_messages: Array<Object>,
/**
* Number of unread chat messages.
*/
_nbUnreadMessages: number,
/**
* Number of unread poll messages.
*/
_nbUnreadPolls: number,
/**
* Function to send a text message.
*
@@ -34,6 +54,20 @@ export type Props = {
*/
_onSendMessage: Function,
/**
* Function to display the chat tab.
*
* @protected
*/
_onToggleChatTab: Function,
/**
* Function to display the polls tab.
*
* @protected
*/
_onTogglePollsTab: Function,
/**
* Function to toggle the chat window.
*/
@@ -52,7 +86,7 @@ export type Props = {
/**
* Function to be used to translate i18n labels.
*/
t: Function
t: Function,
};
/**
@@ -71,6 +105,8 @@ export default class AbstractChat<P: Props> extends Component<P> {
// Bind event handlers so they are only bound once per instance.
this._onSendMessage = this._onSendMessage.bind(this);
this._onToggleChatTab = this._onToggleChatTab.bind(this);
this._onTogglePollsTab = this._onTogglePollsTab.bind(this);
}
_onSendMessage: (string) => void;
@@ -86,6 +122,30 @@ export default class AbstractChat<P: Props> extends Component<P> {
_onSendMessage(text: string) {
this.props.dispatch(sendMessage(text));
}
_onToggleChatTab: () => void;
/**
* Display the Chat tab.
*
* @private
* @returns {void}
*/
_onToggleChatTab() {
this.props.dispatch(setIsPollsTabFocused(false));
}
_onTogglePollsTab: () => void;
/**
* Display the Polls tab.
*
* @private
* @returns {void}
*/
_onTogglePollsTab() {
this.props.dispatch(setIsPollsTabFocused(true));
}
}
/**
@@ -101,13 +161,19 @@ export default class AbstractChat<P: Props> extends Component<P> {
* }}
*/
export function _mapStateToProps(state: Object) {
const { isOpen, messages } = state['features/chat'];
const { isOpen, isPollsTabFocused, messages, nbUnreadMessages } = state['features/chat'];
const { nbUnreadPolls } = state['features/polls'];
const _localParticipant = getLocalParticipant(state);
const { disablePolls } = state['features/base/config'];
return {
_isModal: window.innerWidth <= SMALL_WIDTH_THRESHOLD,
_isOpen: isOpen,
_isPollsEnabled: !disablePolls,
_isPollsTabFocused: isPollsTabFocused,
_messages: messages,
_nbUnreadMessages: nbUnreadMessages,
_nbUnreadPolls: nbUnreadPolls,
_showNamePrompt: !_localParticipant?.name
};
}

View File

@@ -1,12 +1,15 @@
// @flow
import React from 'react';
import { View } from 'react-native';
import { Button } from 'react-native-paper';
import { translate } from '../../../base/i18n';
import { JitsiModal } from '../../../base/modal';
import { connect } from '../../../base/redux';
import { PollsPane } from '../../../polls/components';
import { closeChat } from '../../actions.any';
import { CHAT_VIEW_MODAL_ID } from '../../constants';
import { BUTTON_MODES, CHAT_VIEW_MODAL_ID } from '../../constants';
import AbstractChat, {
_mapStateToProps,
type Props
@@ -15,6 +18,7 @@ import AbstractChat, {
import ChatInputBar from './ChatInputBar';
import MessageContainer from './MessageContainer';
import MessageRecipient from './MessageRecipient';
import styles from './styles';
/**
* Implements a React native component that renders the chat window (modal) of
@@ -45,10 +49,49 @@ class Chat extends AbstractChat<Props> {
}}
modalId = { CHAT_VIEW_MODAL_ID }
onClose = { this._onClose }>
<MessageContainer messages = { this.props._messages } />
<MessageRecipient />
<ChatInputBar onSend = { this._onSendMessage } />
{this.props._isPollsEnabled && <View style = { styles.tabContainer }>
<Button
color = '#17a0db'
mode = {
this.props._isPollsTabFocused
? BUTTON_MODES.CONTAINED
: BUTTON_MODES.TEXT
}
onPress = { this._onToggleChatTab }
style = { styles.tabLeftButton }
uppercase = { false }>
{`${this.props.t('chat.tabs.chat')}${this.props._isPollsTabFocused
&& this.props._nbUnreadMessages > 0
? `(${this.props._nbUnreadMessages})`
: ''
}`}
</Button>
<Button
color = '#17a0db'
mode = {
this.props._isPollsTabFocused
? BUTTON_MODES.TEXT
: BUTTON_MODES.CONTAINED
}
onPress = { this._onTogglePollsTab }
style = { styles.tabRightButton }
uppercase = { false }>
{`${this.props.t('chat.tabs.polls')}${!this.props._isPollsTabFocused
&& this.props._nbUnreadPolls > 0
? `(${this.props._nbUnreadPolls})`
: ''
}`}
</Button>
</View>}
{this.props._isPollsTabFocused
? <PollsPane />
: (
<>
<MessageContainer messages = { this.props._messages } />
<MessageRecipient />
<ChatInputBar onSend = { this._onSendMessage } />
</>
)}
</JitsiModal>
);
}
@@ -57,6 +100,9 @@ class Chat extends AbstractChat<Props> {
_onClose: () => boolean
_onTogglePollsTab: () => void;
_onToggleChatTab: () => void;
/**
* Closes the modal.
*

View File

@@ -124,6 +124,25 @@ export default {
timeText: {
color: 'rgb(164, 184, 209)',
fontSize: 13
},
tabContainer: {
flexDirection: 'row',
justifyContent: 'center'
},
tabLeftButton: {
flex: 1,
borderTopLeftRadius: 0,
borderTopRightRadius: 0,
borderBottomLeftRadius: 0
},
tabRightButton: {
flex: 1,
borderTopLeftRadius: 0,
borderTopRightRadius: 0,
borderBottomRightRadius: 0
}
};

View File

@@ -4,6 +4,7 @@ import React from 'react';
import { translate } from '../../../base/i18n';
import { connect } from '../../../base/redux';
import { PollsPane } from '../../../polls/components';
import { toggleChat } from '../../actions.web';
import AbstractChat, {
_mapStateToProps,
@@ -128,8 +129,20 @@ class Chat extends AbstractChat<Props> {
* @returns {ReactElement}
*/
_renderChat() {
if (this.props._isPollsTabFocused) {
return (
<>
{ this.props._isPollsEnabled && this._renderTabs()}
<PollsPane />
<KeyboardAvoider />
</>
);
}
return (
<>
{this.props._isPollsEnabled && this._renderTabs()}
<TouchmoveHack isModal = { this.props._isModal }>
<MessageContainer
messages = { this.props._messages }
@@ -144,6 +157,50 @@ class Chat extends AbstractChat<Props> {
);
}
/**
* Returns a React Element showing the Chat and Polls tab.
*
* @private
* @returns {ReactElement}
*/
_renderTabs() {
return (
<div className = { 'chat-tabs-container' }>
<div
className = { `chat-tab ${
this.props._isPollsTabFocused ? '' : 'chat-tab-focus'
}` }
onClick = { this._onToggleChatTab }>
<span className = { 'chat-tab-title' }>
{this.props.t('chat.tabs.chat')}
</span>
{this.props._isPollsTabFocused
&& this.props._nbUnreadMessages > 0 && (
<span className = { 'chat-tab-badge' }>
{this.props._nbUnreadMessages}
</span>
)}
</div>
<div
className = { `chat-tab ${
this.props._isPollsTabFocused ? 'chat-tab-focus' : ''
}` }
onClick = { this._onTogglePollsTab }>
<span className = { 'chat-tab-title' }>
{this.props.t('chat.tabs.polls')}
</span>
{!this.props._isPollsTabFocused
&& this.props._nbUnreadPolls > 0 && (
<span className = { 'chat-tab-badge' }>
{this.props._nbUnreadPolls}
</span>
)}
</div>
</div>
);
}
/**
* Instantiates a React Element to display at the top of {@code Chat} to
* close {@code Chat}.
@@ -233,6 +290,8 @@ class Chat extends AbstractChat<Props> {
_onToggleChat() {
this.props.dispatch(toggleChat());
}
_onTogglePollsTab: () => void;
_onToggleChatTab: () => void;
}

View File

@@ -3,6 +3,7 @@
import React, { Component } from 'react';
import { connect } from '../../../base/redux';
import { getUnreadPollCount } from '../../../polls/functions';
import { getUnreadCount } from '../../functions';
/**
@@ -64,8 +65,10 @@ function _mapStateToProps(state) {
const { isOpen } = state['features/chat'];
return {
_count: getUnreadCount(state),
_count: getUnreadCount(state) + getUnreadPollCount(state),
_isOpen: isOpen
};
}

View File

@@ -31,3 +31,11 @@ export const MESSAGE_TYPE_LOCAL = 'local';
export const MESSAGE_TYPE_REMOTE = 'remote';
export const SMALL_WIDTH_THRESHOLD = 580;
/**
* The modes of the buttons of the chat and polls tabs.
*/
export const BUTTON_MODES = {
CONTAINED: 'contained',
TEXT: 'text'
};

View File

@@ -78,3 +78,15 @@ export function getUnreadCount(state: Object) {
return messagesCount - (lastReadIndex + 1);
}
/**
* Selector for calculating the number of unread chat messages.
*
* @param {Object} state - The redux state.
* @returns {number} The number of unread messages.
*/
export function getUnreadMessagesCount(state: Object) {
const { nbUnreadMessages } = state['features/chat'];
return nbUnreadMessages;
}

View File

@@ -22,6 +22,7 @@ import {
import { MiddlewareRegistry, StateListenerRegistry } from '../base/redux';
import { playSound, registerSound, unregisterSound } from '../base/sounds';
import { openDisplayNamePrompt } from '../display-name';
import { resetNbUnreadPollsMessages } from '../polls/actions';
import { ADD_REACTION_MESSAGE } from '../reactions/actionTypes';
import { pushReactions } from '../reactions/actions.any';
import { getReactionMessageFromBuffer } from '../reactions/functions.any';
@@ -33,7 +34,7 @@ import {
setToolboxVisible
} from '../toolbox/actions.web';
import { ADD_MESSAGE, SEND_MESSAGE, OPEN_CHAT, CLOSE_CHAT } from './actionTypes';
import { ADD_MESSAGE, SEND_MESSAGE, OPEN_CHAT, CLOSE_CHAT, SET_IS_POLL_TAB_FOCUSED } from './actionTypes';
import { addMessage, clearMessages } from './actions';
import { closeChat } from './actions.any';
import { ChatPrivacyDialog } from './components';
@@ -112,15 +113,27 @@ MiddlewareRegistry.register(store => next => action => {
}
break;
case CLOSE_CHAT:
case CLOSE_CHAT: {
const isPollTabOpen = getState()['features/chat'].isPollsTabFocused;
unreadCount = 0;
if (typeof APP !== 'undefined') {
APP.API.notifyChatUpdated(unreadCount, false);
}
if (isPollTabOpen) {
dispatch(resetNbUnreadPollsMessages());
}
dispatch(setActiveModalId());
break;
}
case SET_IS_POLL_TAB_FOCUSED: {
dispatch(resetNbUnreadPollsMessages());
break;
}
case SEND_MESSAGE: {
const state = store.getState();

View File

@@ -7,13 +7,17 @@ import {
CLEAR_MESSAGES,
CLOSE_CHAT,
OPEN_CHAT,
SET_PRIVATE_MESSAGE_RECIPIENT
SET_PRIVATE_MESSAGE_RECIPIENT,
SET_IS_POLL_TAB_FOCUSED
} from './actionTypes';
const DEFAULT_STATE = {
isOpen: false,
isPollsTabFocused: false,
lastReadMessage: undefined,
lastReadPoll: undefined,
messages: [],
nbUnreadMessages: 0,
privateMessageRecipient: undefined
};
@@ -46,6 +50,7 @@ ReducerRegistry.register('features/chat', (state = DEFAULT_STATE, action) => {
...state,
lastReadMessage:
action.hasRead ? newMessage : state.lastReadMessage,
nbUnreadMessages: state.isPollsTabFocused ? state.nbUnreadMessages + 1 : state.nbUnreadMessages,
messages
};
}
@@ -78,6 +83,13 @@ ReducerRegistry.register('features/chat', (state = DEFAULT_STATE, action) => {
navigator.product === 'ReactNative' ? 0 : state.messages.length - 1],
privateMessageRecipient: action.participant
};
case SET_IS_POLL_TAB_FOCUSED: {
return {
...state,
isPollsTabFocused: action.isPollsTabFocused,
nbUnreadMessages: 0
}; }
}
return state;

View File

@@ -671,6 +671,10 @@ class Thumbnail extends Component<Props, State> {
statsPopoverPosition = 'left-start';
tooltipPosition = 'left';
break;
case LAYOUTS.HORIZONTAL_FILMSTRIP_VIEW:
statsPopoverPosition = 'top';
tooltipPosition = 'top';
break;
default:
statsPopoverPosition = 'auto';
tooltipPosition = 'top';

View File

@@ -21,14 +21,19 @@ type Props = {
className: string,
/**
* The `data-testid` used for the button.
* CSS id of the button.
*/
testId: string,
id?: string,
/**
* The participant.
*/
participant: Object
participant: Object,
/**
* The `data-testid` used for the button.
*/
testId: string
}
/**
@@ -36,7 +41,7 @@ type Props = {
*
* @returns {React$Element<'button'>}
*/
export default function({ action, children, className, testId, participant }: Props) {
export default function({ action, children, className, participant, id, testId }: Props) {
const dispatch = useDispatch();
const onClick = useCallback(() => dispatch(action(participant.id)), [ dispatch, participant ]);
@@ -44,6 +49,7 @@ export default function({ action, children, className, testId, participant }: Pr
<button
className = { className }
data-testid = { testId }
id = { id }
onClick = { onClick }
type = 'button'>
{ children }

View File

@@ -80,6 +80,7 @@ export default function({
{ <NotificationButton
action = { onApprove }
className = 'primary'
id = 'unmute-button'
participant = { p }
testId = { `${testIdPrefix}.allow` }>
{ approveButtonText }
@@ -87,6 +88,7 @@ export default function({
{ <NotificationButton
action = { onReject }
className = 'borderLess'
id = 'dismiss-button'
participant = { p }
testId = { `${testIdPrefix}.reject` }>
{ rejectButtonText }

View File

@@ -15,9 +15,9 @@ type Props = {
askUnmuteText: string,
/**
* Participant id.
* Participant participantID.
*/
id: string
participantID: string,
}
/**
@@ -26,14 +26,15 @@ type Props = {
* @param {Object} participant - Participant reference.
* @returns {React$Element<'button'>}
*/
export default function AskToUnmuteButton({ id, askUnmuteText }: Props) {
export default function AskToUnmuteButton({ askUnmuteText, participantID }: Props) {
const dispatch = useDispatch();
const askToUnmute = useCallback(() => {
dispatch(approveParticipant(id));
}, [ dispatch, id ]);
dispatch(approveParticipant(participantID));
}, [ dispatch, participantID ]);
return (
<QuickActionButton
aria-label = { `unmute-${participantID}` }
onClick = { askToUnmute }
primary = { true }
theme = {{

View File

@@ -90,7 +90,7 @@ export const FooterContextMenu = ({ onMouseLeave }: Props) => {
</div>
{ isModerationEnabled ? (
<ContextMenuItem
id = 'participants-pane-context-menu-start-moderation'
id = 'participants-pane-context-menu-stop-moderation'
onClick = { disable }>
<span className = { classes.paddedAction }>
{ t('participantsPane.actions.startModeration') }
@@ -98,7 +98,7 @@ export const FooterContextMenu = ({ onMouseLeave }: Props) => {
</ContextMenuItem>
) : (
<ContextMenuItem
id = 'participants-pane-context-menu-stop-moderation'
id = 'participants-pane-context-menu-start-moderation'
onClick = { enable }>
<Icon
size = { 20 }

View File

@@ -9,6 +9,11 @@ import { QuickActionButton } from './web/styled';
type Props = {
/**
* The translated ask unmute aria label.
*/
ariaLabel?: boolean,
/**
* The translated "ask unmute" text.
*/
@@ -24,6 +29,9 @@ type Props = {
*/
muteAudio: Function,
/**
* Label for mute participant button.
*/
muteParticipantButtonText: string,
/**
@@ -59,7 +67,7 @@ export default function ParticipantQuickAction({
return (
<AskToUnmuteButton
askUnmuteText = { askUnmuteText }
id = { participantID } />
participantID = { participantID } />
);
}
default: {

View File

@@ -161,6 +161,7 @@ export default function ParticipantItem({
return (
<ParticipantContainer
id = { `participant-item-${participantID}` }
isHighlighted = { isHighlighted }
onMouseLeave = { onLeave }
trigger = { actionsTrigger }>

View File

@@ -0,0 +1,55 @@
// @flow
/**
* The type of the action which signals that a new Poll was received.
*
* {
* type: RECEIVE_POLL,
* poll: Poll,
* pollId: string,
* notify: boolean
* }
*
*/
export const RECEIVE_POLL = 'RECEIVE_POLL';
/**
* The type of the action which signals that a new Answer was received.
*
* {
* type: RECEIVE_ANSWER,
* answer: Answer,
* pollId: string,
* }
*/
export const RECEIVE_ANSWER = 'RECEIVE_ANSWER';
/**
* The type of the action which registers a vote.
*
* {
* type: REGISTER_VOTE,
* answers: Array<boolean> | null,
* pollId: string
* }
*/
export const REGISTER_VOTE = 'REGISTER_VOTE';
/**
* The type of the action which retracts a vote.
*
* {
* type: RETRACT_VOTE,
* pollId: string,
* }
*/
export const RETRACT_VOTE = 'RETRACT_VOTE';
/**
* The type of the action triggered when the poll tab in chat pane is closed
*
* {
* type: RESET_NB_UNREAD_POLLS,
* }
*/
export const RESET_NB_UNREAD_POLLS = 'RESET_NB_UNREAD_POLLS';

View File

@@ -0,0 +1,99 @@
// @flow
import {
RESET_NB_UNREAD_POLLS,
RECEIVE_ANSWER,
RECEIVE_POLL,
REGISTER_VOTE,
RETRACT_VOTE
} from './actionTypes';
import type { Answer, Poll } from './types';
/**
* Action to signal that a new poll was received.
*
* @param {string} pollId - The id of the incoming poll.
* @param {Poll} poll - The incoming Poll object.
* @param {boolean} notify - Whether to send or not a notification.
* @returns {{
* type: RECEIVE_POLL,
* poll: Poll,
* pollId: string,
* notify: boolean
* }}
*/
export const receivePoll = (pollId: string, poll: Poll, notify: boolean) => {
return {
type: RECEIVE_POLL,
poll,
pollId,
notify
};
};
/**
* Action to signal that a new answer was received.
*
* @param {string} pollId - The id of the incoming poll.
* @param {Answer} answer - The incoming Answer object.
* @returns {{
* type: RECEIVE_ANSWER,
* answer: Answer,
* pollId: string
* }}
*/
export const receiveAnswer = (pollId: string, answer: Answer) => {
return {
type: RECEIVE_ANSWER,
answer,
pollId
};
};
/**
* Action to register a vote on a poll.
*
* @param {string} pollId - The id of the poll.
* @param {?Array<boolean>} answers - The new answers.
* @returns {{
* type: REGISTER_VOTE,
* answers: ?Array<boolean>,
* pollId: string
* }}
*/
export const registerVote = (pollId: string, answers: Array<boolean> | null) => {
return {
type: REGISTER_VOTE,
answers,
pollId
};
};
/**
* Action to retract a vote on a poll.
*
* @param {string} pollId - The id of the poll.
* @returns {{
* type: RETRACT_VOTE,
* pollId: string
* }}
*/
export const retractVote = (pollId: string) => {
return {
type: RETRACT_VOTE,
pollId
};
};
/**
* Action to signal the closing of the polls tab.
*
* @returns {{
* type: POLL_TAB_CLOSED
* }}
*/
export function resetNbUnreadPollsMessages() {
return {
type: RESET_NB_UNREAD_POLLS
};
}

View File

@@ -0,0 +1,101 @@
// @flow
import React, { useCallback, useState } from 'react';
import type { AbstractComponent } from 'react';
import { useTranslation } from 'react-i18next';
import { useDispatch, useSelector } from 'react-redux';
import { getLocalParticipant, getParticipantById } from '../../base/participants';
import { registerVote } from '../actions';
import { COMMAND_ANSWER_POLL } from '../constants';
import type { Poll } from '../types';
/**
* The type of the React {@code Component} props of inheriting component.
*/
type InputProps = {
pollId: string,
};
/*
* Props that will be passed by the AbstractPollAnswer to its
* concrete implementations (web/native).
**/
export type AbstractProps = {
checkBoxStates: Function,
poll: Poll,
setCheckbox: Function,
skipAnswer: Function,
submitAnswer: Function,
t: Function,
};
/**
* Higher Order Component taking in a concrete PollAnswer component and
* augmenting it with state/behavior common to both web and native implementations.
*
* @param {React.AbstractComponent} Component - The concrete component.
* @returns {React.AbstractComponent}
*/
const AbstractPollAnswer = (Component: AbstractComponent<AbstractProps>) => (props: InputProps) => {
const { pollId } = props;
const conference: Object = useSelector(state => state['features/base/conference'].conference);
const poll: Poll = useSelector(state => state['features/polls'].polls[pollId]);
const { id: localId } = useSelector(getLocalParticipant);
const [ checkBoxStates, setCheckBoxState ] = useState(() => {
if (poll.lastVote !== null) {
return [ ...poll.lastVote ];
}
return new Array(poll.answers.length).fill(false);
});
const setCheckbox = useCallback((index, state) => {
const newCheckBoxStates = [ ...checkBoxStates ];
newCheckBoxStates[index] = state;
setCheckBoxState(newCheckBoxStates);
}, [ checkBoxStates ]);
const dispatch = useDispatch();
const localParticipant = useSelector(state => getParticipantById(state, localId));
const localName: string = localParticipant.name ? localParticipant.name : 'Fellow Jitster';
const submitAnswer = useCallback(() => {
conference.sendMessage({
type: COMMAND_ANSWER_POLL,
pollId,
voterId: localId,
voterName: localName,
answers: checkBoxStates
});
dispatch(registerVote(pollId, checkBoxStates));
return false;
}, [ pollId, localId, localName, checkBoxStates, conference ]);
const skipAnswer = useCallback(() => {
dispatch(registerVote(pollId, null));
}, [ pollId ]);
const { t } = useTranslation();
return (<Component
checkBoxStates = { checkBoxStates }
poll = { poll }
setCheckbox = { setCheckbox }
skipAnswer = { skipAnswer }
submitAnswer = { submitAnswer }
t = { t } />);
};
export default AbstractPollAnswer;

View File

@@ -0,0 +1,135 @@
// @flow
import React, { useCallback, useState } from 'react';
import type { AbstractComponent } from 'react';
import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
import { getParticipantDisplayName } from '../../base/participants';
import { COMMAND_NEW_POLL } from '../constants';
/**
* The type of the React {@code Component} props of inheriting component.
*/
type InputProps = {
setCreateMode: boolean => void,
};
/*
* Props that will be passed by the AbstractPollCreate to its
* concrete implementations (web/native).
**/
export type AbstractProps = InputProps & {
answers: Array<string>,
question: string,
setQuestion: string => void,
setAnswer: (number, string) => void,
addAnswer: ?number => void,
moveAnswer: (number, number) => void,
removeAnswer: number => void,
onSubmit: Function,
isSubmitDisabled: boolean,
t: Function,
};
/**
* Higher Order Component taking in a concrete PollCreate component and
* augmenting it with state/behavior common to both web and native implementations.
*
* @param {React.AbstractComponent} Component - The concrete component.
* @returns {React.AbstractComponent}
*/
const AbstractPollCreate = (Component: AbstractComponent<AbstractProps>) => (props: InputProps) => {
const { setCreateMode } = props;
const [ question, setQuestion ] = useState('');
const [ answers, setAnswers ] = useState([ '', '' ]);
const setAnswer = useCallback((i, answer) => {
const newAnswers = [ ...answers ];
newAnswers[i] = answer;
setAnswers(newAnswers);
});
const addAnswer = useCallback((i: ?number) => {
const newAnswers = [ ...answers ];
newAnswers.splice(typeof i === 'number' ? i : answers.length, 0, '');
setAnswers(newAnswers);
});
const moveAnswer = useCallback((i, j) => {
const newAnswers = [ ...answers ];
const answer = answers[i];
newAnswers.splice(i, 1);
newAnswers.splice(j, 0, answer);
setAnswers(newAnswers);
});
const removeAnswer = useCallback(i => {
if (answers.length <= 2) {
return;
}
const newAnswers = [ ...answers ];
newAnswers.splice(i, 1);
setAnswers(newAnswers);
});
const conference = useSelector(state => state['features/base/conference'].conference);
const myId = conference.myUserId();
const myName = useSelector(state => getParticipantDisplayName(state, myId));
const onSubmit = useCallback(ev => {
if (ev) {
ev.preventDefault();
}
const filteredAnswers = answers.filter(answer => answer.trim().length > 0);
if (filteredAnswers.length < 2) {
return;
}
conference.sendMessage({
type: COMMAND_NEW_POLL,
pollId: Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(36),
senderId: myId,
senderName: myName,
question,
answers: filteredAnswers
});
setCreateMode(false);
}, [ conference, question, answers ]);
// Check if the poll create form can be submitted i.e. if the send button should be disabled.
const isSubmitDisabled
= question.trim().length <= 0 // If no question is provided
|| answers.filter(answer => answer.trim().length > 0).length < 2; // If not enough options are provided
const { t } = useTranslation();
return (<Component
addAnswer = { addAnswer }
answers = { answers }
isSubmitDisabled = { isSubmitDisabled }
moveAnswer = { moveAnswer }
onSubmit = { onSubmit }
question = { question }
removeAnswer = { removeAnswer }
setAnswer = { setAnswer }
setCreateMode = { setCreateMode }
setQuestion = { setQuestion }
t = { t } />);
};
export default AbstractPollCreate;

View File

@@ -0,0 +1,124 @@
// @flow
import React, { useCallback, useMemo, useState } from 'react';
import type { AbstractComponent } from 'react';
import { useTranslation } from 'react-i18next';
import { useDispatch, useSelector } from 'react-redux';
import { getLocalParticipant, getParticipantById } from '../../base/participants/functions';
import { retractVote } from '../actions';
import { COMMAND_ANSWER_POLL } from '../constants';
/**
* The type of the React {@code Component} props of inheriting component.
*/
type InputProps = {
/**
* ID of the poll to display
*/
pollId: string,
};
export type AnswerInfo = {
name: string,
percentage: number,
voters?: Array<{ id: number, name: string }>,
voterCount: number
};
/**
* The type of the React {@code Component} props of {@link AbstractPollResults}.
*/
export type AbstractProps = {
answers: Array<AnswerInfo>,
changeVote: Function,
showDetails: boolean,
question: string,
t: Function,
toggleIsDetailed: Function,
haveVoted: boolean,
};
/**
* Higher Order Component taking in a concrete PollResult component and
* augmenting it with state/behavior common to both web and native implementations.
*
* @param {React.AbstractComponent} Component - The concrete component.
* @returns {React.AbstractComponent}
*/
const AbstractPollResults = (Component: AbstractComponent<AbstractProps>) => (props: InputProps) => {
const { pollId } = props;
const pollDetails = useSelector(state => state['features/polls'].polls[pollId]);
const [ showDetails, setShowDetails ] = useState(false);
const toggleIsDetailed = useCallback(() => {
setShowDetails(!showDetails);
});
const answers: Array<AnswerInfo> = useMemo(() => {
const voterSet = new Set();
// Getting every voters ID that participates to the poll
for (const answer of pollDetails.answers) {
for (const [ voterId ] of answer.voters) {
voterSet.add(voterId);
}
}
const totalVoters = voterSet.size;
return pollDetails.answers.map(answer => {
const percentage = totalVoters === 0 ? 0 : Math.round(answer.voters.size / totalVoters * 100);
let voters = null;
if (showDetails) {
voters = [ ...answer.voters ].map(([ id, name ]) => {
return {
id,
name
};
});
}
return {
name: answer.name,
percentage,
voters,
voterCount: answer.voters.size
};
});
}, [ pollDetails.answers, showDetails ]);
const dispatch = useDispatch();
const conference: Object = useSelector(state => state['features/base/conference'].conference);
const localId = useSelector(state => getLocalParticipant(state).id);
const localParticipant = useSelector(state => getParticipantById(state, localId));
const localName: string = localParticipant ? localParticipant.name : 'Fellow Jitster';
const changeVote = useCallback(() => {
conference.sendMessage({
type: COMMAND_ANSWER_POLL,
pollId,
voterId: localId,
voterName: localName,
answers: new Array(pollDetails.answers.length).fill(false)
});
dispatch(retractVote(pollId));
}, [ pollId, localId, localName, pollDetails ]);
const { t } = useTranslation();
return (<Component
answers = { answers }
changeVote = { changeVote }
haveVoted = { pollDetails.lastVote !== null }
question = { pollDetails.question }
showDetails = { showDetails }
t = { t }
toggleIsDetailed = { toggleIsDetailed } />);
};
export default AbstractPollResults;

View File

@@ -0,0 +1,44 @@
// @flow
import React, { useState } from 'react';
import type { AbstractComponent } from 'react';
import { useTranslation } from 'react-i18next';
/*
* Props that will be passed by the AbstractPollsPane to its
* concrete implementations (web/native).
**/
export type AbstractProps = {
createMode: boolean,
onCreate: void => void,
setCreateMode: boolean => void,
t: Function,
};
/**
* Higher Order Component taking in a concrete PollsPane component and
* augmenting it with state/behavior common to both web and native implementations.
*
* @param {React.AbstractComponent} Component - The concrete component.
* @returns {React.AbstractComponent}
*/
const AbstractPollsPane = (Component: AbstractComponent<AbstractProps>) => () => {
const [ createMode, setCreateMode ] = useState(false);
const onCreate = () => {
setCreateMode(true);
};
const { t } = useTranslation();
return (<Component
createMode = { createMode }
/* eslint-disable react/jsx-no-bind */
onCreate = { onCreate }
setCreateMode = { setCreateMode }
t = { t } />);
};
export default AbstractPollsPane;

View File

@@ -0,0 +1,3 @@
// @flow
export * from './native';

View File

@@ -0,0 +1,3 @@
// @flow
export * from './web';

View File

@@ -0,0 +1,3 @@
// @flow
export * from './_';

View File

@@ -0,0 +1,69 @@
// @flow
import React from 'react';
import { Switch, Text, View } from 'react-native';
import { Button } from 'react-native-paper';
import { BUTTON_MODES } from '../../../chat/constants';
import AbstractPollAnswer from '../AbstractPollAnswer';
import type { AbstractProps } from '../AbstractPollAnswer';
import { chatStyles, dialogStyles } from './styles';
const PollAnswer = (props: AbstractProps) => {
const {
checkBoxStates,
poll,
setCheckbox,
skipAnswer,
submitAnswer,
t
} = props;
return (
<View>
<View>
<Text style = { dialogStyles.question } >{ poll.question }</Text>
</View>
<View style = { chatStyles.answerContent }>
{poll.answers.map((answer, index) => (
<View
key = { index }
style = { chatStyles.switchRow } >
<Switch
/* eslint-disable react/jsx-no-bind */
onValueChange = { state => setCheckbox(index, state) }
value = { checkBoxStates[index] } />
<Text>{answer.name}</Text>
</View>
))}
</View>
<View style = { chatStyles.buttonRow }>
<Button
color = '#3D3D3D'
mode = { BUTTON_MODES.CONTAINED }
onPress = { skipAnswer }
style = { chatStyles.pollCreateButton } >
{t('polls.answer.skip')}
</Button>
<Button
color = '#17a0db'
mode = { BUTTON_MODES.CONTAINED }
onPress = { submitAnswer }
style = { chatStyles.pollCreateButton } >
{t('polls.answer.submit')}
</Button>
</View>
</View>
);
};
/*
* We apply AbstractPollAnswer to fill in the AbstractProps common
* to both the web and native implementations.
*/
// eslint-disable-next-line new-cap
export default AbstractPollAnswer(PollAnswer);

View File

@@ -0,0 +1,185 @@
// @flow
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { View, TextInput, FlatList, TouchableOpacity } from 'react-native';
import { Button } from 'react-native-paper';
import { Icon, IconClose } from '../../../base/icons';
import { BUTTON_MODES } from '../../../chat/constants';
import AbstractPollCreate from '../AbstractPollCreate';
import type { AbstractProps } from '../AbstractPollCreate';
import { chatStyles, dialogStyles } from './styles';
const PollCreate = (props: AbstractProps) => {
const {
addAnswer,
answers,
isSubmitDisabled,
onSubmit,
question,
removeAnswer,
setAnswer,
setCreateMode,
setQuestion,
t
} = props;
const answerListRef = useRef(null);
/*
* This ref stores the Array of answer input fields, allowing us to focus on them.
* This array is maintained by registerfieldRef and the useEffect below.
*/
const answerInputs = useRef([]);
const registerFieldRef = useCallback((i, input) => {
if (input === null) {
return;
}
answerInputs.current[i] = input;
},
[ answerInputs ]
);
useEffect(() => {
answerInputs.current = answerInputs.current.slice(0, answers.length);
}, [ answers ]);
/*
* This state allows us to requestFocus asynchronously, without having to worry
* about whether a newly created input field has been rendered yet or not.
*/
const [ lastFocus, requestFocus ] = useState(null);
useEffect(() => {
if (lastFocus === null) {
return;
}
const input = answerInputs.current[lastFocus];
if (input === undefined) {
return;
}
input.focus();
}, [ answerInputs, lastFocus ]);
const onQuestionKeyDown = useCallback(() => {
answerInputs.current[0].focus();
});
// Called on keypress in answer fields
const onAnswerKeyDown = useCallback((index: number, ev) => {
const { key } = ev.nativeEvent;
const currentText = answers[index];
if (key === 'Backspace' && currentText === '' && answers.length > 1) {
removeAnswer(index);
requestFocus(index > 0 ? index - 1 : 0);
}
}, [ answers, addAnswer, removeAnswer, requestFocus ]);
/* eslint-disable react/no-multi-comp */
const createIconButton = (icon, onPress, style) => (
<TouchableOpacity
activeOpacity = { 0.8 }
onPress = { onPress }
style = { [ dialogStyles.buttonContainer, style ] }>
<Icon
size = { 24 }
src = { icon }
style = { dialogStyles.icon } />
</TouchableOpacity>
);
/* eslint-disable react/jsx-no-bind */
const renderListItem = ({ index }: { index: number }) =>
// padding to take into account the two default options
(
<View
style = { dialogStyles.optionContainer }>
<TextInput
blurOnSubmit = { false }
multiline = { true }
onChangeText = { text => setAnswer(index, text) }
onKeyPress = { ev => onAnswerKeyDown(index, ev) }
placeholder = { t('polls.create.answerPlaceholder', { index: index + 1 }) }
ref = { input => registerFieldRef(index, input) }
style = { dialogStyles.field }
value = { answers[index] } />
{answers.length > 2
&& createIconButton(IconClose, () => removeAnswer(index))
}
</View>
);
return (
<View style = { chatStyles.pollCreateContainer }>
<View style = { chatStyles.pollCreateSubContainer }>
<TextInput
autoFocus = { true }
blurOnSubmit = { false }
multiline = { true }
onChangeText = { setQuestion }
onSubmitEditing = { onQuestionKeyDown }
placeholder = { t('polls.create.questionPlaceholder') }
style = { dialogStyles.question }
value = { question } />
<FlatList
blurOnSubmit = { true }
data = { answers }
extraData = { answers }
keyExtractor = { (item, index) => index.toString() }
ref = { answerListRef }
renderItem = { renderListItem } />
<Button
color = '#3D3D3D'
mode = { BUTTON_MODES.CONTAINED }
onPress = { () => {
// adding and answer
addAnswer();
requestFocus(answers.length);
} }
style = { chatStyles.pollCreateAddButton }>
{t('polls.create.addOption')}
</Button>
</View>
<View
style = { chatStyles.buttonRow }>
<Button
color = '#3D3D3D'
mode = { BUTTON_MODES.CONTAINED }
onPress = { () => setCreateMode(false) }
style = { chatStyles.pollCreateButton } >
{t('polls.create.cancel')}
</Button>
<Button
color = '#17a0db'
disabled = { isSubmitDisabled }
mode = { BUTTON_MODES.CONTAINED }
onPress = { onSubmit }
style = { chatStyles.pollCreateButton } >
{t('polls.create.send')}
</Button>
</View>
</View>
);
};
/*
* We apply AbstractPollCreate to fill in the AbstractProps common
* to both the web and native implementations.
*/
// eslint-disable-next-line new-cap
export default AbstractPollCreate(PollCreate);

View File

@@ -0,0 +1,40 @@
// @flow
import React from 'react';
import { View } from 'react-native';
import { useSelector } from 'react-redux';
import { shouldShowResults } from '../../functions';
import { chatStyles } from './styles';
import { PollAnswer, PollResults } from '.';
type Props = {
/**
* Id of the poll
*/
pollId: string,
}
const PollItem = ({ pollId }: Props) => {
const showResults = useSelector(state => shouldShowResults(state, pollId));
return (
<View
style = { chatStyles.pollItemContainer }>
{ showResults
? <PollResults
key = { pollId }
pollId = { pollId } />
: <PollAnswer
pollId = { pollId } />
}
</View>
);
};
export default PollItem;

View File

@@ -0,0 +1,120 @@
// @flow
import React, { useCallback } from 'react';
import { View, Text, FlatList, TouchableOpacity } from 'react-native';
import AbstractPollResults from '../AbstractPollResults';
import type { AbstractProps, AnswerInfo } from '../AbstractPollResults';
import { chatStyles, dialogStyles, resultsStyles } from './styles';
/**
* Component that renders the poll results.
*
* @param {Props} props - The passed props.
* @returns {React.Node}
*/
const PollResults = (props: AbstractProps) => {
const {
answers,
changeVote,
haveVoted,
showDetails,
question,
t,
toggleIsDetailed
} = props;
/* eslint-disable react/no-multi-comp */
/**
* Render a header summing up answer information.
*
* @param {string} answer - The name of the answer.
* @param {number} percentage - The percentage of voters.
* @param {number} nbVotes - The number of collected votes.
* @returns {React.Node}
*/
const renderHeader = (answer: string, percentage: number, nbVotes: number) => (
<View style = { resultsStyles.answerHeader }>
<Text style = { resultsStyles.answer }>{ answer }</Text>
<Text style = { resultsStyles.answer }>({nbVotes}) {percentage}%</Text>
{/* <Text style = { resultsStyles.answer }>{ answer } - { percentage }%</Text>
<Text style = { resultsStyles.answerVoteCount }>
{ t('polls.answer.vote', { count: nbVotes }) }
</Text> */}
</View>
);
/**
* Render voters of and answer
* @param {AnswerInfo} answer - the answer info
* @returns {React.Node}
*/
const renderRow = useCallback((answer: AnswerInfo) => {
const { name, percentage, voters, voterCount } = answer;
if (showDetails) {
return (
<View style = { resultsStyles.answerContainer }>
{ renderHeader(name, percentage, voterCount) }
{ voters && voterCount > 0
&& <View style = { resultsStyles.voters }>
{voters.map(({ id, name: voterName }) =>
<Text key = { id }>{ voterName }</Text>
)}
</View>}
</View>
);
}
// else, we display a simple list
// We add a progress bar by creating an empty view of width equal to percentage.
return (
<View style = { resultsStyles.answerContainer }>
{ renderHeader(answer.name, percentage, voterCount) }
<View style = { resultsStyles.barContainer }>
<View style = { [ resultsStyles.bar, { width: `${percentage}%` } ] } />
</View>
</View>
);
}, [ showDetails ]);
/* eslint-disable react/jsx-no-bind */
return (
<View>
<View>
<Text style = { dialogStyles.question } >{ question }</Text>
</View>
<FlatList
data = { answers }
keyExtractor = { (item, index) => index.toString() }
renderItem = { answer => renderRow(answer.item) } />
<View style = { chatStyles.bottomLinks }>
<TouchableOpacity onPress = { toggleIsDetailed }>
<Text
style = { chatStyles.toggleText }>
{showDetails ? t('polls.results.hideDetailedResults') : t('polls.results.showDetailedResults')}
</Text>
</TouchableOpacity>
<TouchableOpacity onPress = { changeVote }>
<Text
style = { chatStyles.toggleText }>
{haveVoted ? t('polls.results.changeVote') : t('polls.results.vote')}
</Text>
</TouchableOpacity>
</View>
</View>
);
};
/*
* We apply AbstractPollResults to fill in the AbstractProps common
* to both the web and native implementations.
*/
// eslint-disable-next-line new-cap
export default AbstractPollResults(PollResults);

View File

@@ -0,0 +1,51 @@
import React, { useCallback, useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import { FlatList } from 'react-native';
import { Text } from 'react-native-paper';
import { useSelector } from 'react-redux';
import { chatStyles } from './styles';
import { PollItem } from '.';
const PollsList = () => {
const polls = useSelector(state => state['features/polls'].polls);
const { t } = useTranslation();
const listPolls = Object.keys(polls);
const renderItem = useCallback(({ item }) => (
<PollItem
key = { item }
pollId = { item } />)
, []);
const flatlistRef = useRef();
const scrollToBottom = () => {
flatlistRef.current.scrollToEnd({ animating: true });
};
useEffect(() => {
scrollToBottom();
}, [ polls ]);
return (
<>
{listPolls.length === 0
&& <Text style = { chatStyles.noPollText } >
{t('polls.results.empty')}
</Text>}
<FlatList
data = { listPolls }
extraData = { listPolls }
// eslint-disable-next-line react/jsx-no-bind
keyExtractor = { (item, index) => index.toString() }
ref = { flatlistRef }
renderItem = { renderItem } />
</>
);
};
export default PollsList;

View File

@@ -0,0 +1,45 @@
/* eslint-disable react-native/no-color-literals */
// @flow
import React from 'react';
import { View } from 'react-native';
import { Button } from 'react-native-paper';
import { BUTTON_MODES } from '../../../chat/constants';
import AbstractPollsPane from '../AbstractPollsPane';
import type { AbstractProps } from '../AbstractPollsPane';
import PollCreate from './PollCreate';
import PollsList from './PollsList';
import { chatStyles } from './styles';
const PollsPane = (props: AbstractProps) => {
const { createMode, onCreate, setCreateMode, t } = props;
return (
<View style = { chatStyles.PollPane }>
{ createMode
? <PollCreate setCreateMode = { setCreateMode } />
: <View style = { chatStyles.PollPaneContent }>
{/* <View /> */}
<PollsList />
<Button
color = '#17a0db'
mode = { BUTTON_MODES.CONTAINED }
onPress = { onCreate }
style = { chatStyles.createPollButton } >
{t('polls.create.create')}
</Button>
</View>}
</View>
);
};
/*
* We apply AbstractPollsPane to fill in the AbstractProps common
* to both the web and native implementations.
*/
// eslint-disable-next-line new-cap
export default AbstractPollsPane(PollsPane);

View File

@@ -0,0 +1,7 @@
// @flow
export { default as PollResults } from './PollResults';
export { default as PollsPane } from './PollsPane';
export { default as PollItem } from './PollItem';
export { default as PollAnswer } from './PollAnswer';
export { default as PollCreate } from './PollCreate';

View File

@@ -0,0 +1,195 @@
// @flow
import { schemeColor } from '../../../base/color-scheme';
import { ColorPalette, createStyleSheet } from '../../../base/styles';
export const answerStyles = createStyleSheet({
question: {
fontSize: 24,
fontWeight: 'bold',
marginBottom: 6
},
answer: {
flexDirection: 'row',
alignItems: 'center',
marginBottom: 3
},
option: {
flexShrink: 1
}
});
export const dialogStyles = createStyleSheet({
question: {
fontSize: 16,
fontWeight: 'bold',
marginVertical: 4
},
optionContainer: {
flexDirection: 'row'
},
field: {
borderBottomWidth: 1,
borderColor: ColorPalette.blue,
fontSize: 14,
flexGrow: 1,
paddingBottom: 0,
flexShrink: 1
},
buttonContainer: {
justifyContent: 'flex-end',
alignItems: 'center'
},
icon: {
color: ColorPalette.white,
backgroundColor: ColorPalette.blue,
borderRadius: 5,
margin: 0
},
plusButton: {
marginTop: 8
}
});
export const resultsStyles = createStyleSheet({
title: {
fontSize: 24,
fontWeight: 'bold'
},
barContainer: {
backgroundColor: '#ccc',
borderRadius: 3,
width: '100%',
height: 6,
marginTop: 2
},
bar: {
backgroundColor: ColorPalette.blue,
borderRadius: 3,
height: 6
},
voters: {
borderRadius: 3,
borderWidth: 1,
borderColor: 'gray',
padding: 2,
marginHorizontal: 8,
marginVertical: 4
},
answerContainer: {
marginVertical: 2,
maxWidth: '100%'
},
answerHeader: {
flexDirection: 'row',
justifyContent: 'space-between'
},
answer: {
flexShrink: 1
},
answerVoteCount: {
paddingLeft: 10
},
chatQuestion: {
fontWeight: 'bold'
}
});
export const chatStyles = createStyleSheet({
messageFooter: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
fontSize: 11,
marginTop: 6
},
showDetails: {
fontWeight: 'bold'
},
noPollText: {
flex: 1,
color: schemeColor('displayName'),
textAlign: 'center',
paddingTop: '10%'
},
pollItemContainer: {
borderRadius: 4,
borderColor: '#2183ad',
borderWidth: 2,
padding: 16,
marginBottom: 8
},
pollCreateContainer: {
flex: 1,
justifyContent: 'space-between'
},
pollCreateSubContainer: {
flex: 1
},
pollCreateButton: {
flex: 1,
marginHorizontal: 8
},
buttonRow: {
flexDirection: 'row'
},
answerContent: {
paddingBottom: 8
},
switchRow: {
alignItems: 'center',
flexDirection: 'row',
padding: 6
},
pollCreateAddButton: {
margin: 8
},
toggleText: {
color: ColorPalette.blue,
paddingTop: 16
},
createPollButton: {
padding: 8,
margin: 4
},
PollPane: {
flex: 1,
padding: 8
},
PollPaneContent: {
justifyContent: 'space-between',
flex: 1
},
bottomLinks: {
flexDirection: 'row',
justifyContent: 'space-between'
}
});

View File

@@ -0,0 +1,69 @@
// @flow
import { Checkbox } from '@atlaskit/checkbox';
import React from 'react';
import AbstractPollAnswer from '../AbstractPollAnswer';
import type { AbstractProps } from '../AbstractPollAnswer';
const PollAnswer = (props: AbstractProps) => {
const {
checkBoxStates,
poll,
setCheckbox,
skipAnswer,
submitAnswer,
t
} = props;
return (
<div className = 'poll-answer'>
<div className = 'poll-header'>
<div className = 'poll-question'>
<span>{ poll.question }</span>
</div>
</div>
<ol className = 'poll-answer-list'>
{
poll.answers.map((answer, index) => (
<li
className = 'poll-answer-container'
key = { index }>
<Checkbox
isChecked = { checkBoxStates[index] }
key = { index }
label = { <span>{ answer.name }</span> }
// eslint-disable-next-line react/jsx-no-bind
onChange = { ev => setCheckbox(index, ev.target.checked) }
size = 'large' />
</li>
))
}
</ol>
<div className = { 'poll-footer' }>
<button
aria-label = { t('polls.answer.skip') }
className = { 'poll-small-secondary-button' }
onClick = { skipAnswer } >
<span>{t('polls.answer.skip')}</span>
</button>
<button
aria-label = { t('polls.answer.submit') }
className = { 'poll-small-primary-button' }
onClick = { submitAnswer }>
<span>{t('polls.answer.submit')}</span>
</button>
</div>
</div>
);
};
/*
* We apply AbstractPollAnswer to fill in the AbstractProps common
* to both the web and native implementations.
*/
// eslint-disable-next-line new-cap
export default AbstractPollAnswer(PollAnswer);

View File

@@ -0,0 +1,248 @@
// @flow
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { Icon, IconMenu } from '../../../base/icons';
import { Tooltip } from '../../../base/tooltip';
import AbstractPollCreate from '../AbstractPollCreate';
import type { AbstractProps } from '../AbstractPollCreate';
const PollCreate = (props: AbstractProps) => {
const {
addAnswer,
answers,
isSubmitDisabled,
moveAnswer,
onSubmit,
question,
removeAnswer,
setAnswer,
setCreateMode,
setQuestion,
t
} = props;
/*
* This ref stores the Array of answer input fields, allowing us to focus on them.
* This array is maintained by registerfieldRef and the useEffect below.
*/
const answerInputs = useRef([]);
const registerFieldRef = useCallback((i, r) => {
if (r === null) {
return;
}
answerInputs.current[i] = r;
}, [ answerInputs ]);
useEffect(() => {
answerInputs.current = answerInputs.current.slice(0, answers.length);
}, [ answers ]);
/*
* This state allows us to requestFocus asynchronously, without having to worry
* about whether a newly created input field has been rendered yet or not.
*/
const [ lastFocus, requestFocus ] = useState(null);
useEffect(() => {
if (lastFocus === null) {
return;
}
const input = answerInputs.current[lastFocus];
if (input === undefined) {
return;
}
input.focus();
}, [ lastFocus ]);
const checkModifiers = useCallback(ev => {
// Because this isn't done automatically on MacOS
if (ev.key === 'Enter' && ev.metaKey) {
ev.preventDefault();
onSubmit();
return;
}
if (ev.ctrlKey || ev.metaKey || ev.altKey || ev.shiftKey) {
return;
}
});
const onQuestionKeyDown = useCallback(ev => {
if (checkModifiers(ev)) {
return;
}
if (ev.key === 'Enter') {
requestFocus(0);
ev.preventDefault();
}
});
// Called on keypress in answer fields
const onAnswerKeyDown = useCallback((i, ev) => {
if (checkModifiers(ev)) {
return;
}
if (ev.key === 'Enter') {
addAnswer(i + 1);
requestFocus(i + 1);
ev.preventDefault();
} else if (ev.key === 'Backspace' && ev.target.value === '' && answers.length > 1) {
removeAnswer(i);
requestFocus(i > 0 ? i - 1 : 0);
ev.preventDefault();
} else if (ev.key === 'ArrowDown') {
if (i === answers.length - 1) {
addAnswer();
}
requestFocus(i + 1);
ev.preventDefault();
} else if (ev.key === 'ArrowUp') {
if (i === 0) {
addAnswer(0);
requestFocus(0);
} else {
requestFocus(i - 1);
}
ev.preventDefault();
}
}, [ answers, addAnswer, removeAnswer, requestFocus ]);
const [ grabbing, setGrabbing ] = useState(null);
const onGrab = useCallback((i, ev) => {
if (ev.button !== 0) {
return;
}
setGrabbing(i);
window.addEventListener('mouseup', () => {
setGrabbing(_grabbing => {
requestFocus(_grabbing);
return null;
});
}, { once: true });
});
const onMouseOver = useCallback(i => {
if (grabbing !== null && grabbing !== i) {
moveAnswer(grabbing, i);
setGrabbing(i);
}
});
const autogrow = ev => {
const el = ev.target;
el.style.height = '1px';
el.style.height = `${el.scrollHeight + 2}px`;
};
/* eslint-disable react/jsx-no-bind */
return (<form
className = 'polls-pane-content'
onSubmit = { onSubmit }>
<div className = 'poll-create-container poll-container'>
<div className = 'poll-create-header'>
{ t('polls.create.create') }
</div>
<div className = 'poll-question-field'>
<span className = 'poll-create-label'>
{ t('polls.create.pollQuestion') }
</span>
<textarea
autoFocus = { true }
className = 'expandable-input'
onChange = { ev => setQuestion(ev.target.value) }
onInput = { autogrow }
onKeyDown = { onQuestionKeyDown }
placeholder = { t('polls.create.questionPlaceholder') }
required = { true }
row = '1'
value = { question } />
</div>
<ol className = 'poll-answer-field-list'>
{answers.map((answer, i) =>
(<li
className = { `poll-answer-field${grabbing === i ? ' poll-dragged' : ''}` }
key = { i }
onMouseOver = { () => onMouseOver(i) }>
<span className = 'poll-create-label'>
{ t('polls.create.pollOption', { index: i + 1 })}
</span>
<div className = 'poll-create-option-row'>
<textarea
className = 'expandable-input'
onChange = { ev => setAnswer(i, ev.target.value) }
onInput = { autogrow }
onKeyDown = { ev => onAnswerKeyDown(i, ev) }
placeholder = { t('polls.create.answerPlaceholder', { index: i + 1 }) }
ref = { r => registerFieldRef(i, r) }
required = { true }
row = { 1 }
value = { answer } />
<button
className = 'poll-drag-handle'
onMouseDown = { ev => onGrab(i, ev) }
tabIndex = '-1'
type = 'button'>
<Icon src = { IconMenu } />
</button>
</div>
{ answers.length > 2
&& <Tooltip content = { t('polls.create.removeOption') }>
<button
className = 'poll-remove-option-button'
onClick = { () => removeAnswer(i) }
type = 'button'>
{ t('polls.create.removeOption') }
</button>
</Tooltip>}
</li>)
)}
</ol>
<div className = 'poll-add-button'>
<button
aria-label = { 'Add option' }
className = { 'poll-secondary-button' }
onClick = { () => {
addAnswer();
requestFocus(answers.length);
} }
type = 'button' >
<span>{t('polls.create.addOption')}</span>
</button>
</div>
</div>
<div className = 'poll-footer'>
<button
aria-label = { t('polls.create.cancel') }
className = 'poll-small-secondary-button'
onClick = { () => setCreateMode(false) }
type = 'button' >
<span>{t('polls.create.cancel')}</span>
</button>
<button
aria-label = { t('polls.create.send') }
className = 'poll-small-primary-button'
disabled = { isSubmitDisabled }
type = 'submit' >
<span>{t('polls.create.send')}</span>
</button>
</div>
</form>);
};
/*
* We apply AbstractPollCreate to fill in the AbstractProps common
* to both the web and native implementations.
*/
// eslint-disable-next-line new-cap
export default AbstractPollCreate(PollCreate);

View File

@@ -0,0 +1,36 @@
// @flow
import React from 'react';
import { useSelector } from 'react-redux';
import { PollAnswer, PollResults } from '..';
import { shouldShowResults } from '../../functions';
type Props = {
/**
* Id of the poll
*/
pollId: string,
}
const PollItem = React.forwardRef<Props, HTMLElement>(({ pollId }, ref) => {
const showResults = useSelector(state => shouldShowResults(state, pollId));
return (
<div ref = { ref }>
{ showResults
? <PollResults
key = { pollId }
pollId = { pollId } />
: <PollAnswer
pollId = { pollId } />
}
</div>
);
});
export default PollItem;

View File

@@ -0,0 +1,80 @@
// @flow
import React from 'react';
import AbstractPollResults from '../AbstractPollResults';
import type { AbstractProps } from '../AbstractPollResults';
/**
* Component that renders the poll results.
*
* @param {Props} props - The passed props.
* @returns {React.Node}
*/
const PollResults = (props: AbstractProps) => {
const {
answers,
changeVote,
haveVoted,
showDetails,
question,
t,
toggleIsDetailed
} = props;
return (
<div className = 'poll-results'>
<div className = 'poll-header'>
<div className = 'poll-question'>
<strong>{ question }</strong>
</div>
</div>
<ol className = 'poll-result-list'>
{answers.map(({ name, percentage, voters, voterCount }, index) =>
(<li key = { index }>
<div className = 'poll-answer-header'>
<span className = 'poll-answer-vote-name' >{name}</span>
</div>
<div className = 'poll-answer-short-results'>
<span className = 'poll-bar-container'>
<div
className = 'poll-bar'
style = {{ width: `${percentage}%` }} />
</span>
<div className = 'poll-answer-vote-count-container'>
<span className = 'poll-answer-vote-count'>({voterCount}) {percentage}%</span>
</div>
</div>
{ showDetails && voters && voterCount > 0
&& <ul className = 'poll-answer-voters'>
{voters.map(voter =>
<li key = { voter.id }>{voter.name}</li>
)}
</ul>}
</li>)
)}
</ol>
<div className = { 'poll-result-links' }>
<a
className = { 'poll-detail-link' }
onClick = { toggleIsDetailed }>
{showDetails ? t('polls.results.hideDetailedResults') : t('polls.results.showDetailedResults')}
</a>
<a
className = { 'poll-change-vote-link' }
onClick = { changeVote }>
{haveVoted ? t('polls.results.changeVote') : t('polls.results.vote')}
</a>
</div>
</div>
);
};
/*
* We apply AbstractPollResults to fill in the AbstractProps common
* to both the web and native implementations.
*/
// eslint-disable-next-line new-cap
export default AbstractPollResults(PollResults);

View File

@@ -0,0 +1,48 @@
// @flow
import React, { useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
import { Icon, IconChatUnread } from '../../../base/icons';
import { PollItem } from '.';
const PollsList = () => {
const { t } = useTranslation();
const polls = useSelector(state => state['features/polls'].polls);
const pollListEndRef = useRef(null);
const scrollToBottom = () => {
if (pollListEndRef.current) {
pollListEndRef.current.scrollIntoView({ behavior: 'smooth' });
}
};
useEffect(() => {
scrollToBottom();
}, [ polls ]);
const listPolls = Object.keys(polls);
return (
<>
{listPolls.length === 0
? <div className = 'pane-content'>
<Icon
className = 'empty-pane-icon'
src = { IconChatUnread } />
<span className = 'empty-pane-message'>{t('polls.results.empty')}</span>
</div>
: listPolls.map((id, index) => (
<PollItem
key = { id }
pollId = { id }
ref = { listPolls.length - 1 === index ? pollListEndRef : null } />
))}
</>
);
};
export default PollsList;

View File

@@ -0,0 +1,39 @@
// @flow
import React from 'react';
import AbstractPollsPane from '../AbstractPollsPane';
import type { AbstractProps } from '../AbstractPollsPane';
import PollsList from './PollsList';
import { PollCreate } from '.';
const PollsPane = (props: AbstractProps) => {
const { createMode, onCreate, setCreateMode, t } = props;
return createMode
? <PollCreate setCreateMode = { setCreateMode } />
: <div className = 'polls-pane-content'>
<div className = { 'poll-container' } >
<PollsList />
</div>
<div className = { 'poll-footer' }>
<button
aria-label = { t('polls.create.create') }
className = { 'poll-primary-button' }
// eslint-disable-next-line react/jsx-no-bind
onClick = { onCreate } >
<span>{t('polls.create.create')}</span>
</button>
</div>
</div>;
};
/*
* We apply AbstractPollsPane to fill in the AbstractProps common
* to both the web and native implementations.
*/
// eslint-disable-next-line new-cap
export default AbstractPollsPane(PollsPane);

View File

@@ -0,0 +1,6 @@
// @flow
export { default as PollAnswer } from './PollAnswer';
export { default as PollCreate } from './PollCreate';
export { default as PollResults } from './PollResults';
export { default as PollsPane } from './PollsPane';
export { default as PollItem } from './PollItem';

View File

@@ -0,0 +1,5 @@
// @flow
export const COMMAND_NEW_POLL = 'new-poll';
export const COMMAND_ANSWER_POLL = 'answer-poll';
export const COMMAND_OLD_POLLS = 'old-polls';

View File

@@ -0,0 +1,23 @@
// @flow
/**
* Should poll results be shown.
*
* @param {Object} state - Global state.
* @param {string} id - Id of the poll.
* @returns {boolean} Should poll results be shown.
*/
export const shouldShowResults = (state: Object, id: string) => Boolean(state['features/polls']?.polls[id].showResults);
/**
* Selector for calculating the number of unread poll messages.
*
* @param {Object} state - The redux state.
* @returns {number} The number of unread messages.
*/
export function getUnreadPollCount(state: Object) {
const { nbUnreadPolls } = state['features/polls'];
return nbUnreadPolls;
}

View File

@@ -0,0 +1,32 @@
// @flow
import { MiddlewareRegistry } from '../base/redux';
import { playSound } from '../base/sounds';
import { INCOMING_MSG_SOUND_ID } from '../chat/constants';
import { RECEIVE_POLL } from './actionTypes';
MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
const result = next(action);
switch (action.type) {
// Middleware triggered when a poll is received
case RECEIVE_POLL: {
const state = getState();
const isChatOpen: boolean = state['features/chat'].isOpen;
const isPollsTabFocused: boolean = state['features/chat'].isPollsTabFocused;
// Finally, we notify user they received a new poll if their pane is not opened
if (action.notify && (!isChatOpen || !isPollsTabFocused)) {
dispatch(playSound(INCOMING_MSG_SOUND_ID));
}
break;
}
}
return result;
});

View File

@@ -0,0 +1,128 @@
// @flow
import { ReducerRegistry } from '../base/redux';
import {
RECEIVE_POLL,
RECEIVE_ANSWER,
REGISTER_VOTE,
RETRACT_VOTE,
RESET_NB_UNREAD_POLLS
} from './actionTypes';
import type { Answer } from './types';
const INITIAL_STATE = {
polls: {},
// Number of not read message
nbUnreadPolls: 0
};
ReducerRegistry.register('features/polls', (state = INITIAL_STATE, action) => {
switch (action.type) {
// Reducer triggered when a poll is received
case RECEIVE_POLL: {
const newState = {
...state,
polls: {
...state.polls,
// The poll is added to the dictionnary of received polls
[action.pollId]: action.poll
},
nbUnreadPolls: state.nbUnreadPolls + 1
};
return newState;
}
// Reducer triggered when an answer is received
// The answer is added to an existing poll
case RECEIVE_ANSWER: {
const { pollId, answer }: { pollId: string; answer: Answer } = action;
// if the poll doesn't exist
if (!(pollId in state.polls)) {
console.warn('requested poll does not exist: pollId ', pollId);
return state;
}
// if the poll exists, we update it with the incoming answer
const newAnswers = state.polls[pollId].answers
.map(_answer => {
return {
name: _answer.name,
voters: new Map(_answer.voters)
};
});
for (let i = 0; i < newAnswers.length; i++) {
// if the answer was chosen, we add the sender to the set of voters of this answer
const voters = newAnswers[i].voters;
if (answer.answers[i]) {
voters.set(answer.voterId, answer.voterName);
} else {
voters.delete(answer.voterId);
}
}
// finally we update the state by returning the updated poll
return {
...state,
polls: {
...state.polls,
[pollId]: {
...state.polls[pollId],
answers: newAnswers
}
}
};
}
case REGISTER_VOTE: {
const { answers, pollId }: { answers: Array<boolean> | null; pollId: string } = action;
return {
...state,
polls: {
...state.polls,
[pollId]: {
...state.polls[pollId],
lastVote: answers,
showResults: true
}
}
};
}
case RETRACT_VOTE: {
const { pollId }: { pollId: string } = action;
return {
...state,
polls: {
...state.polls,
[pollId]: {
...state.polls[pollId],
showResults: false
}
}
};
}
case RESET_NB_UNREAD_POLLS: {
return {
...state,
nbUnreadPolls: 0
};
}
default:
return state;
}
});

View File

@@ -0,0 +1,125 @@
// @flow
import { getCurrentConference } from '../base/conference';
import { JitsiConferenceEvents } from '../base/lib-jitsi-meet';
import { StateListenerRegistry } from '../base/redux';
import {
NOTIFICATION_TIMEOUT,
NOTIFICATION_TYPE,
showNotification
} from '../notifications';
import { receiveAnswer, receivePoll } from './actions';
import { COMMAND_NEW_POLL, COMMAND_ANSWER_POLL, COMMAND_OLD_POLLS } from './constants';
import type { Answer, Poll } from './types';
const parsePollData = (pollData): Poll | null => {
if (typeof pollData !== 'object' || pollData === null) {
return null;
}
const { id, senderId, senderName, question, answers } = pollData;
if (typeof id !== 'string' || typeof senderId !== 'string' || typeof senderName !== 'string'
|| typeof question !== 'string' || !(answers instanceof Array)) {
return null;
}
const answersParsed = [];
for (const answer of answers) {
const voters = new Map();
for (const [ voterId, voter ] of Object.entries(answer.voters)) {
if (typeof voter !== 'string') {
return null;
}
voters.set(voterId, voter);
}
answersParsed.push({
name: answer.name,
voters
});
}
return {
senderId,
senderName,
question,
showResults: true,
lastVote: null,
answers: answersParsed
};
};
StateListenerRegistry.register(
state => getCurrentConference(state),
(conference, store, previousConference) => {
if (conference && conference !== previousConference) {
const receiveMessage = (_, data) => {
switch (data.type) {
case COMMAND_NEW_POLL: {
const { question, answers, pollId, senderId, senderName } = data;
const poll = {
senderId,
senderName,
showResults: false,
lastVote: null,
question,
answers: answers.map(answer => {
return {
name: answer,
voters: new Map()
};
})
};
store.dispatch(receivePoll(pollId, poll, true));
store.dispatch(showNotification({
appearance: NOTIFICATION_TYPE.NORMAL,
titleKey: 'polls.notification.title',
descriptionKey: 'polls.notification.description'
}, NOTIFICATION_TIMEOUT));
break;
}
case COMMAND_ANSWER_POLL: {
const { pollId, answers, voterId, voterName } = data;
const receivedAnswer: Answer = {
voterId,
voterName,
pollId,
answers
};
store.dispatch(receiveAnswer(pollId, receivedAnswer));
break;
}
case COMMAND_OLD_POLLS: {
const { polls } = data;
for (const pollData of polls) {
const poll = parsePollData(pollData);
if (poll === null) {
console.warn('[features/polls] Invalid old poll data');
} else {
store.dispatch(receivePoll(pollData.id, poll, false));
}
}
break;
}
}
};
conference.on(JitsiConferenceEvents.ENDPOINT_MESSAGE_RECEIVED, receiveMessage);
conference.on(JitsiConferenceEvents.NON_PARTICIPANT_MESSAGE_RECEIVED, receiveMessage);
}
}
);

View File

@@ -0,0 +1,61 @@
// @flow
export type Answer = {
/**
* ID of the voter for this answer
*/
voterId: string,
/**
* Name of the voter
*/
voterName: string,
/**
* ID of the parent Poll of this answer
*/
pollId: string,
/**
* An array of boolean: true if the answer was chosen by the responder, else false
*/
answers: Array<boolean>
};
export type Poll = {
/**
* ID of the sender of this poll
*/
senderId: string,
/**
* Name of the sender of this poll
* Store poll sender name in case they exit the call
*/
senderName: string,
/**
* Whether the results should be shown instead of the answer form
*/
showResults: boolean,
/**
* The last sent votes for this poll, or null if voting was skipped
* Note: This is reset when voting/skipping, not when clicking "Change vote"
*/
lastVote: Array<boolean> | null,
/**
* The question asked by this poll
*/
question: string,
/**
* An array of answers:
* the name of the answer name and a map of ids and names of voters voting for this option
*/
answers: Array<{ name: string, voters: Map<string, string> }>,
};

View File

@@ -6,9 +6,11 @@ import { Dialog } from '../../base/dialog';
import { translate } from '../../base/i18n';
import { getLocalParticipant } from '../../base/participants';
import { connect } from '../../base/redux';
import { escapeRegexp } from '../../base/util';
import SpeakerStatsItem from './SpeakerStatsItem';
import SpeakerStatsLabels from './SpeakerStatsLabels';
import SpeakerStatsSearch from './SpeakerStatsSearch';
declare var interfaceConfig: Object;
@@ -41,7 +43,12 @@ type State = {
/**
* The stats summary provided by the JitsiConference.
*/
stats: Object
stats: Object,
/**
* The search input criteria.
*/
criteria: string,
};
/**
@@ -62,11 +69,13 @@ class SpeakerStats extends Component<Props, State> {
super(props);
this.state = {
stats: this.props.conference.getSpeakerStats()
stats: this._getSpeakerStats(),
criteria: ''
};
// Bind event handlers so they are only bound once per instance.
this._updateStats = this._updateStats.bind(this);
this._onSearch = this._onSearch.bind(this);
}
/**
@@ -102,8 +111,9 @@ class SpeakerStats extends Component<Props, State> {
<Dialog
cancelKey = { 'dialog.close' }
submitDisabled = { true }
titleKey = 'speakerStats.speakerStats'>
titleKey = { 'speakerStats.speakerStats' }>
<div className = 'speaker-stats'>
<SpeakerStatsSearch onSearch = { this._onSearch } />
<SpeakerStatsLabels />
{ items }
</div>
@@ -111,6 +121,32 @@ class SpeakerStats extends Component<Props, State> {
);
}
/**
* Update the internal state with the latest speaker stats.
*
* @returns {void}
* @private
*/
_getSpeakerStats() {
const stats = { ...this.props.conference.getSpeakerStats() };
if (this.state?.criteria) {
const searchRegex = new RegExp(this.state.criteria, 'gi');
for (const id in stats) {
if (stats[id].hasOwnProperty('_isLocalStats')) {
const name = stats[id].isLocalStats() ? this.props._localDisplayName : stats[id].getDisplayName();
if (!name || !name.match(searchRegex)) {
delete stats[id];
}
}
}
}
return stats;
}
/**
* Create a SpeakerStatsItem instance for the passed in user id.
*
@@ -155,6 +191,22 @@ class SpeakerStats extends Component<Props, State> {
);
}
_onSearch: () => void;
/**
* Search the existing participants by name.
*
* @returns {void}
* @param {string} criteria - The search parameter.
* @protected
*/
_onSearch(criteria = '') {
this.setState({
...this.state,
criteria: escapeRegexp(criteria)
});
}
_updateStats: () => void;
/**
@@ -164,9 +216,12 @@ class SpeakerStats extends Component<Props, State> {
* @private
*/
_updateStats() {
const stats = this.props.conference.getSpeakerStats();
const stats = this._getSpeakerStats();
this.setState({ stats });
this.setState({
...this.state,
stats
});
}
}

View File

@@ -0,0 +1,73 @@
/* @flow */
import { FieldTextStateless as TextField } from '@atlaskit/field-text';
import { makeStyles } from '@material-ui/core/styles';
import React, { useCallback, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
import { getFieldValue } from '../../base/react';
import { isSpeakerStatsSearchDisabled } from '../functions';
const useStyles = makeStyles(() => {
return {
speakerStatsSearch: {
position: 'absolute',
right: '50px',
top: '-5px'
}
};
});
/**
* The type of the React {@code Component} props of {@link SpeakerStatsSearch}.
*/
type Props = {
/**
* The function to initiate the change in the speaker stats table.
*/
onSearch: Function,
};
/**
* React component for display an individual user's speaker stats.
*
* @returns {React$Element<any>}
*/
function SpeakerStatsSearch({ onSearch }: Props) {
const classes = useStyles();
const { t } = useTranslation();
const [ searchValue, setSearchValue ] = useState<string>('');
const onChange = useCallback((evt: Event) => {
const value = getFieldValue(evt);
setSearchValue(value);
onSearch && onSearch(value);
}, []);
const disableSpeakerStatsSearch = useSelector(isSpeakerStatsSearchDisabled);
if (disableSpeakerStatsSearch) {
return null;
}
return (
<div className = { classes.speakerStatsSearch }>
<TextField
autoComplete = 'off'
autoFocus = { false }
compact = { true }
name = 'speakerStatsSearch'
onChange = { onChange }
placeholder = { t('speakerStats.search') }
shouldFitContainer = { false }
type = 'text'
value = { searchValue } />
</div>
);
}
export default SpeakerStatsSearch;

View File

@@ -0,0 +1,11 @@
// @flow
/**
* Checks if the speaker stats search is disabled.
*
* @param {*} state - The redux state.
* @returns {boolean} - True if the speaker stats search is disabled and false otherwise.
*/
export function isSpeakerStatsSearchDisabled(state: Object) {
return state['features/base/config']?.disableSpeakerStatsSearch;
}

View File

@@ -81,10 +81,6 @@ export class AudioMixerEffect {
this._mixedMediaStream = this._audioMixer.start();
this._mixedMediaTrack = this._mixedMediaStream.getTracks()[0];
// Sync the resulting mixed track enabled state with that of the track using the effect.
this.setMuted(!this._originalTrack.enabled);
this._originalTrack.enabled = true;
return this._mixedMediaStream;
}
@@ -94,9 +90,6 @@ export class AudioMixerEffect {
* @returns {void}
*/
stopEffect() {
// Match state of the original track with that of the mixer track, not doing so can
// result in an inconsistent state e.g. redux state is muted yet track is enabled.
this._originalTrack.enabled = this._mixedMediaTrack.enabled;
this._audioMixer.reset();
}
@@ -107,7 +100,7 @@ export class AudioMixerEffect {
* @returns {void}
*/
setMuted(muted: boolean) {
this._mixedMediaTrack.enabled = !muted;
this._originalTrack.enabled = !muted;
}
/**
@@ -116,6 +109,6 @@ export class AudioMixerEffect {
* @returns {boolean}
*/
isMuted() {
return !this._mixedMediaTrack.enabled;
return !this._originalTrack.enabled;
}
}

View File

@@ -1,5 +1,9 @@
// @flow
import {
ANDROID_SCREENSHARING_ENABLED,
getFeatureFlag
} from '../../../base/flags';
import { translate } from '../../../base/i18n';
import { IconShareDesktop } from '../../../base/icons';
import { connect } from '../../../base/redux';
@@ -82,8 +86,11 @@ class ScreenSharingAndroidButton extends AbstractButton<Props, *> {
* }}
*/
function _mapStateToProps(state): Object {
const enabled = getFeatureFlag(state, ANDROID_SCREENSHARING_ENABLED, true);
return {
_screensharing: isLocalVideoTrackDesktop(state)
_screensharing: isLocalVideoTrackDesktop(state),
visible: enabled
};
}

View File

@@ -5,8 +5,7 @@ import { IconShareDesktop } from '../../../base/icons';
import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { getLocalVideoTrack } from '../../../base/tracks';
import { isScreenAudioShared } from '../../../screen-share';
import { isScreenVideoShared } from '../../../screen-share';
type Props = AbstractButtonProps & {
@@ -113,7 +112,6 @@ class ShareDesktopButton extends AbstractButton<Props, *> {
* @returns {Object}
*/
const mapStateToProps = state => {
const localVideo = getLocalVideoTrack(state['features/base/tracks']);
let desktopSharingEnabled = JitsiMeetJS.isDesktopSharingEnabled();
const { enableFeaturesBasedOnToken } = state['features/base/config'];
@@ -129,7 +127,7 @@ const mapStateToProps = state => {
return {
_desktopSharingDisabledTooltipKey: desktopSharingDisabledTooltipKey,
_desktopSharingEnabled: desktopSharingEnabled,
_screensharing: (localVideo && localVideo.videoType === 'desktop') || isScreenAudioShared(state)
_screensharing: isScreenVideoShared(state)
};
};

View File

@@ -0,0 +1,30 @@
// @flow
import i18next from 'i18next';
import JITSI_TO_BCP47_MAP from './jitsiToBCP47LocaleMap.json';
const DEFAULT_TRANSCRIBER_LANG = 'en-US';
/**
* Determine which language to use for transcribing.
*
* @param {*} config - Application config.
* @returns {string}
*/
export function determineTranscriptionLanguage(config: Object) {
const { preferredTranscribeLanguage, transcribeWithAppLanguage = true } = config;
// Depending on the config either use the language that the app automatically detected or the hardcoded
// config value.
const jitsiLocale = transcribeWithAppLanguage ? i18next.language : preferredTranscribeLanguage;
// Jitsi uses custom language tags, but the transcriber expects BCP-47 compliant tags. We use a mapping file
// to convert them.
// Not all languages that the app might detect are supported by the transcriber in which case use the default.
const { [jitsiLocale]: bcp47Locale = DEFAULT_TRANSCRIBER_LANG } = JITSI_TO_BCP47_MAP;
return bcp47Locale;
}

View File

@@ -0,0 +1,51 @@
{
"en": "en-US",
"af": "af-ZA",
"ar": "ar-EG",
"bg": "bg-BG",
"ca": "ca-ES",
"cs": "cs-CZ",
"da": "da-DK",
"de": "de-DE",
"el": "el-GR",
"enGB": "en-GB",
"es": "es-ES",
"esUS": "es-US",
"et": "et-EE",
"eu": "eu-ES",
"fi": "fi-FI",
"fr": "fr-FR",
"frCA": "fr-CA",
"he": "iw-IL",
"hi": "hi-IN",
"mr": "mr-IN",
"hr": "hr-HR",
"hu": "hu-HU",
"hy": "hy-AM",
"id": "id-ID",
"it": "it-IT",
"ja": "ja-JP",
"ko": "ko-KR",
"lt": "lt-LT",
"ml": "ml-IN",
"lv": "lv-LV",
"nl": "nl-NL",
"fa": "fa-IR",
"pl": "pl-PL",
"pt": "pt-PT",
"ptBR": "pt-BR",
"ru": "ru-RU",
"ro": "ro-RO",
"sk": "sk-SK",
"sl": "sl-SL",
"sr": "sr-RS",
"sq": "sq-AL",
"sv": "sv-SE",
"te": "te-IN",
"th": "th-TH",
"tr": "tr-TR",
"uk": "uk-UA",
"vi": "vi-VN",
"zhCN": "zh (cmn-Hans-CN)",
"zhTW": "zh-TW (cmn-Hant-TW)"
}

View File

@@ -217,6 +217,9 @@ function _mapStateToProps(state) {
case LAYOUTS.VERTICAL_FILMSTRIP_VIEW:
_menuPosition = 'left-end';
break;
case LAYOUTS.HORIZONTAL_FILMSTRIP_VIEW:
_menuPosition = 'top';
break;
default:
_menuPosition = 'auto';
}

View File

@@ -390,6 +390,9 @@ function _mapStateToProps(state, ownProps) {
case LAYOUTS.VERTICAL_FILMSTRIP_VIEW:
_menuPosition = 'left-end';
break;
case LAYOUTS.HORIZONTAL_FILMSTRIP_VIEW:
_menuPosition = 'top';
break;
default:
_menuPosition = 'auto';
}

View File

@@ -83,7 +83,6 @@ class WelcomePageSideBar extends Component<Props> {
return (
<SlidingView
onHide = { this._onHideSideBar }
position = 'left'
show = { this.props._visible }
style = { styles.sideBar } >
<Header style = { styles.sideBarHeader }>

View File

@@ -1,6 +1,6 @@
// @flow
import { StyleSheet } from 'react-native';
import { Dimensions, StyleSheet } from 'react-native';
import { BoxModel, ColorPalette } from '../../base/styles';
@@ -196,7 +196,8 @@ export default {
* Container of the side bar.
*/
sideBar: {
width: 250
width: 250,
height: Dimensions.get('window').height
},
/**

View File

@@ -4963,9 +4963,9 @@
"dev": true
},
"path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"dev": true
},
"path-to-regexp": {

View File

@@ -7,6 +7,9 @@ end
local unlimited_jids = module:get_option_inherited_set("unlimited_jids", {});
-- rises the limit of the stanza size for the unlimited jids, default is 10MB
local unlimited_stanza_size_limit = module:get_option_number("unlimited_size", 10*1024*1024);
if unlimited_jids:empty() then
return;
end
@@ -20,5 +23,10 @@ module:hook("authentication-success", function (event)
elseif session.throttle then
session.throttle = nil;
end
if unlimited_stanza_size_limit and session.stream.set_stanza_size_limit then
module:log('info', 'Setting stanza size limits for %s to %s', jid, unlimited_stanza_size_limit)
session.stream:set_stanza_size_limit(unlimited_stanza_size_limit);
end
end
end);

View File

@@ -0,0 +1,126 @@
-- This module provides persistence for the "polls" feature,
-- by keeping track of the state of polls in each room, and sending
-- that state to new participants when they join.
local json = require("util.json");
local st = require("util.stanza");
local util = module:require("util");
local muc = module:depends("muc");
local is_healthcheck_room = util.is_healthcheck_room;
-- Checks if the given stanza contains a JSON message,
-- and that the message type pertains to the polls feature.
-- If yes, returns the parsed message. Otherwise, returns nil.
local function get_poll_message(stanza)
if stanza.attr.type ~= "groupchat" then
return nil;
end
local json_data = stanza:get_child_text("json-message", "http://jitsi.org/jitmeet");
if json_data == nil then
return nil;
end
local data = json.decode(json_data);
if data.type ~= "new-poll" and data.type ~= "answer-poll" then
return nil;
end
return data;
end
-- Logs a warning and returns true if a room does not
-- have poll data associated with it.
local function check_polls(room)
if room.polls == nil then
module:log("warn", "no polls data in room");
return true;
end
return false;
end
-- Sets up poll data in new rooms.
module:hook("muc-room-created", function(event)
local room = event.room;
if is_healthcheck_room(room.jid) then return end
module:log("debug", "setting up polls in room "..tostring(room));
room.polls = {
by_id = {};
order = {};
};
end);
-- Keeps track of the current state of the polls in each room,
-- by listening to "new-poll" and "answer-poll" messages,
-- and updating the room poll data accordingly.
-- This mirrors the client-side poll update logic.
module:hook("message/bare", function(event)
local data = get_poll_message(event.stanza);
if data == nil then return end
local room = muc.get_room_from_jid(event.stanza.attr.to);
if data.type == "new-poll" then
if check_polls(room) then return end
local answers = {}
for _, name in ipairs(data.answers) do
table.insert(answers, { name = name, voters = {} });
end
local poll = {
id = data.pollId,
sender_id = data.senderId,
sender_name = data.senderName,
question = data.question,
answers = answers
};
room.polls.by_id[data.pollId] = poll
table.insert(room.polls.order, poll)
elseif data.type == "answer-poll" then
if check_polls(room) then return end
local poll = room.polls.by_id[data.pollId];
if poll == nil then
module:log("warn", "answering inexistent poll");
return;
end
for i, value in ipairs(data.answers) do
poll.answers[i].voters[data.voterId] = value and data.voterName or nil;
end
end
end);
-- Sends the current poll state to new occupants after joining a room.
module:hook("muc-occupant-joined", function(event)
local room = event.room;
if is_healthcheck_room(room.jid) then return end
if room.polls == nil or #room.polls.order == 0 then
return
end
local data = {
type = "old-polls",
polls = {},
};
for i, poll in ipairs(room.polls.order) do
data.polls[i] = {
id = poll.id,
senderId = poll.sender_id,
senderName = poll.sender_name,
question = poll.question,
answers = poll.answers
};
end
local stanza = st.message({
from = room.jid,
to = event.occupant.jid
})
:tag("json-message", { xmlns = "http://jitsi.org/jitmeet" })
:text(json.encode(data))
:up();
room:route_stanza(stanza);
end);