Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2021-08-31 16:21:41 +0300
committerGitHub <noreply@github.com>2021-08-31 16:21:41 +0300
commitbf078427d5bf60b65bd60d17e979511c5a28b8e4 (patch)
tree7324b5c5b0ffa9d5be1e87d377ea0e24a6f305ca /src
parent54d8059cc5945f6a1ef1b200481472ee684c4964 (diff)
parent5f20110113f42bcdd3c196ddaf96cba6183241e2 (diff)
Merge pull request #6171 from nextcloud/techdebt/noid/improve-eslint
Improve ESLint part 2
Diffstat (limited to 'src')
-rw-r--r--src/components/AdminSettings/Commands.vue1
-rw-r--r--src/components/AdminSettings/HostedSignalingServer.vue1
-rw-r--r--src/components/AdminSettings/MatterbridgeIntegration.vue2
-rw-r--r--src/components/AdminSettings/TurnServers.vue1
-rw-r--r--src/init.js2
-rw-r--r--src/services/conversationsService.js2
-rw-r--r--src/services/filesIntegrationServices.js2
-rw-r--r--src/services/messagesService.js6
-rw-r--r--src/services/participantsService.js2
-rw-r--r--src/store/callViewStore.js7
-rw-r--r--src/store/conversationsStore.js11
-rw-r--r--src/store/fileUploadStore.js58
-rw-r--r--src/store/guestNameStore.js24
-rw-r--r--src/store/messagesStore.js126
-rw-r--r--src/store/newGroupConversationStore.js4
-rw-r--r--src/store/participantsStore.js41
-rw-r--r--src/store/quoteReplyStore.js10
-rw-r--r--src/store/tokenStore.js10
-rw-r--r--src/store/uiModeStore.js4
-rw-r--r--src/utils/signaling.js8
-rw-r--r--src/utils/webrtc/MediaDevicesManager.js6
-rw-r--r--src/utils/webrtc/SentVideoQualityThrottler.js4
-rw-r--r--src/utils/webrtc/SpeakingWhileMutedWarner.js12
-rw-r--r--src/utils/webrtc/VideoConstrainer.js2
-rw-r--r--src/utils/webrtc/analyzers/CallAnalyzer.js10
-rw-r--r--src/utils/webrtc/index.js8
-rw-r--r--src/utils/webrtc/models/CallParticipantModel.js4
-rw-r--r--src/utils/webrtc/simplewebrtc/localmedia.js6
-rw-r--r--src/utils/webrtc/simplewebrtc/peer.js6
-rw-r--r--src/utils/webrtc/simplewebrtc/simplewebrtc.js2
-rw-r--r--src/utils/webrtc/simplewebrtc/webrtc.js2
-rw-r--r--src/utils/webrtc/webrtc.js65
32 files changed, 230 insertions, 219 deletions
diff --git a/src/components/AdminSettings/Commands.vue b/src/components/AdminSettings/Commands.vue
index c3d4b22b2..c2ff5569e 100644
--- a/src/components/AdminSettings/Commands.vue
+++ b/src/components/AdminSettings/Commands.vue
@@ -30,6 +30,7 @@
</small>
</h2>
+ <!-- eslint-disable-next-line vue/no-v-html -->
<p class="settings-hint" v-html="commandHint" />
<div id="commands_list">
diff --git a/src/components/AdminSettings/HostedSignalingServer.vue b/src/components/AdminSettings/HostedSignalingServer.vue
index dac1499b7..c3d9a15bc 100644
--- a/src/components/AdminSettings/HostedSignalingServer.vue
+++ b/src/components/AdminSettings/HostedSignalingServer.vue
@@ -95,6 +95,7 @@
{{ requestError }}
</p>
+ <!-- eslint-disable-next-line vue/no-v-html -->
<p class="settings-hint additional-top-margin" v-html="disclaimerHint" />
</div>
<div v-else>
diff --git a/src/components/AdminSettings/MatterbridgeIntegration.vue b/src/components/AdminSettings/MatterbridgeIntegration.vue
index 81301f957..379c519f0 100644
--- a/src/components/AdminSettings/MatterbridgeIntegration.vue
+++ b/src/components/AdminSettings/MatterbridgeIntegration.vue
@@ -47,8 +47,10 @@
</template>
<template v-else>
+ <!-- eslint-disable-next-line vue/no-v-html -->
<p class="settings-hint" v-html="description" />
+ <!-- eslint-disable-next-line vue/no-v-html -->
<p class="settings-hint" v-html="customBinaryText" />
<p v-if="errorText" class="settings-hint">
diff --git a/src/components/AdminSettings/TurnServers.vue b/src/components/AdminSettings/TurnServers.vue
index 2dc9c6c66..a76806e9d 100644
--- a/src/components/AdminSettings/TurnServers.vue
+++ b/src/components/AdminSettings/TurnServers.vue
@@ -34,6 +34,7 @@
<span v-else class="icon icon-loading-small" />
</h2>
+ <!-- eslint-disable-next-line vue/no-v-html -->
<p class="settings-hint" v-html="documentationHint" />
<ul class="turn-servers">
diff --git a/src/init.js b/src/init.js
index e2789c323..0fe2418c6 100644
--- a/src/init.js
+++ b/src/init.js
@@ -33,7 +33,7 @@ if (!window.OCA.Talk) {
/**
* Frontend message API for adding actions to talk messages.
*
- * @param {object} data the wrapping object.
+ * @param {object} data the wrapping object;
* @param {string} data.label the action label.
* @param {Function} data.callback the callback function. This function will receive
* the messageAPIData object as a parameter and be triggered by a click on the
diff --git a/src/services/conversationsService.js b/src/services/conversationsService.js
index 49cb4fb22..fffbb9005 100644
--- a/src/services/conversationsService.js
+++ b/src/services/conversationsService.js
@@ -62,7 +62,7 @@ const searchListedConversations = async function({ searchText }, options) {
/**
* Fetch possible conversations
*
- * @param {object} data the wrapping object.
+ * @param {object} data the wrapping object;
* @param {string} data.searchText The string that will be used in the search query.
* @param {string} [data.token] The token of the conversation (if any), or "new" for a new one
* @param {boolean} [data.onlyUsers] Only return users
diff --git a/src/services/filesIntegrationServices.js b/src/services/filesIntegrationServices.js
index 64c7a4aec..8b4964359 100644
--- a/src/services/filesIntegrationServices.js
+++ b/src/services/filesIntegrationServices.js
@@ -26,7 +26,7 @@ import { generateOcsUrl } from '@nextcloud/router'
/**
* Gets the conversation token for a given file id
*
- * @param {object} data the wrapping object.
+ * @param {object} data the wrapping object;
* @param {number} data.fileId The file id to get the conversation for
* @param {object} options unused
* @return {string} the conversation token
diff --git a/src/services/messagesService.js b/src/services/messagesService.js
index 849c881f0..f9d29a713 100644
--- a/src/services/messagesService.js
+++ b/src/services/messagesService.js
@@ -29,7 +29,7 @@ import Hex from 'crypto-js/enc-hex'
* Fetches messages that belong to a particular conversation
* specified with its token.
*
- * @param {object} data the wrapping object.
+ * @param {object} data the wrapping object;
* @param {string} data.token the conversation token;
* @param {string} data.lastKnownMessageId last known message id;
* @param {boolean} data.includeLastKnown whether to include the last known message in the response;
@@ -50,7 +50,7 @@ const fetchMessages = async function({ token, lastKnownMessageId, includeLastKno
* Fetches newly created messages that belong to a particular conversation
* specified with its token.
*
- * @param {object} data the wrapping object.
+ * @param {object} data the wrapping object;
* @param {number} data.lastKnownMessageId The id of the last message in the store.
* @param {string} data.token The conversation token;
* @param {object} options options
@@ -101,7 +101,7 @@ const deleteMessage = async function({ token, id }) {
* Post a rich object to a conversation
*
* @param {string} token conversation token
- * @param {object} data the wrapping object.
+ * @param {object} data the wrapping object;
* @param {string} data.objectType object type
* @param {string} data.objectId object id
* @param {string} data.metaData JSON metadata of the rich object encoded as string
diff --git a/src/services/participantsService.js b/src/services/participantsService.js
index 3b50b54d8..286a4552f 100644
--- a/src/services/participantsService.js
+++ b/src/services/participantsService.js
@@ -33,7 +33,7 @@ import {
* Joins the current user to a conversation specified with
* the token.
*
- * @param {object} data the wrapping object.
+ * @param {object} data the wrapping object;
* @param {string} data.token The conversation token;
* @param {boolean} data.forceJoin whether to force join;
* @param {options} options request options;
diff --git a/src/store/callViewStore.js b/src/store/callViewStore.js
index 05d9b311b..c63f7488b 100644
--- a/src/store/callViewStore.js
+++ b/src/store/callViewStore.js
@@ -140,9 +140,10 @@ const actions = {
* If clearLast is false, also remembers it in separate properties.
*
* @param {object} context default store context;
- * @param {boolean|null} isGrid true for enabled grid mode, false for speaker view;
- * @param {boolean|null} isStripeOpen true for visible stripel mode, false for speaker view;
- * @param {boolean} clearLast set to false to not reset last temporary remembered state;
+ * @param {object} data the wrapping object;
+ * @param {boolean|null} data.isGrid true for enabled grid mode, false for speaker view;
+ * @param {boolean|null} data.isStripeOpen true for visible stripel mode, false for speaker view;
+ * @param {boolean} data.clearLast set to false to not reset last temporary remembered state;
*/
setCallViewMode(context, { isGrid = null, isStripeOpen = null, clearLast = true }) {
if (clearLast) {
diff --git a/src/store/conversationsStore.js b/src/store/conversationsStore.js
index 4bef78e5c..31a3caf3b 100644
--- a/src/store/conversationsStore.js
+++ b/src/store/conversationsStore.js
@@ -78,8 +78,7 @@ const getters = {
* Get a conversation providing it's token
*
* @param {object} state state object
- * @return {Function} The callback function
- * @return {object} The conversation object
+ * @return {Function} The callback function returning the conversation object
*/
conversation: state => token => state.conversations[token],
dummyConversation: state => Object.assign({}, DUMMY_CONVERSATION),
@@ -192,8 +191,8 @@ const actions = {
* Delete a conversation from the server.
*
* @param {object} context default store context;
- * @param token.token
- * @param {object} token the token of the conversation to be deleted;
+ * @param {object} data the wrapping object;
+ * @param {object} data.token the token of the conversation to be deleted;
*/
async deleteConversationFromServer(context, { token }) {
await deleteConversation(token)
@@ -205,8 +204,8 @@ const actions = {
* Delete all the messages from a conversation.
*
* @param {object} context default store context;
- * @param token.token
- * @param {object} token the token of the conversation whose history is
+ * @param {object} data the wrapping object;
+ * @param {object} data.token the token of the conversation whose history is
* to be cleared;
*/
async clearConversationHistory(context, { token }) {
diff --git a/src/store/fileUploadStore.js b/src/store/fileUploadStore.js
index 93ec22a6b..0cf8f7c40 100644
--- a/src/store/fileUploadStore.js
+++ b/src/store/fileUploadStore.js
@@ -189,12 +189,15 @@ const actions = {
/**
* Initialises uploads and shares files to a conversation
*
- * @param files.commit
- * @param files.dispatch
- * @param {object} files the files to be processed
- * @param {string} token the conversation's token where to share the files
- * @param {number} uploadId a unique id for the upload operation indexing
- * @param {boolean} rename whether to rename the files (usually after pasting)
+ * @param {object} context the wrapping object.
+ * @param {Function} context.commit the contexts commit function.
+ * @param {Function} context.dispatch the contexts dispatch function.
+ * @param {object} data the wrapping object;
+ * @param {object} data.files the files to be processed
+ * @param {string} data.token the conversation's token where to share the files
+ * @param {number} data.uploadId a unique id for the upload operation indexing
+ * @param {boolean} data.rename whether to rename the files (usually after pasting)
+ * @param {boolean} data.isVoiceMessage whether the file is a voice recording
*/
async initialiseUpload({ commit, dispatch }, { uploadId, token, files, rename = false, isVoiceMessage }) {
// Set last upload id
@@ -233,13 +236,12 @@ const actions = {
/**
* Discards an upload
*
- * @param {object} param0 Commit and state
- * @param param0.commit
- * @param param0.state
+ * @param {object} context the wrapping object.
+ * @param {Function} context.commit the contexts commit function.
+ * @param {object} context.state the contexts state object.
* @param {object} uploadId The unique uploadId
- * @param param0.getters
*/
- discardUpload({ commit, state, getters }, uploadId) {
+ discardUpload({ commit, state }, uploadId) {
if (state.currentUploadId === uploadId) {
commit('setCurrentUploadId', undefined)
}
@@ -250,12 +252,12 @@ const actions = {
/**
* Uploads the files to the root directory of the user
*
- * @param {object} param0 Commit, state and getters
- * @param param0.commit
- * @param param0.dispatch
- * @param {object} uploadId The unique uploadId
- * @param param0.state
- * @param param0.getters
+ * @param {object} context the wrapping object.
+ * @param {Function} context.commit the contexts commit function.
+ * @param {Function} context.dispatch the contexts dispatch function.
+ * @param {object} context.getters the contexts getters object.
+ * @param {object} context.state the contexts state object.
+ * @param {string} uploadId The unique uploadId
*/
async uploadFiles({ commit, dispatch, state, getters }, uploadId) {
if (state.currentUploadId === uploadId) {
@@ -366,12 +368,12 @@ const actions = {
/**
* Mark a file as shared
*
- * @param {object} context default store context;
- * @param {object} param1 The unique upload id original file index
- * @param context.commit
- * @param context.state
- * @param param1.uploadId
- * @param param1.index
+ * @param {object} context the wrapping object.
+ * @param {Function} context.commit the contexts commit function.
+ * @param {object} context.state the contexts state object.
+ * @param {object} data the wrapping object;
+ * @param {string} data.uploadId The id of the upload process
+ * @param {number} data.index The object index inside the upload process
* @throws {Error} when the item is already being shared by another async call
*/
markFileAsSharing({ commit, state }, { uploadId, index }) {
@@ -385,9 +387,9 @@ const actions = {
* Mark a file as shared
*
* @param {object} context default store context;
- * @param {object} param1 The unique upload id original file index
- * @param param1.uploadId
- * @param param1.index
+ * @param {object} data the wrapping object;
+ * @param {string} data.uploadId The id of the upload process
+ * @param {number} data.index The object index inside the upload process
*/
markFileAsShared(context, { uploadId, index }) {
context.commit('markFileAsShared', { uploadId, index })
@@ -396,8 +398,8 @@ const actions = {
/**
* Mark a file as shared
*
- * @param {object} context default store context;
- * @param context.commit
+ * @param {object} context the wrapping object.
+ * @param {Function} context.commit the contexts commit function.
* @param {string} temporaryMessageId message id of the temporary message associated to the file to remove
*/
removeFileFromSelection({ commit }, temporaryMessageId) {
diff --git a/src/store/guestNameStore.js b/src/store/guestNameStore.js
index 88675e903..94f39acc5 100644
--- a/src/store/guestNameStore.js
+++ b/src/store/guestNameStore.js
@@ -46,10 +46,11 @@ const mutations = {
* Adds a guest name to the store
*
* @param {object} state current store state
- * @param {boolean} noUpdate Only set the guest name if it was not set before
- * @param {string} token the token of the conversation
- * @param {string} actorId the guest
- * @param {string} actorDisplayName the display name to set
+ * @param {object} data the wrapping object;
+ * @param {boolean} data.noUpdate Only set the guest name if it was not set before
+ * @param {string} data.token the token of the conversation
+ * @param {string} data.actorId the guest
+ * @param {string} data.actorDisplayName the display name to set
*/
addGuestName(state, { noUpdate, token, actorId, actorDisplayName }) {
if (!state.guestNames[token]) {
@@ -70,20 +71,23 @@ const actions = {
* Add guest name of a chat message to the store
*
* @param {object} context default store context
- * @param {string} token the token of the conversation
- * @param {string} actorId the guest
- * @param {string} actorDisplayName the display name to set
+ * @param {object} data the wrapping object;
+ * @param {string} data.token the token of the conversation
+ * @param {string} data.actorId the guest
+ * @param {string} data.actorDisplayName the display name to set
*/
setGuestNameIfEmpty(context, { token, actorId, actorDisplayName }) {
context.commit('addGuestName', { noUpdate: true, token, actorId, actorDisplayName })
},
+
/**
* Add guest name of a chat message to the store
*
* @param {object} context default store context
- * @param {string} token the token of the conversation
- * @param {string} actorId the guest
- * @param {string} actorDisplayName the display name to set
+ * @param {object} data the wrapping object;
+ * @param {string} data.token the token of the conversation
+ * @param {string} data.actorId the guest
+ * @param {string} data.actorDisplayName the display name to set
*/
forceGuestName(context, { token, actorId, actorDisplayName }) {
context.commit('addGuestName', { noUpdate: false, token, actorId, actorDisplayName })
diff --git a/src/store/messagesStore.js b/src/store/messagesStore.js
index 5c3be0c55..221ae5bd6 100644
--- a/src/store/messagesStore.js
+++ b/src/store/messagesStore.js
@@ -141,27 +141,12 @@ const getters = {
}
return []
},
- /**
- * Gets the messages object
- *
- * @param {object} state the state object.
- * @param {string} token the conversation token.
- * @return {object} the messages object (if there are messages in the store)
- */
messages: (state) => (token) => {
if (state.messages[token]) {
return state.messages[token]
}
return {}
},
- /**
- * Gets a single message object
- *
- * @param {object} state the state object.
- * @param {string} token the conversation token.
- * @param {string} id the message id.
- * @return {object} the message object (if the message is found in the store)
- */
message: (state) => (token, id) => {
if (state.messages[token][id]) {
return state.messages[token][id]
@@ -262,10 +247,9 @@ const mutations = {
* Deletes a message from the store.
*
* @param {object} state current store state;
- * @param message.message
- * @param {object} message the message;
- * @param {string} placeholder Placeholder message until deleting finished
- * @param message.placeholder
+ * @param {object} data the wrapping object;
+ * @param {object} data.message the message;
+ * @param {string} data.placeholder Placeholder message until deleting finished
*/
markMessageAsDeleting(state, { message, placeholder }) {
Vue.set(state.messages[message.token][message.id], 'messageType', 'comment_deleted')
@@ -288,10 +272,9 @@ const mutations = {
* Adds a temporary message to the store.
*
* @param {object} state current store state;
- * @param message.message
- * @param {object} message the temporary message;
- * @param {string} reason the reason the temporary message failed;
- * @param message.reason
+ * @param {object} data the wrapping object;
+ * @param {object} data.message the temporary message;
+ * @param {string} data.reason the reason the temporary message failed;
*/
markTemporaryMessageAsFailed(state, { message, reason }) {
if (state.messages[message.token][message.id]) {
@@ -301,8 +284,9 @@ const mutations = {
/**
* @param {object} state current store state;
- * @param {string} token Token of the conversation
- * @param {string} id Id of the first known chat message
+ * @param {object} data the wrapping object;
+ * @param {string} data.token Token of the conversation
+ * @param {string} data.id Id of the first known chat message
*/
setFirstKnownMessageId(state, { token, id }) {
Vue.set(state.firstKnown, token, id)
@@ -310,8 +294,9 @@ const mutations = {
/**
* @param {object} state current store state;
- * @param {string} token Token of the conversation
- * @param {string} id Id of the last known chat message
+ * @param {object} data the wrapping object;
+ * @param {string} data.token Token of the conversation
+ * @param {string} data.id Id of the last known chat message
*/
setLastKnownMessageId(state, { token, id }) {
Vue.set(state.lastKnown, token, id)
@@ -319,8 +304,9 @@ const mutations = {
/**
* @param {object} state current store state;
- * @param {string} token Token of the conversation
- * @param {string} id Id of the last read chat message
+ * @param {object} data the wrapping object;
+ * @param {string} data.token Token of the conversation
+ * @param {string} data.id Id of the last read chat message
*/
setVisualLastReadMessageId(state, { token, id }) {
Vue.set(state.visualLastReadMessageId, token, id)
@@ -379,10 +365,9 @@ const actions = {
* Delete a message
*
* @param {object} context default store context;
- * @param message.message
- * @param {object} message the message to be deleted;
- * @param {string} placeholder Placeholder message until deleting finished
- * @param message.placeholder
+ * @param {object} data the wrapping object;
+ * @param {object} data.message the message to be deleted;
+ * @param {string} data.placeholder Placeholder message until deleting finished
*/
async deleteMessage(context, { message, placeholder }) {
const messageObject = Object.assign({}, context.getters.message(message.token, message.id))
@@ -413,12 +398,14 @@ const actions = {
* on the message to be replied and the current actor
*
* @param {object} context default store context;
- * @param {string} text message string;
- * @param {string} token conversation token;
- * @param {string} uploadId upload id;
- * @param {number} index index;
- * @param {object} file file to upload;
- * @param {string} localUrl local URL of file to upload;
+ * @param {object} data the wrapping object;
+ * @param {string} data.text message string;
+ * @param {string} data.token conversation token;
+ * @param {string} data.uploadId upload id;
+ * @param {number} data.index index;
+ * @param {object} data.file file to upload;
+ * @param {string} data.localUrl local URL of file to upload;
+ * @param {boolean} data.isVoiceMessage whether the temporary file is a voice message
* @return {object} temporary message
*/
createTemporaryMessage(context, { text, token, uploadId, index, file, localUrl, isVoiceMessage }) {
@@ -484,10 +471,9 @@ const actions = {
* Mark a temporary message as failed to allow retrying it again
*
* @param {object} context default store context;
- * @param message.message
- * @param {object} message the temporary message;
- * @param {string} reason the reason the temporary message failed;
- * @param message.reason
+ * @param {object} data the wrapping object;
+ * @param {object} data.message the temporary message;
+ * @param {string} data.reason the reason the temporary message failed;
*/
markTemporaryMessageAsFailed(context, { message, reason }) {
context.commit('markTemporaryMessageAsFailed', { message, reason })
@@ -505,8 +491,9 @@ const actions = {
/**
* @param {object} context default store context;
- * @param {string} token Token of the conversation
- * @param {string} id Id of the first known chat message
+ * @param {object} data the wrapping object;
+ * @param {string} data.token Token of the conversation
+ * @param {string} data.id Id of the first known chat message
*/
setFirstKnownMessageId(context, { token, id }) {
context.commit('setFirstKnownMessageId', { token, id })
@@ -514,8 +501,9 @@ const actions = {
/**
* @param {object} context default store context;
- * @param {string} token Token of the conversation
- * @param {string} id Id of the last known chat message
+ * @param {object} data the wrapping object;
+ * @param {string} data.token Token of the conversation
+ * @param {string} data.id Id of the last known chat message
*/
setLastKnownMessageId(context, { token, id }) {
context.commit('setLastKnownMessageId', { token, id })
@@ -523,8 +511,9 @@ const actions = {
/**
* @param {object} context default store context;
- * @param {string} token Token of the conversation
- * @param {string} id Id of the last read chat message
+ * @param {object} data the wrapping object;
+ * @param {string} data.token Token of the conversation
+ * @param {string} data.id Id of the last read chat message
*/
setVisualLastReadMessageId(context, { token, id }) {
context.commit('setVisualLastReadMessageId', { token, id })
@@ -545,10 +534,9 @@ const actions = {
* in the conversation.
*
* @param {object} context default store context;
- * @param token.token
- * @param {object} token the token of the conversation to be updated;
- * @param {boolean} updateVisually whether to also clear the marker visually in the UI;
- * @param token.updateVisually
+ * @param {object} data the wrapping object;
+ * @param {object} data.token the token of the conversation to be updated;
+ * @param {boolean} data.updateVisually whether to also clear the marker visually in the UI;
*/
async clearLastReadMessage(context, { token, updateVisually = false }) {
const conversation = context.getters.conversations[token]
@@ -565,12 +553,10 @@ const actions = {
* Optionally also updated the marker visually in the UI if specified.
*
* @param {object} context default store context;
- * @param token.token
- * @param {object} token the token of the conversation to be updated;
- * @param {number} id the id of the message on which to set the read marker;
- * @param {boolean} updateVisually whether to also update the marker visually in the UI;
- * @param token.id
- * @param token.updateVisually
+ * @param {object} data the wrapping object;
+ * @param {object} data.token the token of the conversation to be updated;
+ * @param {number} data.id the id of the message on which to set the read marker;
+ * @param {boolean} data.updateVisually whether to also update the marker visually in the UI;
*/
async updateLastReadMessage(context, { token, id = 0, updateVisually = false }) {
const conversation = context.getters.conversations[token]
@@ -599,10 +585,11 @@ const actions = {
* specified with its token.
*
* @param {object} context default store context;
- * @param {string} token the conversation token;
- * @param {object} requestOptions request options;
- * @param {string} lastKnownMessageId last known message id;
- * @param {boolean} includeLastKnown whether to include the last known message in the response;
+ * @param {object} data the wrapping object;
+ * @param {string} data.token the conversation token;
+ * @param {object} data.requestOptions request options;
+ * @param {string} data.lastKnownMessageId last known message id;
+ * @param {boolean} data.includeLastKnown whether to include the last known message in the response;
*/
async fetchMessages(context, { token, lastKnownMessageId, includeLastKnown, requestOptions }) {
context.dispatch('cancelFetchMessages')
@@ -681,10 +668,11 @@ const actions = {
* This call will long-poll when hasMoreMessagesToLoad() returns false.
*
* @param {object} context default store context;
- * @param {string} token The conversation token;
- * @param {string} requestId id to identify request uniquely
- * @param {object} requestOptions request options;
- * @param {number} lastKnownMessageId The id of the last message in the store.
+ * @param {object} data the wrapping object;
+ * @param {string} data.token The conversation token;
+ * @param {string} data.requestId id to identify request uniquely
+ * @param {object} data.requestOptions request options;
+ * @param {number} data.lastKnownMessageId The id of the last message in the store.
*/
async lookForNewMessages(context, { token, lastKnownMessageId, requestId, requestOptions }) {
context.dispatch('cancelLookForNewMessages', { requestId })
@@ -902,8 +890,8 @@ const actions = {
*
* @param {object} context default store context;
* will be forwarded;
- * @param {object} message the message object;
- * @param message.messageToBeForwarded
+ * @param {object} data the wrapping object;
+ * @param {object} data.messageToBeForwarded the message object;
*/
async forwardMessage(context, { messageToBeForwarded }) {
const response = await postNewMessage(messageToBeForwarded)
diff --git a/src/store/newGroupConversationStore.js b/src/store/newGroupConversationStore.js
index 63257d2e1..2682f2e87 100644
--- a/src/store/newGroupConversationStore.js
+++ b/src/store/newGroupConversationStore.js
@@ -85,8 +85,8 @@ const actions = {
* Adds or removes the participant to the selected participants array
*
* @param {object} context default store context;
- * @param context.commit
- * @param context.state
+ * @param {Function} context.commit the contexts commit function.
+ * @param {object} context.state the contexts state object.
* @param {object} participant the clicked participant;
*/
updateSelectedParticipants({ commit, state }, participant) {
diff --git a/src/store/participantsStore.js b/src/store/participantsStore.js
index 5fa13a44e..3ec1ac21b 100644
--- a/src/store/participantsStore.js
+++ b/src/store/participantsStore.js
@@ -112,10 +112,9 @@ const mutations = {
* Adds a message to the store.
*
* @param {object} state current store state;
- * @param token.token
- * @param {object} token the token of the conversation;
- * @param {object} participant the participant;
- * @param token.participant
+ * @param {object} data the wrapping object;
+ * @param {object} data.token the token of the conversation;
+ * @param {object} data.participant the participant;
*/
addParticipant(state, { token, participant }) {
if (!state.participants[token]) {
@@ -196,9 +195,10 @@ const actions = {
* Only call this after purgeParticipantsStore, otherwise use addParticipantOnce
*
* @param {object} context default store context;
- * @param context.commit
- * @param {string} token the conversation to add the participant;
- * @param {object} participant the participant;
+ * @param {Function} context.commit the contexts commit function.
+ * @param {object} data the wrapping object;
+ * @param {string} data.token the conversation to add the participant;
+ * @param {object} data.participant the participant;
*/
addParticipant({ commit }, { token, participant }) {
commit('addParticipant', { token, participant })
@@ -207,10 +207,11 @@ const actions = {
* Only add a participant when they are not there yet
*
* @param {object} context default store context;
- * @param context.commit
- * @param context.getters
- * @param {string} token the conversation to add the participant;
- * @param {object} participant the participant;
+ * @param {Function} context.commit the contexts commit function.
+ * @param {object} context.getters the contexts getters object.
+ * @param {object} data the wrapping object;
+ * @param {string} data.token the conversation to add the participant;
+ * @param {object} data.participant the participant;
*/
addParticipantOnce({ commit, getters }, { token, participant }) {
const index = getters.getParticipantIndex(token, participant)
@@ -265,7 +266,7 @@ const actions = {
* Purges a given conversation from the previously added participants
*
* @param {object} context default store context;
- * @param context.commit
+ * @param {Function} context.commit the contexts commit function.
* @param {string} token the conversation to purge;
*/
purgeParticipantsStore({ commit }, token) {
@@ -369,8 +370,9 @@ const actions = {
* If no userId is set, send to all applicable participants.
*
* @param {object} _ unused
- * @param {string} token conversation token
- * @param {number} attendeeId attendee id to target, or null for all
+ * @param {object} data the wrapping object;
+ * @param {string} data.token conversation token
+ * @param {number} data.attendeeId attendee id to target, or null for all
*/
async resendInvitations(_, { token, attendeeId }) {
await resendInvitations(token, { attendeeId })
@@ -380,7 +382,8 @@ const actions = {
* Makes the current user active in the given conversation.
*
* @param {object} context unused
- * @param {string} token conversation token
+ * @param {object} data the wrapping object;
+ * @param {string} data.token conversation token
*/
async joinConversation(context, { token }) {
const forceJoin = SessionStorage.getItem('joined_conversation') === token
@@ -429,7 +432,7 @@ const actions = {
// not listen to when it was used.
const interval = setInterval(function() {
// eslint-disable-next-line no-undef
- if ($('.oc-dialog-dim').length === 0) {
+ if (document.getElementsByClassName('oc-dialog-dim').length === 0) {
clearInterval(interval)
EventBus.$emit('duplicate-session-detected')
window.location = generateUrl('/apps/spreed')
@@ -468,7 +471,8 @@ const actions = {
* Makes the current user inactive in the given conversation.
*
* @param {object} context unused
- * @param {string} token conversation token
+ * @param {object} data the wrapping object;
+ * @param {string} data.token conversation token
*/
async leaveConversation(context, { token }) {
await leaveConversation(token)
@@ -479,7 +483,8 @@ const actions = {
* means the user is not a participant any more.
*
* @param {object} context unused
- * @param {string} token conversation token
+ * @param {object} data the wrapping object;
+ * @param {string} data.token conversation token
*/
async removeCurrentUserFromConversation(context, { token }) {
await removeCurrentUserFromConversation(token)
diff --git a/src/store/quoteReplyStore.js b/src/store/quoteReplyStore.js
index 54167fa07..533100ce0 100644
--- a/src/store/quoteReplyStore.js
+++ b/src/store/quoteReplyStore.js
@@ -71,8 +71,9 @@ const mutations = {
* Sets the current message input for a given conversation
*
* @param {object} state Current store state;
- * @param {string} token The conversation token;
- * @param {string} text Message text to set or null to clear it;
+ * @param {object} data the wrapping object;
+ * @param {string} data.token The conversation token;
+ * @param {string} data.text Message text to set or null to clear it;
*/
setCurrentMessageInput(state, { token, text = null }) {
if (text !== null) {
@@ -123,8 +124,9 @@ const actions = {
* Stores the current message input for a given conversation
*
* @param {object} context default store context;
- * @param {string} token the token of the conversation to be deleted;
- * @param {string} text string to set or null to clear it;
+ * @param {object} data the wrapping object;
+ * @param {string} data.token the token of the conversation to be deleted;
+ * @param {string} data.text string to set or null to clear it;
*/
setCurrentMessageInput(context, { token, text }) {
context.commit('setCurrentMessageInput', { token, text })
diff --git a/src/store/tokenStore.js b/src/store/tokenStore.js
index 6276f708b..9be124f3c 100644
--- a/src/store/tokenStore.js
+++ b/src/store/tokenStore.js
@@ -60,8 +60,9 @@ const mutations = {
* Updates the file ID for the current token
*
* @param {object} state current store state
- * @param {string} newToken The token of the active conversation
- * @param {number} newFileId The file ID of the active conversation
+ * @param {object} data the wrapping object;
+ * @param {string} data.newToken The token of the active conversation
+ * @param {number} data.newFileId The file ID of the active conversation
*/
updateTokenAndFileIdForToken(state, { newToken, newFileId }) {
state.token = newToken
@@ -89,8 +90,9 @@ const actions = {
* Updates the file ID for the current token
*
* @param {object} context default store context
- * @param {string} newToken The token of the active conversation
- * @param {number} newFileId The file ID of the active conversation
+ * @param {object} data the wrapping object;
+ * @param {string} data.newToken The token of the active conversation
+ * @param {number} data.newFileId The file ID of the active conversation
*/
updateTokenAndFileIdForToken(context, { newToken, newFileId }) {
context.commit('updateTokenAndFileIdForToken', { newToken, newFileId })
diff --git a/src/store/uiModeStore.js b/src/store/uiModeStore.js
index f780fbd61..eeff51141 100644
--- a/src/store/uiModeStore.js
+++ b/src/store/uiModeStore.js
@@ -3,7 +3,7 @@
*
* @author Daniel Calviño Sánchez <danxuliu@gmail.com>
*
- * @license GNU AGPL version 3 or any later version
+ * @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -49,7 +49,7 @@ const actions = {
* By default the container selector is undefined, which in practice will
* cause the components to use "body" as the selector.
*
- * @param {Object} context default store context
+ * @param {object} context default store context
* @param {string} mainContainerSelector the selector for the container
*/
setMainContainerSelector(context, mainContainerSelector) {
diff --git a/src/utils/signaling.js b/src/utils/signaling.js
index 7eba45581..bc6a46beb 100644
--- a/src/utils/signaling.js
+++ b/src/utils/signaling.js
@@ -72,7 +72,7 @@ const Signaling = {
}
/**
- * @param settings
+ * @param {object} settings The signaling settings
*/
function Base(settings) {
this.settings = settings
@@ -337,7 +337,7 @@ Signaling.Base.prototype.leaveCall = function(token, keepToken) {
// Connection to the internal signaling server provided by the app.
/**
- * @param settings
+ * @param {object} settings The signaling settings
*/
function Internal(settings) {
Signaling.Base.prototype.constructor.apply(this, arguments)
@@ -545,8 +545,8 @@ Signaling.Internal.prototype.sendPendingMessages = function() {
}
/**
- * @param settings
- * @param urls
+ * @param {object} settings The signaling settings
+ * @param {string|string[]} urls The url of the signaling server
*/
function Standalone(settings, urls) {
Signaling.Base.prototype.constructor.apply(this, arguments)
diff --git a/src/utils/webrtc/MediaDevicesManager.js b/src/utils/webrtc/MediaDevicesManager.js
index b43956247..f39e37b87 100644
--- a/src/utils/webrtc/MediaDevicesManager.js
+++ b/src/utils/webrtc/MediaDevicesManager.js
@@ -366,10 +366,10 @@ MediaDevicesManager.prototype = {
* For compatibility with older browsers "finally" should not be used on the
* returned Promise.
*
- * @param {MediaStreamConstraints} constraints the constraints specifying
- * the media to request
+ * @param {object} constraints the constraints specifying
+ * the media to request.
* @return {Promise} resolved with a MediaStream object when successful, or
- * rejected with a DOMException in case of error
+ * rejected with a DOMException in case of error.
*/
getUserMedia(constraints) {
if (!this.isSupported()) {
diff --git a/src/utils/webrtc/SentVideoQualityThrottler.js b/src/utils/webrtc/SentVideoQualityThrottler.js
index 8822e5b2b..dd1a8c6bc 100644
--- a/src/utils/webrtc/SentVideoQualityThrottler.js
+++ b/src/utils/webrtc/SentVideoQualityThrottler.js
@@ -34,8 +34,8 @@ import {
* increase the video quality depending on the call state. Basically the goal is
* to reduce the CPU usage when there are too many participants in a call.
*
- * @param {LocalMediaModel} localMediaModel the model for the local media.
- * @param {CallParticipantCollection} callParticipantCollection the collection
+ * @param {object} localMediaModel the model for the local media.
+ * @param {object} callParticipantCollection the collection.
* that contains the models for the rest of the participants in the call.
*/
export default function SentVideoQualityThrottler(localMediaModel, callParticipantCollection) {
diff --git a/src/utils/webrtc/SpeakingWhileMutedWarner.js b/src/utils/webrtc/SpeakingWhileMutedWarner.js
index 75f4b2250..bf13984ac 100644
--- a/src/utils/webrtc/SpeakingWhileMutedWarner.js
+++ b/src/utils/webrtc/SpeakingWhileMutedWarner.js
@@ -40,13 +40,13 @@
* to the user even if the browser window is not in the foreground (provided
* the user granted the permissions to receive notifications from the site).
*
- * @param {LocalMediaModel} model the model that emits "speakingWhileMuted"
- * events
- * @param {View} view the view that provides the
- * "setSpeakingWhileMutedNotification" method
+ * @param {object} LocalMediaModel the model that emits "speakingWhileMuted"
+ * events.
+ * @param {object} view the view that provides the
+ * "setSpeakingWhileMutedNotification" method.
*/
-export default function SpeakingWhileMutedWarner(model, view) {
- this._model = model
+export default function SpeakingWhileMutedWarner(LocalMediaModel, view) {
+ this._model = LocalMediaModel
this._view = view
this._handleSpeakingWhileMutedChangeBound = this._handleSpeakingWhileMutedChange.bind(this)
diff --git a/src/utils/webrtc/VideoConstrainer.js b/src/utils/webrtc/VideoConstrainer.js
index 381244fd3..511e6b41a 100644
--- a/src/utils/webrtc/VideoConstrainer.js
+++ b/src/utils/webrtc/VideoConstrainer.js
@@ -40,7 +40,7 @@ const QUALITY = {
* a simple interface to set the constraints based on some general quality
* description.
*
- * @param {LocalMediaModel} localMediaModel the model for the local media.
+ * @param {object} localMediaModel the model for the local media.
*/
function VideoConstrainer(localMediaModel) {
this._localMediaModel = localMediaModel
diff --git a/src/utils/webrtc/analyzers/CallAnalyzer.js b/src/utils/webrtc/analyzers/CallAnalyzer.js
index aff43ae0d..689fb5d7d 100644
--- a/src/utils/webrtc/analyzers/CallAnalyzer.js
+++ b/src/utils/webrtc/analyzers/CallAnalyzer.js
@@ -43,11 +43,11 @@ import {
* Once the CallAnalyzer is no longer needed "destroy()" must be called to stop
* the analysis.
*
- * @param {LocalMediaModel} localMediaModel the model for the local media.
- * @param {LocalCallParticipantModel} localCallParticipantModel the model for
- * the local participant; null if an MCU is not used.
- * @param {CallParticipantCollection} callParticipantCollection the collection
- * for the remote participants.
+ * @param {object} localMediaModel the model for the local media.
+ * @param {object} localCallParticipantModel the model for
+ * the local participant; null if an MCU is not used.
+ * @param {object} callParticipantCollection the collection
+ * for the remote participants.
*/
export default function CallAnalyzer(localMediaModel, localCallParticipantModel, callParticipantCollection) {
this.attributes = {
diff --git a/src/utils/webrtc/index.js b/src/utils/webrtc/index.js
index 7bbb16125..9b4ed8730 100644
--- a/src/utils/webrtc/index.js
+++ b/src/utils/webrtc/index.js
@@ -47,7 +47,7 @@ let signaling = null
let tokensInSignaling = {}
/**
- * @param token
+ * @param {string} token The token of the conversation to get the signaling settings for
*/
async function getSignalingSettings(token) {
// If getSignalingSettings is called again while a previous one was still
@@ -80,7 +80,7 @@ async function getSignalingSettings(token) {
}
/**
- * @param token
+ * @param {string} token The token of the conversation to connect to
*/
async function connectSignaling(token) {
const settings = await getSignalingSettings(token)
@@ -111,8 +111,8 @@ let startedCall = null
let failedToStartCall = null
/**
- * @param signaling
- * @param configuration
+ * @param {object} signaling The signaling object
+ * @param {object} configuration Media to connect with
*/
function startCall(signaling, configuration) {
let flags = PARTICIPANT.CALL_FLAG.IN_CALL
diff --git a/src/utils/webrtc/models/CallParticipantModel.js b/src/utils/webrtc/models/CallParticipantModel.js
index 2e40ccbd8..101a97f9b 100644
--- a/src/utils/webrtc/models/CallParticipantModel.js
+++ b/src/utils/webrtc/models/CallParticipantModel.js
@@ -34,7 +34,9 @@ export const ConnectionState = {
}
/**
- * @param options
+ * @param {object} options The model
+ * @param {string} options.peerId The peerId of the participant
+ * @param {object} options.webRtc The WebRTC connection to the participant
*/
export default function CallParticipantModel(options) {
diff --git a/src/utils/webrtc/simplewebrtc/localmedia.js b/src/utils/webrtc/simplewebrtc/localmedia.js
index 9192e8ceb..6424c1807 100644
--- a/src/utils/webrtc/simplewebrtc/localmedia.js
+++ b/src/utils/webrtc/simplewebrtc/localmedia.js
@@ -11,7 +11,7 @@ const UAParser = require('ua-parser-js')
const webrtcIndex = require('../index.js')
/**
- * @param stream
+ * @param {object} stream the stream object.
*/
function isAllTracksEnded(stream) {
let isAllTracksEnded = true
@@ -22,7 +22,7 @@ function isAllTracksEnded(stream) {
}
/**
- * @param stream
+ * @param {object} stream the stream object.
*/
function isAllAudioTracksEnded(stream) {
let isAllAudioTracksEnded = true
@@ -33,7 +33,7 @@ function isAllAudioTracksEnded(stream) {
}
/**
- * @param opts
+ * @param {object} opts the options object.
*/
function LocalMedia(opts) {
WildEmitter.call(this)
diff --git a/src/utils/webrtc/simplewebrtc/peer.js b/src/utils/webrtc/simplewebrtc/peer.js
index efd9e89be..15eb870db 100644
--- a/src/utils/webrtc/simplewebrtc/peer.js
+++ b/src/utils/webrtc/simplewebrtc/peer.js
@@ -8,7 +8,7 @@ const webrtcSupport = require('webrtcsupport')
const WildEmitter = require('wildemitter')
/**
- * @param stream
+ * @param {object} stream the stream object.
*/
function isAllTracksEnded(stream) {
let isAllTracksEnded = true
@@ -19,7 +19,7 @@ function isAllTracksEnded(stream) {
}
/**
- * @param options
+ * @param {object} options the options object.
*/
function Peer(options) {
const self = this
@@ -163,7 +163,7 @@ function shouldPreferH264() {
}
/**
- * @param sessionDescription
+ * @param {string} sessionDescription the session description.
*/
function preferH264VideoCodecIfAvailable(sessionDescription) {
const sdpInfo = sdpTransform.parse(sessionDescription.sdp)
diff --git a/src/utils/webrtc/simplewebrtc/simplewebrtc.js b/src/utils/webrtc/simplewebrtc/simplewebrtc.js
index d1dbee6e1..39da2f1f0 100644
--- a/src/utils/webrtc/simplewebrtc/simplewebrtc.js
+++ b/src/utils/webrtc/simplewebrtc/simplewebrtc.js
@@ -7,7 +7,7 @@ const attachMediaStream = require('attachmediastream')
const mockconsole = require('mockconsole')
/**
- * @param opts
+ * @param {object} opts the options object.
*/
function SimpleWebRTC(opts) {
const self = this
diff --git a/src/utils/webrtc/simplewebrtc/webrtc.js b/src/utils/webrtc/simplewebrtc/webrtc.js
index 7cfd08662..f335a9788 100644
--- a/src/utils/webrtc/simplewebrtc/webrtc.js
+++ b/src/utils/webrtc/simplewebrtc/webrtc.js
@@ -7,7 +7,7 @@ const localMedia = require('./localmedia')
const Peer = require('./peer')
/**
- * @param opts
+ * @param {object} opts the options object.
*/
function WebRTC(opts) {
const self = this
diff --git a/src/utils/webrtc/webrtc.js b/src/utils/webrtc/webrtc.js
index 01850d72d..87ffc391e 100644
--- a/src/utils/webrtc/webrtc.js
+++ b/src/utils/webrtc/webrtc.js
@@ -15,7 +15,7 @@
*
* @author Joas Schilling <coding@schilljs.com>
*
- * @license GNU AGPL version 3 or later
+ * @license AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -58,8 +58,8 @@ let sendCurrentStateWithRepetitionTimeout = null
let startedWithMedia
/**
- * @param a
- * @param b
+ * @param {Array} a Source object
+ * @param {Array} b Object to find all items in
*/
function arrayDiff(a, b) {
return a.filter(function(i) {
@@ -68,8 +68,8 @@ function arrayDiff(a, b) {
}
/**
- * @param signaling
- * @param sessionId
+ * @param {object} signaling The signaling object
+ * @param {string} sessionId The user's sessionId
*/
function createScreensharingPeer(signaling, sessionId) {
const currentSessionId = signaling.getSessionId()
@@ -135,7 +135,7 @@ function createScreensharingPeer(signaling, sessionId) {
}
/**
- * @param signaling
+ * @param {object} signaling The signaling object
*/
function checkStartPublishOwnPeer(signaling) {
'use strict'
@@ -218,7 +218,7 @@ function sendCurrentNick() {
}
/**
- * @param timeout
+ * @param {number} timeout Time until we give up retrying
*/
function sendCurrentStateWithRepetition(timeout) {
if (!timeout) {
@@ -247,7 +247,8 @@ function sendCurrentStateWithRepetition(timeout) {
}
/**
- * @param user
+ * @param {object} user The user to check
+ * @return {boolean} True if the user has an audio or video stream
*/
function userHasStreams(user) {
let flags = user
@@ -260,9 +261,9 @@ function userHasStreams(user) {
}
/**
- * @param signaling
- * @param newUsers
- * @param disconnectedSessionIds
+ * @param {object} signaling The signaling object
+ * @param {Array} newUsers Newly added participants
+ * @param {Array} disconnectedSessionIds Remove participants
*/
function usersChanged(signaling, newUsers, disconnectedSessionIds) {
'use strict'
@@ -429,8 +430,8 @@ function usersChanged(signaling, newUsers, disconnectedSessionIds) {
}
/**
- * @param signaling
- * @param users
+ * @param {object} signaling The signaling object
+ * @param {object} users Participant list with sessionId as key
*/
function usersInCallChanged(signaling, users) {
const previousSelfInCall = selfInCall
@@ -486,9 +487,9 @@ function usersInCallChanged(signaling, users) {
}
/**
- * @param signaling
- * @param _callParticipantCollection
- * @param _localCallParticipantModel
+ * @param {object} signaling The signaling object
+ * @param {object} _callParticipantCollection Collection with participants
+ * @param {object} _localCallParticipantModel The local participant
*/
export default function initWebRtc(signaling, _callParticipantCollection, _localCallParticipantModel) {
callParticipantCollection = _callParticipantCollection
@@ -655,7 +656,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
/**
- * @param peer
+ * @param {object} peer The peer connection to handle the state on
*/
function handleIceConnectionStateConnected(peer) {
// Send the current information about the state.
@@ -674,7 +675,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
/**
- * @param peer
+ * @param {object} peer The peer connection to handle the state on
*/
function handleIceConnectionStateDisconnected(peer) {
setTimeout(function() {
@@ -703,7 +704,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
/**
- * @param peer
+ * @param {object} peer The peer connection to handle the state on
*/
function handleIceConnectionStateFailed(peer) {
if (!showedTURNWarning && !signaling.settings.turnservers.length) {
@@ -748,7 +749,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
/**
- * @param peer
+ * @param {object} peer The peer connection to handle the state on
*/
function setHandlerForIceConnectionStateChange(peer) {
// Initialize ice restart counter for peer
@@ -787,7 +788,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
/**
- * @param peer
+ * @param {object} peer The peer connection to handle the state on
*/
function setHandlerForConnectionStateChange(peer) {
peer.pc.addEventListener('connectionstatechange', function() {
@@ -874,7 +875,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
/**
- * @param peer
+ * @param {object} peer The peer connection to handle the state on
*/
function setHandlerForNegotiationNeeded(peer) {
peer.pc.addEventListener('negotiationneeded', function() {
@@ -1038,9 +1039,9 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
})
/**
- * @param peer
- * @param track
- * @param mediaType
+ * @param {object} peer The peer connection to check media on
+ * @param {object} track The track to check the media on
+ * @param {string} mediaType "video" or "audio"
*/
function checkPeerMedia(peer, track, mediaType) {
return new Promise((resolve, reject) => {
@@ -1075,7 +1076,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
/**
- * @param peer
+ * @param {object} peer The peer connection to check media on
*/
function stopPeerCheckAudioMedia(peer) {
clearInterval(peer.check_audio_interval)
@@ -1083,7 +1084,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
/**
- * @param peer
+ * @param {object} peer The peer connection to check media on
*/
function stopPeerCheckVideoMedia(peer) {
clearInterval(peer.check_video_interval)
@@ -1091,8 +1092,8 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
/**
- * @param peerId
- * @param mediaType
+ * @param {string} peerId ID to get the peer for
+ * @param {string} mediaType "video" or "audio"
*/
function stopPeerIdCheckMediaType(peerId, mediaType) {
// There should be just one video peer with that id, but iterating is
@@ -1117,7 +1118,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
/**
- * @param peer
+ * @param {object} peer The peer connection to check media on
*/
function stopPeerCheckMedia(peer) {
stopPeerCheckAudioMedia(peer)
@@ -1125,8 +1126,8 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
/**
- * @param peer
- * @param stream
+ * @param {object} peer The peer connection to check media on
+ * @param {object} stream The stream to check
*/
function startPeerCheckMedia(peer, stream) {
stopPeerCheckMedia(peer)