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:
authorMarco Ambrosini <marcoambrosini@pm.me>2021-06-14 18:03:51 +0300
committerJoas Schilling <coding@schilljs.com>2021-06-17 17:48:26 +0300
commit2f2b6b9679efd3c7f262499a31f9058b2a7f03c5 (patch)
treec8b5097ab8031d2c36aec3a844c5234209364c13 /src
parent29b2dd55ac8d7d593d0a1fb0b4bf09e01137ee42 (diff)
Lint fix
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Diffstat (limited to 'src')
-rw-r--r--src/FilesSidebarCallViewApp.vue4
-rw-r--r--src/components/AdminSettings/HostedSignalingServer.vue4
-rw-r--r--src/components/AdminSettings/TurnServer.vue6
-rw-r--r--src/components/CallView/CallView.vue26
-rw-r--r--src/components/CallView/Grid/Grid.vue5
-rw-r--r--src/components/CallView/shared/LocalMediaControls.vue8
-rw-r--r--src/components/CallView/shared/LocalVideo.vue8
-rw-r--r--src/components/CallView/shared/Screen.vue4
-rw-r--r--src/components/CallView/shared/Video.vue6
-rw-r--r--src/components/CallView/shared/VideoBackground.vue2
-rw-r--r--src/components/CallView/shared/VideoBottomBar.vue2
-rw-r--r--src/components/ChatView.vue2
-rw-r--r--src/components/ConversationIcon.vue2
-rw-r--r--src/components/ConversationSettings/ListableSettings.vue2
-rw-r--r--src/components/ConversationsOptionsList.vue2
-rw-r--r--src/components/LeftSidebar/ConversationsList/Conversation.spec.js2
-rw-r--r--src/components/LeftSidebar/ConversationsList/Conversation.vue6
-rw-r--r--src/components/LeftSidebar/SearchBox/SearchBox.vue2
-rw-r--r--src/components/LobbyScreen.vue2
-rw-r--r--src/components/MediaDevicesPreview.vue6
-rw-r--r--src/components/MessagesList/MessagesGroup/Message/Message.spec.js30
-rw-r--r--src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.spec.js36
-rw-r--r--src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue2
-rw-r--r--src/components/MessagesList/MessagesList.vue2
-rw-r--r--src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue10
-rw-r--r--src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.spec.js2
-rw-r--r--src/components/RightSidebar/Participants/ParticipantsTab.vue4
-rw-r--r--src/components/RightSidebar/RightSidebar.vue2
-rw-r--r--src/components/TopBar/CallButton.vue2
-rw-r--r--src/mainFilesSidebarLoader.js2
-rw-r--r--src/mixins/call.js16
-rw-r--r--src/mixins/vueAtReparenter.js2
-rw-r--r--src/services/conversationsService.spec.js4
-rw-r--r--src/services/filesSharingServices.js2
-rw-r--r--src/store/callViewStore.js2
-rw-r--r--src/store/fileUploadStore.js2
-rw-r--r--src/store/fileUploadStore.spec.js2
-rw-r--r--src/store/messagesStore.js8
-rw-r--r--src/store/messagesStore.spec.js6
-rw-r--r--src/store/participantsStore.js6
-rw-r--r--src/utils/clipboard.js4
-rw-r--r--src/utils/signaling.js124
-rw-r--r--src/utils/webrtc/MediaDevicesManager.js38
-rw-r--r--src/utils/webrtc/SentVideoQualityThrottler.js20
-rw-r--r--src/utils/webrtc/SpeakingWhileMutedWarner.js16
-rw-r--r--src/utils/webrtc/VideoConstrainer.js18
-rw-r--r--src/utils/webrtc/analyzers/AverageStatValue.js12
-rw-r--r--src/utils/webrtc/analyzers/CallAnalyzer.js18
-rw-r--r--src/utils/webrtc/analyzers/ParticipantAnalyzer.js40
-rw-r--r--src/utils/webrtc/analyzers/PeerConnectionAnalyzer.js126
-rw-r--r--src/utils/webrtc/models/CallParticipantCollection.js12
-rw-r--r--src/utils/webrtc/models/CallParticipantModel.js38
-rw-r--r--src/utils/webrtc/models/LocalCallParticipantModel.js20
-rw-r--r--src/utils/webrtc/models/LocalMediaModel.js66
-rw-r--r--src/utils/webrtc/shims/MediaStream.js4
-rw-r--r--src/utils/webrtc/simplewebrtc/getscreenmedia.js18
-rw-r--r--src/utils/webrtc/simplewebrtc/localmedia.js4
-rw-r--r--src/utils/webrtc/simplewebrtc/peer.js4
-rw-r--r--src/utils/webrtc/webrtc.js12
-rw-r--r--src/views/Dashboard.vue6
-rw-r--r--src/views/FlowPostToConversation.vue2
-rw-r--r--src/views/MainView.vue2
62 files changed, 427 insertions, 420 deletions
diff --git a/src/FilesSidebarCallViewApp.vue b/src/FilesSidebarCallViewApp.vue
index cf519dde8..a2972cb5d 100644
--- a/src/FilesSidebarCallViewApp.vue
+++ b/src/FilesSidebarCallViewApp.vue
@@ -113,7 +113,7 @@ export default {
},
watch: {
- showCallView: function(showCallView) {
+ showCallView(showCallView) {
if (showCallView) {
this.replaceSidebarHeaderContentsWithCallView()
} else {
@@ -132,7 +132,7 @@ export default {
*
* @param {Object} fileInfo the watched FileInfo
*/
- fileInfo: function(fileInfo) {
+ fileInfo(fileInfo) {
if (!fileInfo) {
return
}
diff --git a/src/components/AdminSettings/HostedSignalingServer.vue b/src/components/AdminSettings/HostedSignalingServer.vue
index 5394779dc..4fe2d38a4 100644
--- a/src/components/AdminSettings/HostedSignalingServer.vue
+++ b/src/components/AdminSettings/HostedSignalingServer.vue
@@ -205,8 +205,8 @@ export default {
this.trialAccount = loadState('spreed', 'hosted_signaling_server_trial_data')
const languagesAndCountries = loadState('spreed', 'hosted_signaling_server_language_data')
- this.languages = languagesAndCountries['languages'] // two lists of {code: "es", name: "Español"} - one is in 'commonlanguages' and one in 'languages'
- this.countries = languagesAndCountries['countries'] // list of {code: "France", name: "France"}
+ this.languages = languagesAndCountries.languages // two lists of {code: "es", name: "Español"} - one is in 'commonlanguages' and one in 'languages'
+ this.countries = languagesAndCountries.countries // list of {code: "France", name: "France"}
const signaling = loadState('spreed', 'signaling_servers')
this.showForm = this.trialAccount.length !== 0
diff --git a/src/components/AdminSettings/TurnServer.vue b/src/components/AdminSettings/TurnServer.vue
index cb3dd1ba2..09ffd99eb 100644
--- a/src/components/AdminSettings/TurnServer.vue
+++ b/src/components/AdminSettings/TurnServer.vue
@@ -148,7 +148,7 @@ export default {
},
turnServerClasses() {
return {
- 'error': this.turnServerError,
+ error: this.turnServerError,
}
},
testIconClasses() {
@@ -205,9 +205,9 @@ export default {
const password = Base64.stringify(hmacSHA1(username, this.secret))
const iceServer = {
- username: username,
+ username,
credential: password,
- urls: urls,
+ urls,
}
// Create a PeerConnection with no streams, but force a m=audio line.
diff --git a/src/components/CallView/CallView.vue b/src/components/CallView/CallView.vue
index 5f470f3db..d271900f5 100644
--- a/src/components/CallView/CallView.vue
+++ b/src/components/CallView/CallView.vue
@@ -196,8 +196,8 @@ export default {
data() {
return {
screens: [],
- localMediaModel: localMediaModel,
- localCallParticipantModel: localCallParticipantModel,
+ localMediaModel,
+ localCallParticipantModel,
sharedDatas: {},
raisedHandUnwatchers: {},
speakingUnwatchers: {},
@@ -207,7 +207,7 @@ export default {
localSharedData: {
screenVisible: true,
},
- callParticipantCollection: callParticipantCollection,
+ callParticipantCollection,
videoContainerAspectRatio: 0,
}
},
@@ -334,28 +334,28 @@ export default {
},
},
watch: {
- localScreen: function(localScreen) {
+ localScreen(localScreen) {
this._setScreenAvailable(localCallParticipantModel.attributes.peerId, localScreen)
},
- callParticipantModels: function(models) {
+ callParticipantModels(models) {
this.updateDataFromCallParticipantModels(models)
},
- 'speakers': function() {
+ speakers() {
this._setPromotedParticipant()
},
- 'screenSharingActive': function() {
+ screenSharingActive() {
this._setPromotedParticipant()
},
- 'screens': function() {
+ screens() {
this._setScreenVisible()
},
- 'callParticipantModelsWithScreen': function(newValue, previousValue) {
+ callParticipantModelsWithScreen(newValue, previousValue) {
// Everytime a new screen is shared, switch to promoted view
if (newValue.length > previousValue.length) {
this.$store.dispatch('startPresentation')
@@ -364,7 +364,7 @@ export default {
this.$store.dispatch('stopPresentation')
}
},
- 'showLocalScreen': function(showLocalScreen) {
+ showLocalScreen(showLocalScreen) {
// Everytime the local screen is shared, switch to promoted view
if (showLocalScreen) {
this.$store.dispatch('startPresentation')
@@ -372,7 +372,7 @@ export default {
this.$store.dispatch('stopPresentation')
}
},
- 'hasLocalVideo': function(newValue) {
+ hasLocalVideo(newValue) {
if (this.$store.getters.selectedVideoPeerId === 'local') {
if (!newValue) {
this.$store.dispatch('selectedVideoPeerId', null)
@@ -504,7 +504,7 @@ export default {
// sometimes the nick name is not available yet...
if (nickName) {
if (raisedHand?.state) {
- showMessage(t('spreed', '{nickName} raised their hand.', { nickName: nickName }))
+ showMessage(t('spreed', '{nickName} raised their hand.', { nickName }))
}
} else {
if (raisedHand?.state) {
@@ -515,7 +515,7 @@ export default {
// update in callViewStore
this.$store.dispatch('setParticipantHandRaised', {
sessionId: callParticipantModel.attributes.nextcloudSessionId,
- raisedHand: raisedHand,
+ raisedHand,
})
},
diff --git a/src/components/CallView/Grid/Grid.vue b/src/components/CallView/Grid/Grid.vue
index e7b0f8d72..7bd15f3a4 100644
--- a/src/components/CallView/Grid/Grid.vue
+++ b/src/components/CallView/Grid/Grid.vue
@@ -445,7 +445,8 @@ export default {
return {
gridTemplateColumns: `repeat(${columns}, minmax(${this.minWidth}px, 1fr))`,
- gridTemplateRows: `repeat(${rows}, minmax(${this.minHeight}px, 1fr))` }
+ gridTemplateRows: `repeat(${rows}, minmax(${this.minHeight}px, 1fr))`,
+ }
},
// Check if there's an overflow of videos (videos that don't fit in the grid)
@@ -475,7 +476,7 @@ export default {
watch: {
// If the video array size changes, rebuild the grid
- 'videos.length': function() {
+ 'videos.length'() {
this.makeGrid()
},
// TODO: rebuild the grid to have optimal for last page
diff --git a/src/components/CallView/shared/LocalMediaControls.vue b/src/components/CallView/shared/LocalMediaControls.vue
index a4fbb09b2..cd286b4f4 100644
--- a/src/components/CallView/shared/LocalMediaControls.vue
+++ b/src/components/CallView/shared/LocalMediaControls.vue
@@ -243,7 +243,7 @@ export default {
Hand,
Microphone,
MicrophoneOff,
- 'VideoIcon': Video,
+ VideoIcon: Video,
VideoOff,
Monitor,
MonitorOff,
@@ -279,7 +279,7 @@ export default {
screenSharingMenuOpen: false,
boundaryElement: document.querySelector('.main-view'),
mouseover: false,
- callAnalyzer: callAnalyzer,
+ callAnalyzer,
qualityWarningInGracePeriodTimeout: null,
audioEnabledBeforeSpacebarKeydown: undefined,
spacebarKeyDown: false,
@@ -548,14 +548,14 @@ export default {
},
watch: {
- currentVolumeProportion: function() {
+ currentVolumeProportion() {
// The volume meter is updated directly in the DOM as it is
// more efficient than relying on Vue.js to animate the style property,
// because the latter would also process all neighboring components repeatedly.
this.updateVolumeMeter()
},
- senderConnectionQualityIsBad: function(senderConnectionQualityIsBad) {
+ senderConnectionQualityIsBad(senderConnectionQualityIsBad) {
if (!senderConnectionQualityIsBad) {
return
}
diff --git a/src/components/CallView/shared/LocalVideo.vue b/src/components/CallView/shared/LocalVideo.vue
index 8886f8959..3e85038bd 100644
--- a/src/components/CallView/shared/LocalVideo.vue
+++ b/src/components/CallView/shared/LocalVideo.vue
@@ -141,7 +141,7 @@ export default {
videoContainerClass() {
return {
- 'speaking': this.localMediaModel.attributes.speaking,
+ speaking: this.localMediaModel.attributes.speaking,
'video-container-grid': this.isGrid,
'video-container-stripe': this.isStripe,
'video-container-big': this.isBig,
@@ -202,7 +202,7 @@ export default {
localCallParticipantModel: {
immediate: true,
- handler: function(localCallParticipantModel, oldLocalCallParticipantModel) {
+ handler(localCallParticipantModel, oldLocalCallParticipantModel) {
if (oldLocalCallParticipantModel) {
oldLocalCallParticipantModel.off('forcedMute', this._handleForcedMute)
}
@@ -213,14 +213,14 @@ export default {
},
},
- 'localMediaModel.attributes.localStream': function(localStream) {
+ 'localMediaModel.attributes.localStream'(localStream) {
this._setLocalStream(localStream)
},
localStreamVideoError: {
immediate: true,
- handler: function(error) {
+ handler(error) {
if (error) {
if (error.name === 'NotAllowedError') {
this.notificationHandle = showError(t('spreed', 'Access to camera was denied'))
diff --git a/src/components/CallView/shared/Screen.vue b/src/components/CallView/shared/Screen.vue
index 4f5407914..ab6f99003 100644
--- a/src/components/CallView/shared/Screen.vue
+++ b/src/components/CallView/shared/Screen.vue
@@ -122,11 +122,11 @@ export default {
watch: {
- 'localMediaModel.attributes.localScreen': function(localScreen) {
+ 'localMediaModel.attributes.localScreen'(localScreen) {
this._setScreen(localScreen)
},
- 'callParticipantModel.attributes.screen': function(screen) {
+ 'callParticipantModel.attributes.screen'(screen) {
this._setScreen(screen)
},
diff --git a/src/components/CallView/shared/Video.vue b/src/components/CallView/shared/Video.vue
index 3fc2d5fea..94b8f9710 100644
--- a/src/components/CallView/shared/Video.vue
+++ b/src/components/CallView/shared/Video.vue
@@ -184,8 +184,8 @@ export default {
return {
'videoContainer-dummy': this.placeholderForPromoted,
'not-connected': !this.placeholderForPromoted && this.isNotConnected,
- 'speaking': !this.placeholderForPromoted && this.model.attributes.speaking,
- 'promoted': !this.placeholderForPromoted && this.sharedData.promoted && !this.isGrid,
+ speaking: !this.placeholderForPromoted && this.model.attributes.speaking,
+ promoted: !this.placeholderForPromoted && this.sharedData.promoted && !this.isGrid,
'video-container-grid': this.isGrid,
'video-container-grid--speaking': this.isSpeaking,
'video-container-big': this.isBig,
@@ -395,7 +395,7 @@ export default {
watch: {
- 'model.attributes.stream': function(stream) {
+ 'model.attributes.stream'(stream) {
this._setStream(stream)
},
diff --git a/src/components/CallView/shared/VideoBackground.vue b/src/components/CallView/shared/VideoBackground.vue
index 4a0448d2d..4be58f58d 100644
--- a/src/components/CallView/shared/VideoBackground.vue
+++ b/src/components/CallView/shared/VideoBackground.vue
@@ -88,7 +88,7 @@ export default {
// If the prop is empty. We're not checking for the default value
// because the user's displayName might be '?'
if (!this.displayName) {
- return `var(--color-text-maxcontrast)`
+ return 'var(--color-text-maxcontrast)'
} else {
const color = usernameToColor(this.displayName)
return `rgb(${color.r}, ${color.g}, ${color.b})`
diff --git a/src/components/CallView/shared/VideoBottomBar.vue b/src/components/CallView/shared/VideoBottomBar.vue
index 4447c0cc4..a26a012c2 100644
--- a/src/components/CallView/shared/VideoBottomBar.vue
+++ b/src/components/CallView/shared/VideoBottomBar.vue
@@ -136,7 +136,7 @@ export default {
Microphone,
MicrophoneOff,
Monitor,
- 'VideoIcon': Video,
+ VideoIcon: Video,
VideoOff,
},
diff --git a/src/components/ChatView.vue b/src/components/ChatView.vue
index d6de09c6c..08fc75886 100644
--- a/src/components/ChatView.vue
+++ b/src/components/ChatView.vue
@@ -77,7 +77,7 @@ export default {
},
},
- data: function() {
+ data() {
return {
isDraggingOver: false,
/**
diff --git a/src/components/ConversationIcon.vue b/src/components/ConversationIcon.vue
index b44649cbf..156806dfd 100644
--- a/src/components/ConversationIcon.vue
+++ b/src/components/ConversationIcon.vue
@@ -67,7 +67,7 @@ export default {
},
item: {
type: Object,
- default: function() {
+ default() {
return {
objectType: '',
type: 0,
diff --git a/src/components/ConversationSettings/ListableSettings.vue b/src/components/ConversationSettings/ListableSettings.vue
index 7d513b43f..6d3723051 100644
--- a/src/components/ConversationSettings/ListableSettings.vue
+++ b/src/components/ConversationSettings/ListableSettings.vue
@@ -126,7 +126,7 @@ export default {
try {
await this.$store.dispatch('setListable', {
token: this.token,
- listable: listable,
+ listable,
})
if (this.lastNotification) {
diff --git a/src/components/ConversationsOptionsList.vue b/src/components/ConversationsOptionsList.vue
index a6c3a61fe..4e2290ead 100644
--- a/src/components/ConversationsOptionsList.vue
+++ b/src/components/ConversationsOptionsList.vue
@@ -27,7 +27,7 @@
:title="item.label"
@click="onClick(item)">
<template
- v-slot:icon>
+ #icon>
<ConversationIcon
:item="iconData(item)" />
</template>
diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.spec.js b/src/components/LeftSidebar/ConversationsList/Conversation.spec.js
index 0488f0388..bdeb3a3d2 100644
--- a/src/components/LeftSidebar/ConversationsList/Conversation.spec.js
+++ b/src/components/LeftSidebar/ConversationsList/Conversation.spec.js
@@ -224,7 +224,7 @@ describe('Conversation.vue', () => {
item.lastMessage = lastMessageFromConversation
messagesMock.mockClear().mockReturnValue({
- '100': displayedLastStoreMessage,
+ 100: displayedLastStoreMessage,
})
})
diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.vue b/src/components/LeftSidebar/ConversationsList/Conversation.vue
index 0ba879a5b..ebfeb9d62 100644
--- a/src/components/LeftSidebar/ConversationsList/Conversation.vue
+++ b/src/components/LeftSidebar/ConversationsList/Conversation.vue
@@ -26,13 +26,13 @@
:to="item.token ? { name: 'conversation', params: { token: item.token }} : ''"
:class="{ 'has-unread-messages': item.unreadMessages }"
@click="onClick">
- <template v-slot:icon>
+ <template #icon>
<ConversationIcon
:item="item"
:hide-favorite="false"
:hide-call="false" />
</template>
- <template v-slot:subtitle>
+ <template #subtitle>
<strong v-if="item.unreadMessages">
{{ conversationInformation }}
</strong>
@@ -133,7 +133,7 @@ export default {
},
item: {
type: Object,
- default: function() {
+ default() {
return {
token: '',
participants: [],
diff --git a/src/components/LeftSidebar/SearchBox/SearchBox.vue b/src/components/LeftSidebar/SearchBox/SearchBox.vue
index 98f6c5d42..50c2d10e1 100644
--- a/src/components/LeftSidebar/SearchBox/SearchBox.vue
+++ b/src/components/LeftSidebar/SearchBox/SearchBox.vue
@@ -66,7 +66,7 @@ export default {
default: false,
},
},
- data: function() {
+ data() {
return {
localValue: '',
}
diff --git a/src/components/LobbyScreen.vue b/src/components/LobbyScreen.vue
index 1400791bf..6a2aaa245 100644
--- a/src/components/LobbyScreen.vue
+++ b/src/components/LobbyScreen.vue
@@ -62,7 +62,7 @@ export default {
// PHP timestamp is second-based; JavaScript timestamp is
// millisecond based.
const startTime = moment.unix(this.conversation.lobbyTimer).format('LLL')
- message = t('spreed', 'You are currently waiting in the lobby. This meeting is scheduled for {startTime}', { startTime: startTime })
+ message = t('spreed', 'You are currently waiting in the lobby. This meeting is scheduled for {startTime}', { startTime })
}
return message
diff --git a/src/components/MediaDevicesPreview.vue b/src/components/MediaDevicesPreview.vue
index 75cb93acc..4f904455e 100644
--- a/src/components/MediaDevicesPreview.vue
+++ b/src/components/MediaDevicesPreview.vue
@@ -121,7 +121,7 @@ export default {
MediaDevicesSelector,
Microphone,
MicrophoneOff,
- 'VideoIcon': Video,
+ VideoIcon: Video,
VideoOff,
},
@@ -135,7 +135,7 @@ export default {
data() {
return {
mounted: false,
- mediaDevicesManager: mediaDevicesManager,
+ mediaDevicesManager,
pendingGetUserMediaAudioCount: 0,
pendingGetUserMediaVideoCount: 0,
audioStream: null,
@@ -283,7 +283,7 @@ export default {
watch: {
enabled: {
- handler: function(enabled) {
+ handler(enabled) {
if (this.enabled) {
this.mediaDevicesManager.enableDeviceEvents()
this.updateAudioStream()
diff --git a/src/components/MessagesList/MessagesGroup/Message/Message.spec.js b/src/components/MessagesList/MessagesGroup/Message/Message.spec.js
index cf0832466..8d4859224 100644
--- a/src/components/MessagesList/MessagesGroup/Message/Message.spec.js
+++ b/src/components/MessagesList/MessagesGroup/Message/Message.spec.js
@@ -324,12 +324,12 @@ describe('Message.vue', () => {
test('renders file previews', () => {
const params = {
- 'actor': {
+ actor: {
id: 'alice',
name: 'Alice',
type: 'user',
},
- 'file': {
+ file: {
path: 'some/path',
type: 'file',
},
@@ -337,13 +337,13 @@ describe('Message.vue', () => {
renderRichObject(
'{file}',
params, {
- 'actor': {
+ actor: {
component: Mention,
- props: params['actor'],
+ props: params.actor,
},
- 'file': {
+ file: {
component: FilePreview,
- props: params['file'],
+ props: params.file,
},
}
)
@@ -351,7 +351,7 @@ describe('Message.vue', () => {
test('renders deck cards', () => {
const params = {
- 'actor': {
+ actor: {
id: 'alice',
name: 'Alice',
type: 'user',
@@ -364,9 +364,9 @@ describe('Message.vue', () => {
renderRichObject(
'{deck-card}',
params, {
- 'actor': {
+ actor: {
component: Mention,
- props: params['actor'],
+ props: params.actor,
},
'deck-card': {
component: DeckCard,
@@ -396,12 +396,12 @@ describe('Message.vue', () => {
test('renders other rich objects', () => {
const params = {
- 'actor': {
+ actor: {
id: 'alice',
name: 'Alice',
type: 'user',
},
- 'unknown': {
+ unknown: {
path: 'some/path',
type: 'unknown',
},
@@ -409,13 +409,13 @@ describe('Message.vue', () => {
renderRichObject(
'{unknown}',
params, {
- 'actor': {
+ actor: {
component: Mention,
- props: params['actor'],
+ props: params.actor,
},
- 'unknown': {
+ unknown: {
component: DefaultParameter,
- props: params['unknown'],
+ props: params.unknown,
},
}
)
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.spec.js b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.spec.js
index 1b1d827d0..b0bf9ba99 100644
--- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.spec.js
+++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.spec.js
@@ -66,7 +66,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -89,7 +89,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -111,7 +111,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -127,7 +127,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -157,7 +157,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -177,7 +177,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
expect(wrapper.element.tagName).toBe('A')
@@ -189,7 +189,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onerror()
@@ -206,7 +206,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -245,7 +245,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -262,7 +262,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -280,7 +280,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -297,7 +297,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -356,7 +356,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -388,7 +388,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -403,7 +403,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -431,7 +431,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
@@ -472,7 +472,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onerror()
@@ -505,7 +505,7 @@ describe('FilePreview.vue', () => {
const wrapper = shallowMount(FilePreview, {
localVue,
store,
- propsData: propsData,
+ propsData,
})
await imageMock.onload()
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue
index 436cf0970..68f9a6dbc 100644
--- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue
+++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue
@@ -327,7 +327,7 @@ export default {
// FIXME: use a cleaner way...
const token = this.link.substr(this.link.lastIndexOf('/') + 1)
return generateUrl('/apps/files_sharing/publicpreview/{token}?x=-1&y={height}&a=1', {
- token: token,
+ token,
height: previewSize,
})
} else {
diff --git a/src/components/MessagesList/MessagesList.vue b/src/components/MessagesList/MessagesList.vue
index b4fd542b3..50755d2d2 100644
--- a/src/components/MessagesList/MessagesList.vue
+++ b/src/components/MessagesList/MessagesList.vue
@@ -112,7 +112,7 @@ export default {
},
},
- data: function() {
+ data() {
return {
/**
* When scrolling to the top of the div .scroller we start loading previous
diff --git a/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue b/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue
index 737ef132d..e7ba6f5e9 100644
--- a/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue
+++ b/src/components/NewMessageForm/AdvancedInput/AdvancedInput.vue
@@ -29,7 +29,7 @@
:tab-select="true"
:allow-spaces="false"
@at="handleAtEvent">
- <template v-slot:item="scope">
+ <template #item="scope">
<Avatar v-if="isMentionToAll(scope.item.id)"
:size="44"
:icon-class="'icon-group-forced-white'"
@@ -57,7 +57,7 @@
</em>
</span>
</template>
- <template v-slot:embeddedItem="scope">
+ <template #embeddedItem="scope">
<!-- The root element itself is ignored, only its contents are taken
into account. -->
<span>
@@ -207,7 +207,7 @@ export default {
required: true,
},
},
- data: function() {
+ data() {
return {
text: '',
autoCompleteMentionCandidates: [],
@@ -376,8 +376,8 @@ export default {
getGuestAvatarStyle() {
return {
- 'width': '44px',
- 'height': '44px',
+ width: '44px',
+ height: '44px',
'line-height': '44px',
'background-color': '#b9b9b9',
'text-align': 'center',
diff --git a/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.spec.js b/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.spec.js
index 14cc991a4..4e72252ab 100644
--- a/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.spec.js
+++ b/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.spec.js
@@ -93,7 +93,7 @@ describe('Participant.vue', () => {
mixins: [{
// force tooltip display for testing
methods: {
- forceEnableTooltips: function() {
+ forceEnableTooltips() {
this.isUserNameTooltipVisible = true
this.isStatusTooltipVisible = true
},
diff --git a/src/components/RightSidebar/Participants/ParticipantsTab.vue b/src/components/RightSidebar/Participants/ParticipantsTab.vue
index e6a800620..10f5e9eb8 100644
--- a/src/components/RightSidebar/Participants/ParticipantsTab.vue
+++ b/src/components/RightSidebar/Participants/ParticipantsTab.vue
@@ -270,13 +270,13 @@ export default {
const hasUserStatuses = !!participants.headers['x-nextcloud-has-user-statuses']
participants.data.ocs.data.forEach(participant => {
this.$store.dispatch('addParticipant', {
- token: token,
+ token,
participant,
})
if (participant.participantType === PARTICIPANT.TYPE.GUEST
|| participant.participantType === PARTICIPANT.TYPE.GUEST_MODERATOR) {
this.$store.dispatch('forceGuestName', {
- token: token,
+ token,
actorId: Hex.stringify(SHA1(participant.sessionIds[0])),
actorDisplayName: participant.displayName,
})
diff --git a/src/components/RightSidebar/RightSidebar.vue b/src/components/RightSidebar/RightSidebar.vue
index acf8579b6..6d5973ac9 100644
--- a/src/components/RightSidebar/RightSidebar.vue
+++ b/src/components/RightSidebar/RightSidebar.vue
@@ -244,7 +244,7 @@ export default {
try {
await this.$store.dispatch('setConversationName', {
token: this.token,
- name: name,
+ name,
})
this.dismissEditing()
} catch (exception) {
diff --git a/src/components/TopBar/CallButton.vue b/src/components/TopBar/CallButton.vue
index 870a414fc..d0ffee55e 100644
--- a/src/components/TopBar/CallButton.vue
+++ b/src/components/TopBar/CallButton.vue
@@ -191,7 +191,7 @@ export default {
await this.$store.dispatch('joinCall', {
token: this.token,
participantIdentifier: this.$store.getters.getParticipantIdentifier(),
- flags: flags,
+ flags,
})
this.loading = false
},
diff --git a/src/mainFilesSidebarLoader.js b/src/mainFilesSidebarLoader.js
index ebd10123b..68266e785 100644
--- a/src/mainFilesSidebarLoader.js
+++ b/src/mainFilesSidebarLoader.js
@@ -34,7 +34,7 @@ const isEnabled = function(fileInfo) {
// left; this must be done here because "setFileInfo" will not get
// called with the new file if the tab can not be displayed.
if (token) {
- OCA.Talk.store.dispatch('leaveConversation', { token: token })
+ OCA.Talk.store.dispatch('leaveConversation', { token })
}
OCA.Talk.store.dispatch('updateTokenAndFileIdForToken', {
diff --git a/src/mixins/call.js b/src/mixins/call.js
index a08083957..52bed3e25 100644
--- a/src/mixins/call.js
+++ b/src/mixins/call.js
@@ -26,8 +26,8 @@ const call = {
data() {
return {
screens: [],
- localMediaModel: localMediaModel,
- localCallParticipantModel: localCallParticipantModel,
+ localMediaModel,
+ localCallParticipantModel,
sharedDatas: {},
speakingUnwatchers: {},
screenUnwatchers: {},
@@ -36,7 +36,7 @@ const call = {
localSharedData: {
screenVisible: true,
},
- callParticipantCollection: callParticipantCollection,
+ callParticipantCollection,
}
},
@@ -196,23 +196,23 @@ const call = {
watch: {
- localScreen: function(localScreen) {
+ localScreen(localScreen) {
this._setScreenAvailable(localCallParticipantModel.attributes.peerId, localScreen)
},
- callParticipantModels: function(models) {
+ callParticipantModels(models) {
this.updateDataFromCallParticipantModels(models)
},
- 'speakers': function() {
+ speakers() {
this._setPromotedParticipant()
},
- 'screenSharingActive': function() {
+ screenSharingActive() {
this._setPromotedParticipant()
},
- 'screens': function() {
+ screens() {
this._setScreenVisible()
},
diff --git a/src/mixins/vueAtReparenter.js b/src/mixins/vueAtReparenter.js
index e64bb2868..89e2b0bf6 100644
--- a/src/mixins/vueAtReparenter.js
+++ b/src/mixins/vueAtReparenter.js
@@ -36,7 +36,7 @@ import Vue from 'vue'
*/
export default {
- data: function() {
+ data() {
return {
/**
* The selector for the HTML element to reparent the vue-at panel to.
diff --git a/src/services/conversationsService.spec.js b/src/services/conversationsService.spec.js
index 14413b31b..ba38063e7 100644
--- a/src/services/conversationsService.spec.js
+++ b/src/services/conversationsService.spec.js
@@ -13,8 +13,8 @@ describe('conversationsService', () => {
searchPossibleConversations(
{
searchText: 'search-text',
- token: token,
- onlyUsers: onlyUsers,
+ token,
+ onlyUsers,
},
{
dummyOption: true,
diff --git a/src/services/filesSharingServices.js b/src/services/filesSharingServices.js
index 6fa40ab94..cc84cd8f7 100644
--- a/src/services/filesSharingServices.js
+++ b/src/services/filesSharingServices.js
@@ -48,7 +48,7 @@ const shareFile = async function(path, token, referenceId, metadata) {
console.error('Error while sharing file: ' + error.response.data.ocs.meta.message)
showError(error.response.data.ocs.meta.message)
} else {
- console.error(`Error while sharing file: Unknown error`)
+ console.error('Error while sharing file: Unknown error')
showError(t('spreed', 'Error while sharing file'))
}
}
diff --git a/src/store/callViewStore.js b/src/store/callViewStore.js
index 877685f73..68b670f8d 100644
--- a/src/store/callViewStore.js
+++ b/src/store/callViewStore.js
@@ -123,7 +123,7 @@ const actions = {
// BrowserStorage.getItem returns a string instead of a boolean
isGrid = (isGrid === 'true')
}
- context.dispatch('setCallViewMode', { isGrid: isGrid, isStripeOpen: true })
+ context.dispatch('setCallViewMode', { isGrid, isStripeOpen: true })
context.commit('setQualityWarningTooltipDismissed', { qualityWarningTooltipDismissed: false })
},
diff --git a/src/store/fileUploadStore.js b/src/store/fileUploadStore.js
index 19bfc10e6..41583d19b 100644
--- a/src/store/fileUploadStore.js
+++ b/src/store/fileUploadStore.js
@@ -309,7 +309,7 @@ const actions = {
commit('markFileAsFailedUpload', { uploadId, index })
dispatch('markTemporaryMessageAsFailed', {
message: temporaryMessage,
- reason: reason,
+ reason,
})
}
diff --git a/src/store/fileUploadStore.spec.js b/src/store/fileUploadStore.spec.js
index 076fa20ed..ebcdeaecd 100644
--- a/src/store/fileUploadStore.spec.js
+++ b/src/store/fileUploadStore.spec.js
@@ -53,7 +53,7 @@ describe('fileUploadStore', () => {
index,
token,
localUrl,
- file: file,
+ file,
},
},
}
diff --git a/src/store/messagesStore.js b/src/store/messagesStore.js
index ddcb35875..149bd00c3 100644
--- a/src/store/messagesStore.js
+++ b/src/store/messagesStore.js
@@ -479,7 +479,7 @@ const actions = {
return
}
// set the id to the last message
- context.dispatch('updateLastReadMessage', { token, id: conversation.lastMessage.id, updateVisually: updateVisually })
+ context.dispatch('updateLastReadMessage', { token, id: conversation.lastMessage.id, updateVisually })
context.dispatch('markConversationRead', token)
},
@@ -560,7 +560,7 @@ const actions = {
if (response.headers['x-chat-last-given']) {
context.dispatch('setFirstKnownMessageId', {
- token: token,
+ token,
id: parseInt(response.headers['x-chat-last-given'], 10),
})
}
@@ -644,8 +644,8 @@ const actions = {
const conversation = context.getters.conversation(token)
if (conversation && conversation.lastMessage && lastMessage.id > conversation.lastMessage.id) {
context.dispatch('updateConversationLastMessage', {
- token: token,
- lastMessage: lastMessage,
+ token,
+ lastMessage,
})
}
diff --git a/src/store/messagesStore.spec.js b/src/store/messagesStore.spec.js
index 124ab58a7..5ddd5bf79 100644
--- a/src/store/messagesStore.spec.js
+++ b/src/store/messagesStore.spec.js
@@ -143,11 +143,11 @@ describe('messagesStore', () => {
// with messages getter
expect(store.getters.messages(TOKEN)).toStrictEqual({
- '1': message1,
- '3': message3,
+ 1: message1,
+ 3: message3,
})
expect(store.getters.messages('token-2')).toStrictEqual({
- '2': message2,
+ 2: message2,
})
})
diff --git a/src/store/participantsStore.js b/src/store/participantsStore.js
index f4d0703c3..87ad53ed1 100644
--- a/src/store/participantsStore.js
+++ b/src/store/participantsStore.js
@@ -130,7 +130,7 @@ const mutations = {
if (state.participants[token] && state.participants[token][index]) {
Vue.delete(state.participants[token], index)
} else {
- console.error(`The conversation you are trying to purge doesn't exist`)
+ console.error('The conversation you are trying to purge doesn\'t exist')
}
},
setInCall(state, { token, sessionId, flags }) {
@@ -277,7 +277,7 @@ const actions = {
}
const updatedData = {
- sessionId: sessionId,
+ sessionId,
inCall: PARTICIPANT.CALL_FLAG.DISCONNECTED,
}
commit('updateParticipant', { token, index, updatedData })
@@ -382,7 +382,7 @@ const actions = {
context.dispatch('setCurrentParticipant', response.data.ocs.data)
context.dispatch('addConversation', response.data.ocs.data)
context.dispatch('updateSessionId', {
- token: token,
+ token,
participantIdentifier: context.getters.getParticipantIdentifier(),
sessionId: response.data.ocs.data.sessionId,
})
diff --git a/src/utils/clipboard.js b/src/utils/clipboard.js
index 270f38ec1..2167a6abb 100644
--- a/src/utils/clipboard.js
+++ b/src/utils/clipboard.js
@@ -31,13 +31,13 @@ const fetchClipboardContent = function(event) {
}
if (files.length > 0) {
- return { kind: 'file', files: files }
+ return { kind: 'file', files }
}
}
const text = clipboardData.getData('text/plain')
- return { kind: 'text', text: text }
+ return { kind: 'text', text }
}
export {
diff --git a/src/utils/signaling.js b/src/utils/signaling.js
index a787805e8..bcab440e4 100644
--- a/src/utils/signaling.js
+++ b/src/utils/signaling.js
@@ -253,7 +253,7 @@ Signaling.Base.prototype._joinCallSuccess = function(/* token */) {
Signaling.Base.prototype.joinCall = function(token, flags) {
return new Promise((resolve, reject) => {
axios.post(generateOcsUrl('apps/spreed/api/v4/call/{token}', { token }), {
- flags: flags,
+ flags,
})
.then(function() {
this.currentCallToken = token
@@ -284,7 +284,7 @@ Signaling.Base.prototype.updateCallFlags = function(token, flags) {
}
axios.put(generateOcsUrl('apps/spreed/api/v4/call/{token}', { token }), {
- flags: flags,
+ flags,
})
.then(function() {
this.currentCallFlags = flags
@@ -379,7 +379,7 @@ Signaling.Internal.prototype.forceReconnect = function(newSession, flags) {
Signaling.Internal.prototype._sendMessageWithCallback = function(ev) {
const message = [{
- ev: ev,
+ ev,
}]
this._sendMessages(message)
@@ -712,8 +712,8 @@ Signaling.Standalone.prototype.connect = function() {
Signaling.Standalone.prototype.sendBye = function() {
if (this.connected) {
this.doSend({
- 'type': 'bye',
- 'bye': {},
+ type: 'bye',
+ bye: {},
})
}
this.resumeId = null
@@ -774,13 +774,13 @@ Signaling.Standalone.prototype.forceReconnect = function(newSession, flags) {
Signaling.Standalone.prototype.sendCallMessage = function(data) {
if (data.type === 'control') {
this.doSend({
- 'type': 'control',
- 'control': {
- 'recipient': {
- 'type': 'session',
- 'sessionid': data.to,
+ type: 'control',
+ control: {
+ recipient: {
+ type: 'session',
+ sessionid: data.to,
},
- 'data': data.payload,
+ data: data.payload,
},
})
@@ -788,13 +788,13 @@ Signaling.Standalone.prototype.sendCallMessage = function(data) {
}
this.doSend({
- 'type': 'message',
- 'message': {
- 'recipient': {
- 'type': 'session',
- 'sessionid': data.to,
+ type: 'message',
+ message: {
+ recipient: {
+ type: 'session',
+ sessionid: data.to,
},
- 'data': data,
+ data,
},
})
}
@@ -806,12 +806,12 @@ Signaling.Standalone.prototype.sendRoomMessage = function(data) {
}
this.doSend({
- 'type': 'message',
- 'message': {
- 'recipient': {
- 'type': 'room',
+ type: 'message',
+ message: {
+ recipient: {
+ type: 'room',
},
- 'data': data,
+ data,
},
})
}
@@ -827,7 +827,7 @@ Signaling.Standalone.prototype.doSend = function(msg, callback) {
if (callback) {
const id = this.id++
this.callbacks[id] = callback
- msg['id'] = '' + id
+ msg.id = '' + id
}
if (OC.debug) {
console.debug('Sending', msg)
@@ -840,10 +840,10 @@ Signaling.Standalone.prototype.sendHello = function() {
if (this.resumeId) {
console.debug('Trying to resume session', this.sessionId)
msg = {
- 'type': 'hello',
- 'hello': {
- 'version': '1.0',
- 'resumeid': this.resumeId,
+ type: 'hello',
+ hello: {
+ version: '1.0',
+ resumeid: this.resumeId,
},
}
} else {
@@ -851,14 +851,14 @@ Signaling.Standalone.prototype.sendHello = function() {
this._forceReconnect = false
const url = generateOcsUrl('apps/spreed/api/v3/signaling/backend')
msg = {
- 'type': 'hello',
- 'hello': {
- 'version': '1.0',
- 'auth': {
- 'url': url,
- 'params': {
- 'userid': this.settings.userId,
- 'ticket': this.settings.ticket,
+ type: 'hello',
+ hello: {
+ version: '1.0',
+ auth: {
+ url,
+ params: {
+ userid: this.settings.userId,
+ ticket: this.settings.ticket,
},
},
},
@@ -1001,13 +1001,13 @@ Signaling.Standalone.prototype._joinRoomSuccess = function(token, nextcloudSessi
console.debug('Join room', token)
this.doSend({
- 'type': 'room',
- 'room': {
- 'roomid': token,
+ type: 'room',
+ room: {
+ roomid: token,
// Pass the Nextcloud session id to the signaling server. The
// session id will be passed through to Nextcloud to check if
// the (Nextcloud) user is allowed to join the room.
- 'sessionid': nextcloudSessionId,
+ sessionid: nextcloudSessionId,
},
}, function(data) {
this.joinResponseReceived(data, token)
@@ -1026,10 +1026,10 @@ Signaling.Standalone.prototype.joinCall = function(token, flags) {
const promise = new Promise((resolve, reject) => {
this.pendingJoinCall = {
- token: token,
- flags: flags,
- resolve: resolve,
- reject: reject,
+ token,
+ flags,
+ resolve,
+ reject,
}
})
@@ -1071,9 +1071,9 @@ Signaling.Standalone.prototype.joinResponseReceived = function(data, token) {
Signaling.Standalone.prototype._doLeaveRoom = function(token) {
console.debug('Leave room', token)
this.doSend({
- 'type': 'room',
- 'room': {
- 'roomid': '',
+ type: 'room',
+ room: {
+ roomid: '',
},
}, function(data) {
console.debug('Left', data)
@@ -1218,15 +1218,15 @@ Signaling.Standalone.prototype.requestOffer = function(sessionid, roomType) {
}
console.debug('Request offer from', sessionid)
this.doSend({
- 'type': 'message',
- 'message': {
- 'recipient': {
- 'type': 'session',
- 'sessionid': sessionid,
+ type: 'message',
+ message: {
+ recipient: {
+ type: 'session',
+ sessionid,
},
- 'data': {
- 'type': 'requestoffer',
- 'roomType': roomType,
+ data: {
+ type: 'requestoffer',
+ roomType,
},
},
})
@@ -1247,15 +1247,15 @@ Signaling.Standalone.prototype.sendOffer = function(sessionid, roomType) {
}
console.debug('Send offer to', sessionid)
this.doSend({
- 'type': 'message',
- 'message': {
- 'recipient': {
- 'type': 'session',
- 'sessionid': sessionid,
+ type: 'message',
+ message: {
+ recipient: {
+ type: 'session',
+ sessionid,
},
- 'data': {
- 'type': 'sendoffer',
- 'roomType': roomType,
+ data: {
+ type: 'sendoffer',
+ roomType,
},
},
})
diff --git a/src/utils/webrtc/MediaDevicesManager.js b/src/utils/webrtc/MediaDevicesManager.js
index 9c0ca5122..7ed1f4aad 100644
--- a/src/utils/webrtc/MediaDevicesManager.js
+++ b/src/utils/webrtc/MediaDevicesManager.js
@@ -105,11 +105,11 @@ export default function MediaDevicesManager() {
}
MediaDevicesManager.prototype = {
- get: function(key) {
+ get(key) {
return this.attributes[key]
},
- set: function(key, value) {
+ set(key, value) {
this.attributes[key] = value
this._trigger('change:' + key, [value])
@@ -117,7 +117,7 @@ MediaDevicesManager.prototype = {
this._storeDeviceId(key, value)
},
- _storeDeviceId: function(key, value) {
+ _storeDeviceId(key, value) {
if (key !== 'audioInputId' && key !== 'videoInputId') {
return
}
@@ -133,7 +133,7 @@ MediaDevicesManager.prototype = {
}
},
- on: function(event, handler) {
+ on(event, handler) {
if (!this._handlers.hasOwnProperty(event)) {
this._handlers[event] = [handler]
} else {
@@ -141,7 +141,7 @@ MediaDevicesManager.prototype = {
}
},
- off: function(event, handler) {
+ off(event, handler) {
const handlers = this._handlers[event]
if (!handlers) {
return
@@ -153,7 +153,7 @@ MediaDevicesManager.prototype = {
}
},
- _trigger: function(event, args) {
+ _trigger(event, args) {
let handlers = this._handlers[event]
if (!handlers) {
return
@@ -179,11 +179,11 @@ MediaDevicesManager.prototype = {
* @returns {boolean} true if MediaDevices interface is supported, false
* otherwise.
*/
- isSupported: function() {
+ isSupported() {
return navigator && navigator.mediaDevices && navigator.mediaDevices.getUserMedia && navigator.mediaDevices.enumerateDevices
},
- enableDeviceEvents: function() {
+ enableDeviceEvents() {
if (!this.isSupported()) {
return
}
@@ -195,7 +195,7 @@ MediaDevicesManager.prototype = {
navigator.mediaDevices.addEventListener('devicechange', this._updateDevicesBound)
},
- disableDeviceEvents: function() {
+ disableDeviceEvents() {
if (!this.isSupported()) {
return
}
@@ -207,7 +207,7 @@ MediaDevicesManager.prototype = {
}
},
- _updateDevices: function() {
+ _updateDevices() {
this._pendingEnumerateDevicesPromise = navigator.mediaDevices.enumerateDevices().then(devices => {
const previousAudioInputId = this.attributes.audioInputId
const previousVideoInputId = this.attributes.videoInputId
@@ -243,7 +243,7 @@ MediaDevicesManager.prototype = {
})
},
- _removeDevice: function(removedDevice) {
+ _removeDevice(removedDevice) {
const removedDeviceIndex = this.attributes.devices.findIndex(oldDevice => oldDevice.deviceId === removedDevice.deviceId && oldDevice.kind === removedDevice.kind)
if (removedDeviceIndex >= 0) {
this.attributes.devices.splice(removedDeviceIndex, 1)
@@ -268,7 +268,7 @@ MediaDevicesManager.prototype = {
}
},
- _updateDevice: function(updatedDevice) {
+ _updateDevice(updatedDevice) {
const oldDevice = this.attributes.devices.find(oldDevice => oldDevice.deviceId === updatedDevice.deviceId && oldDevice.kind === updatedDevice.kind)
// Only update the label if it has a value, as it may have been
@@ -282,7 +282,7 @@ MediaDevicesManager.prototype = {
oldDevice.kind = updatedDevice.kind
},
- _addDevice: function(addedDevice) {
+ _addDevice(addedDevice) {
// Copy the device to add, as its properties are read only and
// thus they can not be updated later.
addedDevice = {
@@ -359,7 +359,7 @@ MediaDevicesManager.prototype = {
* @returns {Promise} resolved with a MediaStream object when successful, or
* rejected with a DOMException in case of error
*/
- getUserMedia: function(constraints) {
+ getUserMedia(constraints) {
if (!this.isSupported()) {
return new Promise((resolve, reject) => {
reject(new DOMException('MediaDevicesManager is not supported', 'NotSupportedError'))
@@ -377,7 +377,7 @@ MediaDevicesManager.prototype = {
})
},
- _getUserMediaInternal: function(constraints) {
+ _getUserMediaInternal(constraints) {
if (constraints.audio && !constraints.audio.deviceId) {
if (this.attributes.audioInputId) {
if (!(constraints.audio instanceof Object)) {
@@ -426,7 +426,7 @@ MediaDevicesManager.prototype = {
})
},
- _stopIncompatibleTracks: function(constraints) {
+ _stopIncompatibleTracks(constraints) {
this._tracks.forEach(track => {
if (constraints.audio && constraints.audio.deviceId && track.kind === 'audio') {
const constraintsAudioDeviceId = constraints.audio.deviceId.exact || constraints.audio.deviceId.ideal || constraints.audio.deviceId
@@ -446,13 +446,13 @@ MediaDevicesManager.prototype = {
})
},
- _registerStream: function(stream) {
+ _registerStream(stream) {
stream.getTracks().forEach(track => {
this._registerTrack(track)
})
},
- _registerTrack: function(track) {
+ _registerTrack(track) {
this._tracks.push(track)
track.addEventListener('ended', () => {
@@ -467,7 +467,7 @@ MediaDevicesManager.prototype = {
})
},
- _updateSelectedDevicesFromGetUserMediaResult: function(stream) {
+ _updateSelectedDevicesFromGetUserMediaResult(stream) {
if (this.attributes.audioInputId) {
const audioTracks = stream.getAudioTracks()
const audioTrackSettings = audioTracks.length > 0 ? audioTracks[0].getSettings() : null
diff --git a/src/utils/webrtc/SentVideoQualityThrottler.js b/src/utils/webrtc/SentVideoQualityThrottler.js
index f6a9dfaeb..246869783 100644
--- a/src/utils/webrtc/SentVideoQualityThrottler.js
+++ b/src/utils/webrtc/SentVideoQualityThrottler.js
@@ -76,13 +76,13 @@ export default function SentVideoQualityThrottler(localMediaModel, callParticipa
}
SentVideoQualityThrottler.prototype = {
- destroy: function() {
+ destroy() {
this._localMediaModel.off('change:videoAvailable', this._handleLocalVideoAvailableChangeBound)
this._stopListeningToChanges()
},
- _handleLocalVideoAvailableChange: function(localMediaModel, videoAvailable) {
+ _handleLocalVideoAvailableChange(localMediaModel, videoAvailable) {
if (videoAvailable) {
this._startListeningToChanges()
} else {
@@ -90,7 +90,7 @@ SentVideoQualityThrottler.prototype = {
}
},
- _startListeningToChanges: function() {
+ _startListeningToChanges() {
this._localMediaModel.on('change:videoEnabled', this._adjustVideoQualityIfNeededBound)
this._localMediaModel.on('change:audioEnabled', this._handleLocalAudioEnabledChangeBound)
this._localMediaModel.on('change:speaking', this._handleLocalSpeakingChangeBound)
@@ -109,7 +109,7 @@ SentVideoQualityThrottler.prototype = {
this._adjustVideoQualityIfNeeded()
},
- _stopListeningToChanges: function() {
+ _stopListeningToChanges() {
this._localMediaModel.off('change:videoEnabled', this._adjustVideoQualityIfNeededBound)
this._localMediaModel.off('change:audioEnabled', this._handleLocalAudioEnabledChangeBound)
this._localMediaModel.off('change:speaking', this._handleLocalSpeakingChangeBound)
@@ -123,21 +123,21 @@ SentVideoQualityThrottler.prototype = {
})
},
- _handleAddParticipant: function(callParticipantCollection, callParticipantModel) {
+ _handleAddParticipant(callParticipantCollection, callParticipantModel) {
callParticipantModel.on('change:videoAvailable', this._adjustVideoQualityIfNeededBound)
callParticipantModel.on('change:audioAvailable', this._adjustVideoQualityIfNeededBound)
this._adjustVideoQualityIfNeeded()
},
- _handleRemoveParticipant: function(callParticipantCollection, callParticipantModel) {
+ _handleRemoveParticipant(callParticipantCollection, callParticipantModel) {
callParticipantModel.off('change:videoAvailable', this._adjustVideoQualityIfNeededBound)
callParticipantModel.off('change:audioAvailable', this._adjustVideoQualityIfNeededBound)
this._adjustVideoQualityIfNeeded()
},
- _handleLocalAudioEnabledChange: function() {
+ _handleLocalAudioEnabledChange() {
if (this._localMediaModel.get('audioEnabled')) {
return
}
@@ -150,7 +150,7 @@ SentVideoQualityThrottler.prototype = {
this._adjustVideoQualityIfNeeded()
},
- _handleLocalSpeakingChange: function() {
+ _handleLocalSpeakingChange() {
if (this._localMediaModel.get('speaking')) {
window.clearTimeout(this._gracePeriodAfterSpeakingTimeout)
this._gracePeriodAfterSpeakingTimeout = null
@@ -169,7 +169,7 @@ SentVideoQualityThrottler.prototype = {
}, 5000)
},
- _adjustVideoQualityIfNeeded: function() {
+ _adjustVideoQualityIfNeeded() {
if (!this._localMediaModel.get('videoAvailable') || !this._localMediaModel.get('videoEnabled')) {
return
}
@@ -178,7 +178,7 @@ SentVideoQualityThrottler.prototype = {
this._videoConstrainer.applyConstraints(quality)
},
- _getQualityForState: function() {
+ _getQualityForState() {
if (this._speakingOrInGracePeriodAfterSpeaking) {
return QUALITY.HIGH
}
diff --git a/src/utils/webrtc/SpeakingWhileMutedWarner.js b/src/utils/webrtc/SpeakingWhileMutedWarner.js
index 9431458fa..8d15c69a8 100644
--- a/src/utils/webrtc/SpeakingWhileMutedWarner.js
+++ b/src/utils/webrtc/SpeakingWhileMutedWarner.js
@@ -55,11 +55,11 @@ export default function SpeakingWhileMutedWarner(model, view) {
}
SpeakingWhileMutedWarner.prototype = {
- destroy: function() {
+ destroy() {
this._model.off('change:speakingWhileMuted', this._handleSpeakingWhileMutedChangeBound)
},
- _handleSpeakingWhileMutedChange: function(model, speakingWhileMuted) {
+ _handleSpeakingWhileMutedChange(model, speakingWhileMuted) {
if (speakingWhileMuted) {
this._handleSpeakingWhileMuted()
} else {
@@ -67,7 +67,7 @@ SpeakingWhileMutedWarner.prototype = {
}
},
- _handleSpeakingWhileMuted: function() {
+ _handleSpeakingWhileMuted() {
this._startedSpeakingTimeout = setTimeout(function() {
delete this._startedSpeakingTimeout
@@ -75,7 +75,7 @@ SpeakingWhileMutedWarner.prototype = {
}.bind(this), 3000)
},
- _handleStoppedSpeakingWhileMuted: function() {
+ _handleStoppedSpeakingWhileMuted() {
if (this._startedSpeakingTimeout) {
clearTimeout(this._startedSpeakingTimeout)
delete this._startedSpeakingTimeout
@@ -84,7 +84,7 @@ SpeakingWhileMutedWarner.prototype = {
this._hideWarning()
},
- _showWarning: function() {
+ _showWarning() {
const message = t('spreed', 'You seem to be talking while muted, please unmute yourself for others to hear you')
if (!document.hidden) {
@@ -102,7 +102,7 @@ SpeakingWhileMutedWarner.prototype = {
}
},
- _showNotification: function(message) {
+ _showNotification(message) {
if (this._notification) {
return
}
@@ -111,7 +111,7 @@ SpeakingWhileMutedWarner.prototype = {
this._notification = true
},
- _showBrowserNotification: function(message) {
+ _showBrowserNotification(message) {
return new Promise(function(resolve, reject) {
if (this._browserNotification) {
resolve()
@@ -154,7 +154,7 @@ SpeakingWhileMutedWarner.prototype = {
}.bind(this))
},
- _hideWarning: function() {
+ _hideWarning() {
this._pendingBrowserNotification = false
if (this._notification) {
diff --git a/src/utils/webrtc/VideoConstrainer.js b/src/utils/webrtc/VideoConstrainer.js
index cf43b81cb..893ab1221 100644
--- a/src/utils/webrtc/VideoConstrainer.js
+++ b/src/utils/webrtc/VideoConstrainer.js
@@ -53,7 +53,7 @@ function VideoConstrainer(localMediaModel) {
}
VideoConstrainer.prototype = {
- applyConstraints: async function(quality) {
+ async applyConstraints(quality) {
if (quality === this._currentQuality) {
return
}
@@ -82,7 +82,7 @@ VideoConstrainer.prototype = {
this._currentQuality = quality
},
- _applyRoughConstraints: async function(localVideoTrack, quality) {
+ async _applyRoughConstraints(localVideoTrack, quality) {
let constraints = this._knownValidConstraintsForQuality[quality]
if (!constraints) {
constraints = this._getConstraintsForQuality(quality)
@@ -125,7 +125,7 @@ VideoConstrainer.prototype = {
}
},
- _applyRoughResolutionConstraints: async function(localVideoTrack, constraints) {
+ async _applyRoughResolutionConstraints(localVideoTrack, constraints) {
try {
await localVideoTrack.applyConstraints(constraints)
@@ -142,7 +142,7 @@ VideoConstrainer.prototype = {
}
},
- _applyRoughFrameRateConstraints: async function(localVideoTrack, constraints) {
+ async _applyRoughFrameRateConstraints(localVideoTrack, constraints) {
try {
await localVideoTrack.applyConstraints(constraints)
@@ -159,7 +159,7 @@ VideoConstrainer.prototype = {
}
},
- _getConstraintsForQuality: function(quality) {
+ _getConstraintsForQuality(quality) {
if (quality === QUALITY.HIGH) {
return {
width: {
@@ -245,7 +245,7 @@ VideoConstrainer.prototype = {
}
},
- _increaseMaxResolution: function(constraints) {
+ _increaseMaxResolution(constraints) {
let changed = false
if (constraints.width && constraints.width.max) {
@@ -263,7 +263,7 @@ VideoConstrainer.prototype = {
return changed
},
- _decreaseMinResolution: function(constraints) {
+ _decreaseMinResolution(constraints) {
let changed = false
if (constraints.width && constraints.width.min) {
@@ -281,7 +281,7 @@ VideoConstrainer.prototype = {
return changed
},
- _increaseMaxFrameRate: function(constraints) {
+ _increaseMaxFrameRate(constraints) {
let changed = false
if (constraints.frameRate && constraints.frameRate.max) {
@@ -293,7 +293,7 @@ VideoConstrainer.prototype = {
return changed
},
- _decreaseMinFrameRate: function(constraints) {
+ _decreaseMinFrameRate(constraints) {
let changed = false
if (constraints.frameRate && constraints.frameRate.min) {
diff --git a/src/utils/webrtc/analyzers/AverageStatValue.js b/src/utils/webrtc/analyzers/AverageStatValue.js
index 9ba6c4dd6..5506cacdd 100644
--- a/src/utils/webrtc/analyzers/AverageStatValue.js
+++ b/src/utils/webrtc/analyzers/AverageStatValue.js
@@ -70,12 +70,12 @@ function AverageStatValue(count, type = STAT_VALUE_TYPE.CUMULATIVE, lastValueWei
}
AverageStatValue.prototype = {
- reset: function() {
+ reset() {
this._rawValues = []
this._relativeValues = []
},
- add: function(value) {
+ add(value) {
if (this._rawValues.length === this._count) {
this._rawValues.shift()
this._relativeValues.shift()
@@ -93,7 +93,7 @@ AverageStatValue.prototype = {
this._relativeValues.push(relativeValue)
},
- getLastRawValue: function() {
+ getLastRawValue() {
if (this._rawValues.length < 1) {
return NaN
}
@@ -101,7 +101,7 @@ AverageStatValue.prototype = {
return this._rawValues[this._rawValues.length - 1]
},
- getLastRelativeValue: function() {
+ getLastRelativeValue() {
if (this._relativeValues.length < 1) {
return NaN
}
@@ -109,11 +109,11 @@ AverageStatValue.prototype = {
return this._relativeValues[this._relativeValues.length - 1]
},
- hasEnoughData: function() {
+ hasEnoughData() {
return this._rawValues.length === this._count
},
- getWeightedAverage: function() {
+ getWeightedAverage() {
let weightedValues = 0
let weightsSum = 0
diff --git a/src/utils/webrtc/analyzers/CallAnalyzer.js b/src/utils/webrtc/analyzers/CallAnalyzer.js
index 2fedaf130..cbe2404b3 100644
--- a/src/utils/webrtc/analyzers/CallAnalyzer.js
+++ b/src/utils/webrtc/analyzers/CallAnalyzer.js
@@ -77,17 +77,17 @@ export default function CallAnalyzer(localMediaModel, localCallParticipantModel,
}
CallAnalyzer.prototype = {
- get: function(key) {
+ get(key) {
return this.attributes[key]
},
- set: function(key, value) {
+ set(key, value) {
this.attributes[key] = value
this._trigger('change:' + key, [value])
},
- on: function(event, handler) {
+ on(event, handler) {
if (!this._handlers.hasOwnProperty(event)) {
this._handlers[event] = [handler]
} else {
@@ -95,7 +95,7 @@ CallAnalyzer.prototype = {
}
},
- off: function(event, handler) {
+ off(event, handler) {
const handlers = this._handlers[event]
if (!handlers) {
return
@@ -107,7 +107,7 @@ CallAnalyzer.prototype = {
}
},
- _trigger: function(event, args) {
+ _trigger(event, args) {
let handlers = this._handlers[event]
if (!handlers) {
return
@@ -122,7 +122,7 @@ CallAnalyzer.prototype = {
}
},
- destroy: function() {
+ destroy() {
if (this._localParticipantAnalyzer) {
this._localParticipantAnalyzer.off('change:senderConnectionQualityAudio', this._handleSenderConnectionQualityAudioChangeBound)
this._localParticipantAnalyzer.off('change:senderConnectionQualityVideo', this._handleSenderConnectionQualityVideoChangeBound)
@@ -132,15 +132,15 @@ CallAnalyzer.prototype = {
}
},
- _handleSenderConnectionQualityAudioChange: function(participantAnalyzer, senderConnectionQualityAudio) {
+ _handleSenderConnectionQualityAudioChange(participantAnalyzer, senderConnectionQualityAudio) {
this.set('senderConnectionQualityAudio', senderConnectionQualityAudio)
},
- _handleSenderConnectionQualityVideoChange: function(participantAnalyzer, senderConnectionQualityVideo) {
+ _handleSenderConnectionQualityVideoChange(participantAnalyzer, senderConnectionQualityVideo) {
this.set('senderConnectionQualityVideo', senderConnectionQualityVideo)
},
- _handleSenderConnectionQualityScreenChange: function(participantAnalyzer, senderConnectionQualityScreen) {
+ _handleSenderConnectionQualityScreenChange(participantAnalyzer, senderConnectionQualityScreen) {
this.set('senderConnectionQualityScreen', senderConnectionQualityScreen)
},
diff --git a/src/utils/webrtc/analyzers/ParticipantAnalyzer.js b/src/utils/webrtc/analyzers/ParticipantAnalyzer.js
index 02151d828..c94afa056 100644
--- a/src/utils/webrtc/analyzers/ParticipantAnalyzer.js
+++ b/src/utils/webrtc/analyzers/ParticipantAnalyzer.js
@@ -83,7 +83,7 @@ function ParticipantAnalyzer() {
}
ParticipantAnalyzer.prototype = {
- on: function(event, handler) {
+ on(event, handler) {
if (!this._handlers.hasOwnProperty(event)) {
this._handlers[event] = [handler]
} else {
@@ -91,7 +91,7 @@ ParticipantAnalyzer.prototype = {
}
},
- off: function(event, handler) {
+ off(event, handler) {
const handlers = this._handlers[event]
if (!handlers) {
return
@@ -103,7 +103,7 @@ ParticipantAnalyzer.prototype = {
}
},
- _trigger: function(event, args) {
+ _trigger(event, args) {
let handlers = this._handlers[event]
if (!handlers) {
return
@@ -118,7 +118,7 @@ ParticipantAnalyzer.prototype = {
}
},
- destroy: function() {
+ destroy() {
if (this._localCallParticipantModel) {
this._localCallParticipantModel.off('change:peer', this._handlePeerChangeBound)
this._localCallParticipantModel.off('change:screenPeer', this._handleScreenPeerChangeBound)
@@ -145,7 +145,7 @@ ParticipantAnalyzer.prototype = {
this._receiverScreenPeerConnectionAnalyzer = null
},
- setSenderParticipant: function(localMediaModel, localCallParticipantModel) {
+ setSenderParticipant(localMediaModel, localCallParticipantModel) {
this.destroy()
this._localMediaModel = localMediaModel
@@ -163,7 +163,7 @@ ParticipantAnalyzer.prototype = {
}
},
- setReceiverParticipant: function(callParticipantModel) {
+ setReceiverParticipant(callParticipantModel) {
this.destroy()
this._callParticipantModel = callParticipantModel
@@ -180,7 +180,7 @@ ParticipantAnalyzer.prototype = {
}
},
- setSenderReceiverParticipant: function(localMediaModel, callParticipantModel) {
+ setSenderReceiverParticipant(localMediaModel, callParticipantModel) {
this.destroy()
this._localMediaModel = localMediaModel
@@ -200,7 +200,7 @@ ParticipantAnalyzer.prototype = {
}
},
- _handlePeerChange: function(model, peer) {
+ _handlePeerChange(model, peer) {
if (this._peer) {
this._stopListeningToAudioVideoChanges()
}
@@ -212,7 +212,7 @@ ParticipantAnalyzer.prototype = {
}
},
- _handleScreenPeerChange: function(model, screenPeer) {
+ _handleScreenPeerChange(model, screenPeer) {
if (this._screenPeer) {
this._stopListeningToScreenChanges()
}
@@ -224,7 +224,7 @@ ParticipantAnalyzer.prototype = {
}
},
- _startListeningToAudioVideoChanges: function() {
+ _startListeningToAudioVideoChanges() {
if (this._localMediaModel) {
this._senderPeerConnectionAnalyzer.setPeerConnection(this._peer.pc, PEER_DIRECTION.SENDER)
@@ -252,7 +252,7 @@ ParticipantAnalyzer.prototype = {
}
},
- _startListeningToScreenChanges: function() {
+ _startListeningToScreenChanges() {
if (this._localMediaModel) {
this._senderScreenPeerConnectionAnalyzer.setPeerConnection(this._screenPeer.pc, PEER_DIRECTION.SENDER)
@@ -272,7 +272,7 @@ ParticipantAnalyzer.prototype = {
}
},
- _stopListeningToAudioVideoChanges: function() {
+ _stopListeningToAudioVideoChanges() {
if (this._localMediaModel) {
this._senderPeerConnectionAnalyzer.setPeerConnection(null)
@@ -294,7 +294,7 @@ ParticipantAnalyzer.prototype = {
}
},
- _stopListeningToScreenChanges: function() {
+ _stopListeningToScreenChanges() {
if (this._localMediaModel) {
this._senderScreenPeerConnectionAnalyzer.setPeerConnection(null)
@@ -308,7 +308,7 @@ ParticipantAnalyzer.prototype = {
}
},
- _handleConnectionQualityAudioChange: function(peerConnectionAnalyzer, connectionQualityAudio) {
+ _handleConnectionQualityAudioChange(peerConnectionAnalyzer, connectionQualityAudio) {
if (peerConnectionAnalyzer === this._senderPeerConnectionAnalyzer) {
this._trigger('change:senderConnectionQualityAudio', [connectionQualityAudio])
} else if (peerConnectionAnalyzer === this._receiverPeerConnectionAnalyzer) {
@@ -316,7 +316,7 @@ ParticipantAnalyzer.prototype = {
}
},
- _handleConnectionQualityVideoChange: function(peerConnectionAnalyzer, connectionQualityVideo) {
+ _handleConnectionQualityVideoChange(peerConnectionAnalyzer, connectionQualityVideo) {
if (peerConnectionAnalyzer === this._senderPeerConnectionAnalyzer) {
this._trigger('change:senderConnectionQualityVideo', [connectionQualityVideo])
} else if (peerConnectionAnalyzer === this._receiverPeerConnectionAnalyzer) {
@@ -324,7 +324,7 @@ ParticipantAnalyzer.prototype = {
}
},
- _handleConnectionQualityScreenChange: function(peerConnectionAnalyzer, connectionQualityScreen) {
+ _handleConnectionQualityScreenChange(peerConnectionAnalyzer, connectionQualityScreen) {
if (peerConnectionAnalyzer === this._senderScreenPeerConnectionAnalyzer) {
this._trigger('change:senderConnectionQualityScreen', [connectionQualityScreen])
} else if (peerConnectionAnalyzer === this._receiverScreenPeerConnectionAnalyzer) {
@@ -332,19 +332,19 @@ ParticipantAnalyzer.prototype = {
}
},
- _handleSenderAudioEnabledChange: function(localMediaModel, audioEnabled) {
+ _handleSenderAudioEnabledChange(localMediaModel, audioEnabled) {
this._senderPeerConnectionAnalyzer.setAnalysisEnabledAudio(audioEnabled)
},
- _handleSenderVideoEnabledChange: function(localMediaModel, videoEnabled) {
+ _handleSenderVideoEnabledChange(localMediaModel, videoEnabled) {
this._senderPeerConnectionAnalyzer.setAnalysisEnabledVideo(videoEnabled)
},
- _handleReceiverAudioAvailableChange: function(callParticipantModel, audioAvailable) {
+ _handleReceiverAudioAvailableChange(callParticipantModel, audioAvailable) {
this._receiverPeerConnectionAnalyzer.setAnalysisEnabledAudio(audioAvailable)
},
- _handleReceiverVideoAvailableChange: function(callParticipantModel, videoAvailable) {
+ _handleReceiverVideoAvailableChange(callParticipantModel, videoAvailable) {
this._receiverPeerConnectionAnalyzer.setAnalysisEnabledVideo(videoAvailable)
},
diff --git a/src/utils/webrtc/analyzers/PeerConnectionAnalyzer.js b/src/utils/webrtc/analyzers/PeerConnectionAnalyzer.js
index d5074ed1f..b5a8026eb 100644
--- a/src/utils/webrtc/analyzers/PeerConnectionAnalyzer.js
+++ b/src/utils/webrtc/analyzers/PeerConnectionAnalyzer.js
@@ -73,38 +73,38 @@ const PEER_DIRECTION = {
*/
function PeerConnectionAnalyzer() {
this._packets = {
- 'audio': new AverageStatValue(5, STAT_VALUE_TYPE.CUMULATIVE),
- 'video': new AverageStatValue(5, STAT_VALUE_TYPE.CUMULATIVE),
+ audio: new AverageStatValue(5, STAT_VALUE_TYPE.CUMULATIVE),
+ video: new AverageStatValue(5, STAT_VALUE_TYPE.CUMULATIVE),
}
this._packetsLost = {
- 'audio': new AverageStatValue(5, STAT_VALUE_TYPE.CUMULATIVE),
- 'video': new AverageStatValue(5, STAT_VALUE_TYPE.CUMULATIVE),
+ audio: new AverageStatValue(5, STAT_VALUE_TYPE.CUMULATIVE),
+ video: new AverageStatValue(5, STAT_VALUE_TYPE.CUMULATIVE),
}
this._packetsLostRatio = {
- 'audio': new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE),
- 'video': new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE),
+ audio: new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE),
+ video: new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE),
}
this._packetsPerSecond = {
- 'audio': new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE),
- 'video': new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE),
+ audio: new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE),
+ video: new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE),
}
// Latest values have a higher weight than the default one to better detect
// sudden changes in the round trip time, which can lead to discarded (but
// not lost) packets.
this._roundTripTime = {
- 'audio': new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE, 5),
- 'video': new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE, 5),
+ audio: new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE, 5),
+ video: new AverageStatValue(5, STAT_VALUE_TYPE.RELATIVE, 5),
}
// Only the last relative value is used, but as it is a cumulative value the
// previous one is needed as a base to calculate the last one.
this._timestamps = {
- 'audio': new AverageStatValue(2, STAT_VALUE_TYPE.CUMULATIVE),
- 'video': new AverageStatValue(2, STAT_VALUE_TYPE.CUMULATIVE),
+ audio: new AverageStatValue(2, STAT_VALUE_TYPE.CUMULATIVE),
+ video: new AverageStatValue(2, STAT_VALUE_TYPE.CUMULATIVE),
}
this._analysisEnabled = {
- 'audio': true,
- 'video': true,
+ audio: true,
+ video: true,
}
this._handlers = []
@@ -122,7 +122,7 @@ function PeerConnectionAnalyzer() {
}
PeerConnectionAnalyzer.prototype = {
- on: function(event, handler) {
+ on(event, handler) {
if (!this._handlers.hasOwnProperty(event)) {
this._handlers[event] = [handler]
} else {
@@ -130,7 +130,7 @@ PeerConnectionAnalyzer.prototype = {
}
},
- off: function(event, handler) {
+ off(event, handler) {
const handlers = this._handlers[event]
if (!handlers) {
return
@@ -142,7 +142,7 @@ PeerConnectionAnalyzer.prototype = {
}
},
- _trigger: function(event, args) {
+ _trigger(event, args) {
let handlers = this._handlers[event]
if (!handlers) {
return
@@ -157,15 +157,15 @@ PeerConnectionAnalyzer.prototype = {
}
},
- getConnectionQualityAudio: function() {
+ getConnectionQualityAudio() {
return this._connectionQualityAudio
},
- getConnectionQualityVideo: function() {
+ getConnectionQualityVideo() {
return this._connectionQualityVideo
},
- _setConnectionQualityAudio: function(connectionQualityAudio) {
+ _setConnectionQualityAudio(connectionQualityAudio) {
if (this._connectionQualityAudio === connectionQualityAudio) {
return
}
@@ -174,7 +174,7 @@ PeerConnectionAnalyzer.prototype = {
this._trigger('change:connectionQualityAudio', [connectionQualityAudio])
},
- _setConnectionQualityVideo: function(connectionQualityVideo) {
+ _setConnectionQualityVideo(connectionQualityVideo) {
if (this._connectionQualityVideo === connectionQualityVideo) {
return
}
@@ -183,7 +183,7 @@ PeerConnectionAnalyzer.prototype = {
this._trigger('change:connectionQualityVideo', [connectionQualityVideo])
},
- setPeerConnection: function(peerConnection, peerDirection = null) {
+ setPeerConnection(peerConnection, peerDirection = null) {
if (this._peerConnection) {
this._peerConnection.removeEventListener('iceconnectionstatechange', this._handleIceConnectionStateChangedBound)
this._stopGetStatsInterval()
@@ -198,8 +198,8 @@ PeerConnectionAnalyzer.prototype = {
}
},
- setAnalysisEnabledAudio: function(analysisEnabledAudio) {
- this._analysisEnabled['audio'] = analysisEnabledAudio
+ setAnalysisEnabledAudio(analysisEnabledAudio) {
+ this._analysisEnabled.audio = analysisEnabledAudio
if (!analysisEnabledAudio) {
this._setConnectionQualityAudio(CONNECTION_QUALITY.UNKNOWN)
@@ -208,8 +208,8 @@ PeerConnectionAnalyzer.prototype = {
}
},
- setAnalysisEnabledVideo: function(analysisEnabledVideo) {
- this._analysisEnabled['video'] = analysisEnabledVideo
+ setAnalysisEnabledVideo(analysisEnabledVideo) {
+ this._analysisEnabled.video = analysisEnabledVideo
if (!analysisEnabledVideo) {
this._setConnectionQualityVideo(CONNECTION_QUALITY.UNKNOWN)
@@ -218,7 +218,7 @@ PeerConnectionAnalyzer.prototype = {
}
},
- _resetStats: function(kind) {
+ _resetStats(kind) {
this._packets[kind].reset()
this._packetsLost[kind].reset()
this._packetsLostRatio[kind].reset()
@@ -226,7 +226,7 @@ PeerConnectionAnalyzer.prototype = {
this._timestamps[kind].reset()
},
- _handleIceConnectionStateChanged: function() {
+ _handleIceConnectionStateChanged() {
// Note that even if the ICE connection state is "disconnected" the
// connection is actually active, media is still transmitted, and the
// stats are properly updated.
@@ -260,12 +260,12 @@ PeerConnectionAnalyzer.prototype = {
}, 1000)
},
- _stopGetStatsInterval: function() {
+ _stopGetStatsInterval() {
window.clearInterval(this._getStatsInterval)
this._getStatsInterval = null
},
- _processStats: function(stats) {
+ _processStats(stats) {
if (!this._peerConnection || (this._peerConnection.iceConnectionState !== 'connected' && this._peerConnection.iceConnectionState !== 'completed' && this._peerConnection.iceConnectionState !== 'disconnected')) {
return
}
@@ -276,32 +276,32 @@ PeerConnectionAnalyzer.prototype = {
this._processReceiverStats(stats)
}
- if (this._analysisEnabled['audio']) {
+ if (this._analysisEnabled.audio) {
this._setConnectionQualityAudio(this._calculateConnectionQualityAudio())
}
- if (this._analysisEnabled['video']) {
+ if (this._analysisEnabled.video) {
this._setConnectionQualityVideo(this._calculateConnectionQualityVideo())
}
},
- _processSenderStats: function(stats) {
+ _processSenderStats(stats) {
// Packets are calculated as "packetsReceived + packetsLost" or as
// "packetsSent" depending on the browser (see below).
const packets = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
// Packets stats for a sender are checked from the point of view of the
// receiver.
const packetsReceived = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
const packetsLost = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
// If "packetsReceived" is not available (like in Chromium) use
@@ -309,30 +309,30 @@ PeerConnectionAnalyzer.prototype = {
// the received statistics, so checking "packetsLost" against it may not
// be fully accurate, but it should be close enough.
const packetsSent = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
// Timestamp is set to "timestampReceived" or "timestampSent" depending
// on how "packets" were calculated.
const timestamp = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
const timestampReceived = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
const timestampSent = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
const roundTripTime = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
for (const stat of stats.values()) {
@@ -419,26 +419,26 @@ PeerConnectionAnalyzer.prototype = {
}
},
- _processReceiverStats: function(stats) {
+ _processReceiverStats(stats) {
// Packets are calculated as "packetsReceived + packetsLost".
const packets = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
const packetsReceived = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
const packetsLost = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
const timestamp = {
- 'audio': -1,
- 'video': -1,
+ audio: -1,
+ video: -1,
}
for (const stat of stats.values()) {
@@ -506,15 +506,15 @@ PeerConnectionAnalyzer.prototype = {
}
},
- _calculateConnectionQualityAudio: function() {
- return this._calculateConnectionQuality(this._packetsLostRatio['audio'], this._packetsPerSecond['audio'], this._roundTripTime['audio'])
+ _calculateConnectionQualityAudio() {
+ return this._calculateConnectionQuality(this._packetsLostRatio.audio, this._packetsPerSecond.audio, this._roundTripTime.audio)
},
- _calculateConnectionQualityVideo: function() {
- return this._calculateConnectionQuality(this._packetsLostRatio['video'], this._packetsPerSecond['video'], this._roundTripTime['video'])
+ _calculateConnectionQualityVideo() {
+ return this._calculateConnectionQuality(this._packetsLostRatio.video, this._packetsPerSecond.video, this._roundTripTime.video)
},
- _calculateConnectionQuality: function(packetsLostRatio, packetsPerSecond, roundTripTime) {
+ _calculateConnectionQuality(packetsLostRatio, packetsPerSecond, roundTripTime) {
if (!packetsLostRatio.hasEnoughData() || !packetsPerSecond.hasEnoughData()) {
return CONNECTION_QUALITY.UNKNOWN
}
diff --git a/src/utils/webrtc/models/CallParticipantCollection.js b/src/utils/webrtc/models/CallParticipantCollection.js
index de7673427..10ac40a2b 100644
--- a/src/utils/webrtc/models/CallParticipantCollection.js
+++ b/src/utils/webrtc/models/CallParticipantCollection.js
@@ -31,7 +31,7 @@ export default function CallParticipantCollection() {
CallParticipantCollection.prototype = {
- on: function(event, handler) {
+ on(event, handler) {
if (!this._handlers.hasOwnProperty(event)) {
this._handlers[event] = [handler]
} else {
@@ -39,7 +39,7 @@ CallParticipantCollection.prototype = {
}
},
- off: function(event, handler) {
+ off(event, handler) {
const handlers = this._handlers[event]
if (!handlers) {
return
@@ -51,7 +51,7 @@ CallParticipantCollection.prototype = {
}
},
- _trigger: function(event, args) {
+ _trigger(event, args) {
let handlers = this._handlers[event]
if (!handlers) {
return
@@ -66,7 +66,7 @@ CallParticipantCollection.prototype = {
}
},
- add: function(options) {
+ add(options) {
const callParticipantModel = new CallParticipantModel(options)
this.callParticipantModels.push(callParticipantModel)
@@ -75,13 +75,13 @@ CallParticipantCollection.prototype = {
return callParticipantModel
},
- get: function(peerId) {
+ get(peerId) {
return this.callParticipantModels.find(function(callParticipantModel) {
return callParticipantModel.attributes.peerId === peerId
})
},
- remove: function(peerId) {
+ remove(peerId) {
const index = this.callParticipantModels.findIndex(function(callParticipantModel) {
return callParticipantModel.attributes.peerId === peerId
})
diff --git a/src/utils/webrtc/models/CallParticipantModel.js b/src/utils/webrtc/models/CallParticipantModel.js
index cda32ed75..7a75d489e 100644
--- a/src/utils/webrtc/models/CallParticipantModel.js
+++ b/src/utils/webrtc/models/CallParticipantModel.js
@@ -86,7 +86,7 @@ export default function CallParticipantModel(options) {
CallParticipantModel.prototype = {
- destroy: function() {
+ destroy() {
if (this.get('peer')) {
this.get('peer').off('extendedIceConnectionStateChange', this._handleExtendedIceConnectionStateChangeBound)
}
@@ -100,17 +100,17 @@ CallParticipantModel.prototype = {
this._webRtc.off('raisedHand', this._handleRaisedHandBound)
},
- get: function(key) {
+ get(key) {
return this.attributes[key]
},
- set: function(key, value) {
+ set(key, value) {
this.attributes[key] = value
this._trigger('change:' + key, [value])
},
- on: function(event, handler) {
+ on(event, handler) {
if (!this._handlers.hasOwnProperty(event)) {
this._handlers[event] = [handler]
} else {
@@ -118,7 +118,7 @@ CallParticipantModel.prototype = {
}
},
- off: function(event, handler) {
+ off(event, handler) {
const handlers = this._handlers[event]
if (!handlers) {
return
@@ -130,7 +130,7 @@ CallParticipantModel.prototype = {
}
},
- _trigger: function(event, args) {
+ _trigger(event, args) {
let handlers = this._handlers[event]
if (!handlers) {
return
@@ -149,7 +149,7 @@ CallParticipantModel.prototype = {
}
},
- _handlePeerStreamAdded: function(peer) {
+ _handlePeerStreamAdded(peer) {
if (this.get('peer') === peer) {
this.set('stream', this.get('peer').stream || null)
this.set('audioElement', attachMediaStream(this.get('stream'), null, { audio: true }))
@@ -164,7 +164,7 @@ CallParticipantModel.prototype = {
}
},
- _handlePeerStreamRemoved: function(peer) {
+ _handlePeerStreamRemoved(peer) {
if (this.get('peer') === peer) {
this.get('audioElement').srcObject = null
this.set('audioElement', null)
@@ -177,7 +177,7 @@ CallParticipantModel.prototype = {
}
},
- _handleNick: function(data) {
+ _handleNick(data) {
// The nick could be changed even if there is no Peer object.
if (this.get('peerId') !== data.id) {
return
@@ -186,7 +186,7 @@ CallParticipantModel.prototype = {
this.set('name', data.name || null)
},
- _handleMute: function(data) {
+ _handleMute(data) {
if (!this.get('peer') || this.get('peer').id !== data.id) {
return
}
@@ -202,7 +202,7 @@ CallParticipantModel.prototype = {
}
},
- forceMute: function() {
+ forceMute() {
if (!this.get('peer')) {
return
}
@@ -217,7 +217,7 @@ CallParticipantModel.prototype = {
this._handleMute({ id: this.get('peer').id })
},
- _handleUnmute: function(data) {
+ _handleUnmute(data) {
if (!this.get('peer') || this.get('peer').id !== data.id) {
return
}
@@ -232,7 +232,7 @@ CallParticipantModel.prototype = {
}
},
- _handleChannelMessage: function(peer, label, data) {
+ _handleChannelMessage(peer, label, data) {
if (!this.get('peer') || this.get('peer').id !== peer.id) {
return
}
@@ -248,7 +248,7 @@ CallParticipantModel.prototype = {
}
},
- _handleRaisedHand: function(data) {
+ _handleRaisedHand(data) {
// The hand could be raised even if there is no Peer object.
if (this.get('peerId') !== data.id) {
return
@@ -257,7 +257,7 @@ CallParticipantModel.prototype = {
this.set('raisedHand', data.raised)
},
- setPeer: function(peer) {
+ setPeer(peer) {
if (peer && this.get('peerId') !== peer.id) {
console.warn('Mismatch between stored peer ID and ID of given peer: ', this.get('peerId'), peer.id)
}
@@ -285,7 +285,7 @@ CallParticipantModel.prototype = {
this.get('peer').on('extendedIceConnectionStateChange', this._handleExtendedIceConnectionStateChangeBound)
},
- _handleExtendedIceConnectionStateChange: function(extendedIceConnectionState) {
+ _handleExtendedIceConnectionStateChange(extendedIceConnectionState) {
// Ensure that the name is set, as when the MCU is not used it will
// not be set later for registered users without microphone nor
// camera.
@@ -336,7 +336,7 @@ CallParticipantModel.prototype = {
}
},
- setScreenPeer: function(screenPeer) {
+ setScreenPeer(screenPeer) {
if (screenPeer && this.get('peerId') !== screenPeer.id) {
console.warn('Mismatch between stored peer ID and ID of given screen peer: ', this.get('peerId'), screenPeer.id)
}
@@ -347,11 +347,11 @@ CallParticipantModel.prototype = {
this._handlePeerStreamAdded(this.get('screenPeer'))
},
- setUserId: function(userId) {
+ setUserId(userId) {
this.set('userId', userId)
},
- setNextcloudSessionId: function(nextcloudSessionId) {
+ setNextcloudSessionId(nextcloudSessionId) {
this.set('nextcloudSessionId', nextcloudSessionId)
},
diff --git a/src/utils/webrtc/models/LocalCallParticipantModel.js b/src/utils/webrtc/models/LocalCallParticipantModel.js
index 60bffab1b..0ee983fac 100644
--- a/src/utils/webrtc/models/LocalCallParticipantModel.js
+++ b/src/utils/webrtc/models/LocalCallParticipantModel.js
@@ -38,17 +38,17 @@ export default function LocalCallParticipantModel() {
LocalCallParticipantModel.prototype = {
- get: function(key) {
+ get(key) {
return this.attributes[key]
},
- set: function(key, value) {
+ set(key, value) {
this.attributes[key] = value
this._trigger('change:' + key, [value])
},
- on: function(event, handler) {
+ on(event, handler) {
if (!this._handlers.hasOwnProperty(event)) {
this._handlers[event] = [handler]
} else {
@@ -56,7 +56,7 @@ LocalCallParticipantModel.prototype = {
}
},
- off: function(event, handler) {
+ off(event, handler) {
const handlers = this._handlers[event]
if (!handlers) {
return
@@ -68,7 +68,7 @@ LocalCallParticipantModel.prototype = {
}
},
- _trigger: function(event, args) {
+ _trigger(event, args) {
let handlers = this._handlers[event]
if (!handlers) {
return
@@ -87,7 +87,7 @@ LocalCallParticipantModel.prototype = {
}
},
- setWebRtc: function(webRtc) {
+ setWebRtc(webRtc) {
if (this._webRtc) {
this._webRtc.off('forcedMute', this._handleForcedMuteBound)
this._unwatchDisplayNameChange()
@@ -102,7 +102,7 @@ LocalCallParticipantModel.prototype = {
this._unwatchDisplayNameChange = store.watch(state => state.actorStore.displayName, this.setGuestName.bind(this))
},
- setPeer: function(peer) {
+ setPeer(peer) {
if (peer && this.get('peerId') !== peer.id) {
console.warn('Mismatch between stored peer ID and ID of given peer: ', this.get('peerId'), peer.id)
}
@@ -110,7 +110,7 @@ LocalCallParticipantModel.prototype = {
this.set('peer', peer)
},
- setScreenPeer: function(screenPeer) {
+ setScreenPeer(screenPeer) {
if (screenPeer && this.get('peerId') !== screenPeer.id) {
console.warn('Mismatch between stored peer ID and ID of given screen peer: ', this.get('peerId'), screenPeer.id)
}
@@ -118,7 +118,7 @@ LocalCallParticipantModel.prototype = {
this.set('screenPeer', screenPeer)
},
- setGuestName: function(guestName) {
+ setGuestName(guestName) {
if (!this._webRtc) {
throw new Error('WebRtc not initialized yet')
}
@@ -128,7 +128,7 @@ LocalCallParticipantModel.prototype = {
this._webRtc.webrtc.emit('nickChanged', guestName)
},
- _handleForcedMute: function() {
+ _handleForcedMute() {
this._trigger('forcedMute')
},
diff --git a/src/utils/webrtc/models/LocalMediaModel.js b/src/utils/webrtc/models/LocalMediaModel.js
index 6fcb535d4..2fcc1c6f0 100644
--- a/src/utils/webrtc/models/LocalMediaModel.js
+++ b/src/utils/webrtc/models/LocalMediaModel.js
@@ -63,17 +63,17 @@ export default function LocalMediaModel() {
LocalMediaModel.prototype = {
- get: function(key) {
+ get(key) {
return this.attributes[key]
},
- set: function(key, value) {
+ set(key, value) {
this.attributes[key] = value
this._trigger('change:' + key, [value])
},
- on: function(event, handler) {
+ on(event, handler) {
if (!this._handlers.hasOwnProperty(event)) {
this._handlers[event] = [handler]
} else {
@@ -81,7 +81,7 @@ LocalMediaModel.prototype = {
}
},
- off: function(event, handler) {
+ off(event, handler) {
const handlers = this._handlers[event]
if (!handlers) {
return
@@ -93,7 +93,7 @@ LocalMediaModel.prototype = {
}
},
- _trigger: function(event, args) {
+ _trigger(event, args) {
let handlers = this._handlers[event]
if (!handlers) {
return
@@ -108,11 +108,11 @@ LocalMediaModel.prototype = {
}
},
- getWebRtc: function() {
+ getWebRtc() {
return this._webRtc
},
- setWebRtc: function(webRtc) {
+ setWebRtc(webRtc) {
if (this._webRtc && this._webRtc.webrtc) {
this._webRtc.webrtc.off('localStreamRequested', this._handleLocalStreamRequestedBound)
this._webRtc.webrtc.off('localStream', this._handleLocalStreamBound)
@@ -165,13 +165,13 @@ LocalMediaModel.prototype = {
this._webRtc.webrtc.on('localScreenStopped', this._handleLocalScreenStoppedBound)
},
- _handleLocalStreamRequested: function(constraints, context) {
+ _handleLocalStreamRequested(constraints, context) {
if (context !== 'retry-no-video') {
this.set('localStreamRequestVideoError', null)
}
},
- _handleLocalStream: function(configuration, localStream) {
+ _handleLocalStream(configuration, localStream) {
// Although there could be several local streams active at the same
// time (if the local media is started again before stopping it
// first) the methods to control them ("mute", "unmute",
@@ -189,7 +189,7 @@ LocalMediaModel.prototype = {
this._setInitialMediaState(configuration)
},
- _handleLocalStreamRequestFailedRetryNoVideo: function(constraints, error) {
+ _handleLocalStreamRequestFailedRetryNoVideo(constraints, error) {
if (!error || error.name === 'NotFoundError') {
return
}
@@ -197,13 +197,13 @@ LocalMediaModel.prototype = {
this.set('localStreamRequestVideoError', error)
},
- _handleLocalStreamRequestFailed: function() {
+ _handleLocalStreamRequestFailed() {
this.set('localStream', null)
this._setInitialMediaState({ audio: false, video: false })
},
- _setInitialMediaState: function(configuration) {
+ _setInitialMediaState(configuration) {
if (configuration.audio !== false) {
this.set('audioAvailable', true)
if (this.get('audioEnabled')) {
@@ -231,14 +231,14 @@ LocalMediaModel.prototype = {
this.set('raisedHand', { state: false, timestamp: Date.now() })
},
- _handleLocalStreamChanged: function(localStream) {
+ _handleLocalStreamChanged(localStream) {
// Only a single local stream is assumed to be active at the same time.
this.set('localStream', localStream)
this._updateMediaAvailability(localStream)
},
- _updateMediaAvailability: function(localStream) {
+ _updateMediaAvailability(localStream) {
if (localStream && localStream.getAudioTracks().length > 0) {
this.set('audioAvailable', true)
@@ -268,7 +268,7 @@ LocalMediaModel.prototype = {
}
},
- _handleLocalStreamStopped: function(localStream) {
+ _handleLocalStreamStopped(localStream) {
if (this.get('localStream') !== localStream) {
return
}
@@ -281,7 +281,7 @@ LocalMediaModel.prototype = {
this.set('videoAvailable', false)
},
- _handleAudioOn: function() {
+ _handleAudioOn() {
if (!this.get('audioAvailable')) {
return
}
@@ -289,7 +289,7 @@ LocalMediaModel.prototype = {
this.set('audioEnabled', true)
},
- _handleAudioOff: function() {
+ _handleAudioOff() {
if (!this.get('audioAvailable')) {
return
}
@@ -297,7 +297,7 @@ LocalMediaModel.prototype = {
this.set('audioEnabled', false)
},
- _handleVolumeChange: function(currentVolume, volumeThreshold) {
+ _handleVolumeChange(currentVolume, volumeThreshold) {
if (!this.get('audioAvailable')) {
return
}
@@ -306,7 +306,7 @@ LocalMediaModel.prototype = {
this.set('volumeThreshold', volumeThreshold)
},
- _handleSpeaking: function() {
+ _handleSpeaking() {
if (!this.get('audioAvailable')) {
return
}
@@ -314,7 +314,7 @@ LocalMediaModel.prototype = {
this.set('speaking', true)
},
- _handleStoppedSpeaking: function() {
+ _handleStoppedSpeaking() {
if (!this.get('audioAvailable')) {
return
}
@@ -322,7 +322,7 @@ LocalMediaModel.prototype = {
this.set('speaking', false)
},
- _handleSpeakingWhileMuted: function() {
+ _handleSpeakingWhileMuted() {
if (!this.get('audioAvailable')) {
return
}
@@ -330,7 +330,7 @@ LocalMediaModel.prototype = {
this.set('speakingWhileMuted', true)
},
- _handleStoppedSpeakingWhileMuted: function() {
+ _handleStoppedSpeakingWhileMuted() {
if (!this.get('audioAvailable')) {
return
}
@@ -338,7 +338,7 @@ LocalMediaModel.prototype = {
this.set('speakingWhileMuted', false)
},
- _handleVideoOn: function() {
+ _handleVideoOn() {
if (!this.get('videoAvailable')) {
return
}
@@ -346,7 +346,7 @@ LocalMediaModel.prototype = {
this.set('videoEnabled', true)
},
- _handleVideoOff: function() {
+ _handleVideoOff() {
if (!this.get('videoAvailable')) {
return
}
@@ -354,15 +354,15 @@ LocalMediaModel.prototype = {
this.set('videoEnabled', false)
},
- _handleLocalScreen: function(screen) {
+ _handleLocalScreen(screen) {
this.set('localScreen', screen)
},
- _handleLocalScreenStopped: function() {
+ _handleLocalScreenStopped() {
this.set('localScreen', null)
},
- enableAudio: function() {
+ enableAudio() {
if (!this._webRtc) {
throw new Error('WebRtc not initialized yet')
}
@@ -375,7 +375,7 @@ LocalMediaModel.prototype = {
this._webRtc.unmute()
},
- disableAudio: function() {
+ disableAudio() {
if (!this._webRtc) {
throw new Error('WebRtc not initialized yet')
}
@@ -391,7 +391,7 @@ LocalMediaModel.prototype = {
this._webRtc.mute()
},
- enableVideo: function() {
+ enableVideo() {
if (!this._webRtc) {
throw new Error('WebRtc not initialized yet')
}
@@ -404,7 +404,7 @@ LocalMediaModel.prototype = {
this._webRtc.resumeVideo()
},
- disableVideo: function() {
+ disableVideo() {
if (!this._webRtc) {
throw new Error('WebRtc not initialized yet')
}
@@ -420,7 +420,7 @@ LocalMediaModel.prototype = {
this._webRtc.pauseVideo()
},
- shareScreen: function(mode, callback) {
+ shareScreen(mode, callback) {
if (!this._webRtc) {
throw new Error('WebRtc not initialized yet')
}
@@ -428,7 +428,7 @@ LocalMediaModel.prototype = {
this._webRtc.shareScreen(mode, callback)
},
- stopSharingScreen: function() {
+ stopSharingScreen() {
if (!this._webRtc) {
throw new Error('WebRtc not initialized yet')
}
@@ -441,7 +441,7 @@ LocalMediaModel.prototype = {
*
* @param {bool} raised true for raised, false for lowered
*/
- toggleHandRaised: function(raised) {
+ toggleHandRaised(raised) {
if (!this._webRtc) {
throw new Error('WebRtc not initialized yet')
}
diff --git a/src/utils/webrtc/shims/MediaStream.js b/src/utils/webrtc/shims/MediaStream.js
index 7d0cee880..8c6bc2429 100644
--- a/src/utils/webrtc/shims/MediaStream.js
+++ b/src/utils/webrtc/shims/MediaStream.js
@@ -33,7 +33,7 @@ if (window.MediaStream) {
this.removeEventListener('addtrack', testAddTrackEvent)
if (!addTrackEventDispatched) {
- this.dispatchEvent(new MediaStreamTrackEvent('addtrack', { track: track }))
+ this.dispatchEvent(new MediaStreamTrackEvent('addtrack', { track }))
}
}
@@ -50,7 +50,7 @@ if (window.MediaStream) {
this.removeEventListener('removetrack', testRemoveTrackEvent)
if (!removeTrackEventDispatched) {
- this.dispatchEvent(new MediaStreamTrackEvent('removetrack', { track: track }))
+ this.dispatchEvent(new MediaStreamTrackEvent('removetrack', { track }))
}
}
diff --git a/src/utils/webrtc/simplewebrtc/getscreenmedia.js b/src/utils/webrtc/simplewebrtc/getscreenmedia.js
index 243251e44..e7873f84b 100644
--- a/src/utils/webrtc/simplewebrtc/getscreenmedia.js
+++ b/src/utils/webrtc/simplewebrtc/getscreenmedia.js
@@ -63,7 +63,8 @@ module.exports = function(mode, constraints, cb) {
error.name = 'PERMISSION_DENIED'
callback(error)
} else {
- constraints = (hasConstraints && constraints) || { audio: false,
+ constraints = (hasConstraints && constraints) || {
+ audio: false,
video: {
mandatory: {
chromeMediaSource: 'desktop',
@@ -71,7 +72,8 @@ module.exports = function(mode, constraints, cb) {
maxHeight: window.screen.height,
maxFrameRate: 3,
},
- } }
+ },
+ }
constraints.video.mandatory.chromeMediaSourceId = data.sourceId
getUserMedia(constraints, callback)
}
@@ -85,7 +87,8 @@ module.exports = function(mode, constraints, cb) {
error.name = 'CEF_GETSCREENMEDIA_CANCELED'
callback(error)
} else {
- constraints = (hasConstraints && constraints) || { audio: false,
+ constraints = (hasConstraints && constraints) || {
+ audio: false,
video: {
mandatory: {
chromeMediaSource: 'desktop',
@@ -97,7 +100,8 @@ module.exports = function(mode, constraints, cb) {
{ googLeakyBucket: true },
{ googTemporalLayeredScreencast: true },
],
- } }
+ },
+ }
constraints.video.mandatory.chromeMediaSourceId = sourceId
getUserMedia(constraints, callback)
}
@@ -180,7 +184,8 @@ typeof window !== 'undefined' && window.addEventListener('message', function(eve
error.name = 'PERMISSION_DENIED'
callback(error)
} else {
- constraints = constraints || { audio: false,
+ constraints = constraints || {
+ audio: false,
video: {
mandatory: {
chromeMediaSource: 'desktop',
@@ -192,7 +197,8 @@ typeof window !== 'undefined' && window.addEventListener('message', function(eve
{ googLeakyBucket: true },
{ googTemporalLayeredScreencast: true },
],
- } }
+ },
+ }
constraints.video.mandatory.chromeMediaSourceId = event.data.sourceId
getUserMedia(constraints, callback)
}
diff --git a/src/utils/webrtc/simplewebrtc/localmedia.js b/src/utils/webrtc/simplewebrtc/localmedia.js
index ea678b1cf..9beb685b7 100644
--- a/src/utils/webrtc/simplewebrtc/localmedia.js
+++ b/src/utils/webrtc/simplewebrtc/localmedia.js
@@ -769,7 +769,7 @@ LocalMedia.prototype._setupAudioMonitor = function(stream, harkOptions) {
self.emit('volumeChange', volume, threshold)
})
- this._audioMonitors.push({ audio: audio, stream: stream })
+ this._audioMonitors.push({ audio, stream })
}
LocalMedia.prototype._stopAudioMonitor = function(stream) {
@@ -788,7 +788,7 @@ LocalMedia.prototype._stopAudioMonitor = function(stream) {
// fallback for old .localScreen behaviour
Object.defineProperty(LocalMedia.prototype, 'localScreen', {
- get: function() {
+ get() {
return this.localScreens.length > 0 ? this.localScreens[0] : null
},
})
diff --git a/src/utils/webrtc/simplewebrtc/peer.js b/src/utils/webrtc/simplewebrtc/peer.js
index 7acaf4cb8..bc5e17bb1 100644
--- a/src/utils/webrtc/simplewebrtc/peer.js
+++ b/src/utils/webrtc/simplewebrtc/peer.js
@@ -263,7 +263,7 @@ Peer.prototype.send = function(messageType, payload) {
broadcaster: this.broadcaster,
roomType: this.type,
type: messageType,
- payload: payload,
+ payload,
}
this.logger.log('sending', messageType, message)
this.parent.emit('message', message)
@@ -274,7 +274,7 @@ Peer.prototype.send = function(messageType, payload) {
Peer.prototype.sendDirectly = function(channel, messageType, payload) {
const message = {
type: messageType,
- payload: payload,
+ payload,
}
this.logger.log('sending via datachannel', channel, messageType, message)
const dc = this.getDataChannel(channel)
diff --git a/src/utils/webrtc/webrtc.js b/src/utils/webrtc/webrtc.js
index 39dc7e65b..c869f86d6 100644
--- a/src/utils/webrtc/webrtc.js
+++ b/src/utils/webrtc/webrtc.js
@@ -1150,7 +1150,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
}
errorNotificationHandle = showError(message, {
- timeout: timeout,
+ timeout,
})
})
@@ -1170,7 +1170,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
webrtc.emit('mute', { id: peer.id, name: 'video' })
} else if (data.type === 'nickChanged') {
const name = typeof (data.payload) === 'string' ? data.payload : data.payload.name
- webrtc.emit('nick', { id: peer.id, name: name })
+ webrtc.emit('nick', { id: peer.id, name })
} else if (data.type === 'speaking' || data.type === 'stoppedSpeaking') {
// Valid known messages, but handled elsewhere
} else {
@@ -1207,7 +1207,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
to: sessionId,
roomType: 'video',
type: messageType,
- payload: payload,
+ payload,
}
signaling.emit('message', message)
}
@@ -1250,14 +1250,14 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
payload = name
} else {
payload = {
- 'name': name,
- 'userid': signaling.settings.userId,
+ name,
+ userid: signaling.settings.userId,
}
}
sendDataChannelToAll('status', 'nickChanged', payload)
- webrtc.sendToAll('nickChanged', { name: name })
+ webrtc.sendToAll('nickChanged', { name })
})
// Local screen added.
diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue
index 59411038c..9aa6b68eb 100644
--- a/src/views/Dashboard.vue
+++ b/src/views/Dashboard.vue
@@ -27,14 +27,14 @@
:loading="loading"
:show-items-and-empty-content="!hasImportantConversations"
:half-empty-content-message="t('spreed', 'No unread mentions')">
- <template v-slot:default="{ item }">
+ <template #default="{ item }">
<DashboardWidgetItem
:target-url="getItemTargetUrl(item)"
:main-text="getMainText(item)"
:sub-text="getSubText(item)"
:item="item"
v-on="handlers">
- <template v-slot:avatar>
+ <template #avatar>
<ConversationIcon
:item="item"
:hide-favorite="true"
@@ -42,7 +42,7 @@
</template>
</DashboardWidgetItem>
</template>
- <template v-slot:empty-content>
+ <template #empty-content>
<EmptyContent icon="icon-talk">
<template #desc>
{{ t('spreed', 'Say hi to your friends and colleagues!') }}
diff --git a/src/views/FlowPostToConversation.vue b/src/views/FlowPostToConversation.vue
index 195c61a10..50977ac21 100644
--- a/src/views/FlowPostToConversation.vue
+++ b/src/views/FlowPostToConversation.vue
@@ -25,7 +25,7 @@ export default {
components: { Multiselect },
props: {
value: {
- default: JSON.stringify({ 'm': '0', 't': '' }),
+ default: JSON.stringify({ m: '0', t: '' }),
type: String,
},
},
diff --git a/src/views/MainView.vue b/src/views/MainView.vue
index accfa6009..46f43249f 100644
--- a/src/views/MainView.vue
+++ b/src/views/MainView.vue
@@ -57,7 +57,7 @@ export default {
},
watch: {
- isInLobby: function(isInLobby) {
+ isInLobby(isInLobby) {
// User is now blocked by the lobby
if (isInLobby && this.isInCall) {
this.$store.dispatch('leaveCall', {