diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index 8ffe46b5e..df98b17d9 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -853,6 +853,14 @@
"message": "To send audio messages, allow Signal Desktop to access your microphone.",
"description": "Shown if the user attempts to send an audio message without audio permssions turned on"
},
+ "audioCallingPermissionNeeded": {
+ "message": "For calling, you must allow Signal Desktop to access your microphone.",
+ "description": "Shown if the user attempts access the microphone for calling without audio permssions turned on"
+ },
+ "videoCallingPermissionNeeded": {
+ "message": "For video calling, you must allow Signal Desktop to access your camera.",
+ "description": "Shown if the user attempts access the camera for video calling without video permssions turned on"
+ },
"allowAccess": {
"message": "Allow Access",
"description": "Button shown in popup asking to enable microphon/video permissions to send audio messages"
@@ -1101,12 +1109,28 @@
"message": "Theme",
"description": "Header for theme settings"
},
+ "calling": {
+ "message": "Calling",
+ "description": "Header for calling options on the settings screen"
+ },
+ "alwaysRelayCallsDescription": {
+ "message": "Always relay calls",
+ "description": "Description of the always relay calls setting"
+ },
+ "alwaysRelayCallsDetail": {
+ "message": "Relay all calls through the Signal server to avoid revealing your IP address to your contact. Enabling will reduce call quality.",
+ "description": "Details describing the always relay calls setting"
+ },
"permissions": {
"message": "Permissions",
"description": "Header for permissions section of settings"
},
"mediaPermissionsDescription": {
- "message": "Allow access to camera and microphone",
+ "message": "Allow access to the microphone",
+ "description": "Description of the media permission description"
+ },
+ "mediaCameraPermissionsDescription": {
+ "message": "Allow access to the camera",
"description": "Description of the media permission description"
},
"general": {
@@ -1539,6 +1563,18 @@
"message": "Play audio notification",
"description": "Description for audio notification setting"
},
+ "callRingtoneNotificationDescription": {
+ "message": "Play calling sounds",
+ "description": "Description for call ringtone notification setting"
+ },
+ "callSystemNotificationDescription": {
+ "message": "Show notifications for calls",
+ "description": "Description for call notification setting"
+ },
+ "incomingCallNotificationDescription": {
+ "message": "Enable incoming calls",
+ "description": "Description for incoming calls setting"
+ },
"safetyNumberChanged": {
"message": "Safety Number has changed",
"description": "A notification shown in the conversation when a contact reinstalls"
@@ -2074,6 +2110,18 @@
"message": "Close current conversation",
"description": "Shown in the shortcuts guide"
},
+ "Keyboard--calling-header": {
+ "message": "Calling",
+ "description": "Header of the keyboard shortcuts guide - calling section"
+ },
+ "Keyboard--toggle-audio": {
+ "message": "Toggle mute on and off",
+ "description": "Shown in the shortcuts guide"
+ },
+ "Keyboard--toggle-video": {
+ "message": "Toggle video on and off",
+ "description": "Shown in the shortcuts guide"
+ },
"close-popup": {
"message": "Close Popup",
"description": "Used as alt text for any button closing a popup"
@@ -2533,5 +2581,87 @@
"example": "Jeff Smith"
}
}
+ },
+ "acceptCall": {
+ "message": "Answer",
+ "description": "Shown in tooltip for the button to accept a call (audio or video)"
+ },
+ "acceptCallWithoutVideo": {
+ "message": "Answer without video",
+ "description": "Shown in tooltip for the button to accept a video call without video"
+ },
+ "declineCall": {
+ "message": "Decline",
+ "description": "Shown in tooltip for the button to decline a call (audio or video)"
+ },
+ "declinedIncomingAudioCall": {
+ "message": "You declined an audio call",
+ "description": "Shown in conversation history when you declined an incoming audio call"
+ },
+ "declinedIncomingVideoCall": {
+ "message": "You declined a video call",
+ "description": "Shown in conversation history when you declined an incoming video call"
+ },
+ "acceptedIncomingAudioCall": {
+ "message": "Incoming audio call",
+ "description": "Shown in conversation history when you accepted an incoming audio call"
+ },
+ "acceptedIncomingVideoCall": {
+ "message": "Incoming video call",
+ "description": "Shown in conversation history when you accepted an incoming video call"
+ },
+ "missedIncomingAudioCall": {
+ "message": "Missed audio call",
+ "description": "Shown in conversation history when you missed an incoming audio call"
+ },
+ "missedIncomingVideoCall": {
+ "message": "Missed video call",
+ "description": "Shown in conversation history when you missed an incoming video call"
+ },
+ "acceptedOutgoingAudioCall": {
+ "message": "Outgoing audio call",
+ "description": "Shown in conversation history when you made an outgoing audio call"
+ },
+ "acceptedOutgoingVideoCall": {
+ "message": "Outgoing video call",
+ "description": "Shown in conversation history when you made an outgoing video call"
+ },
+ "missedOrDeclinedOutgoingAudioCall": {
+ "message": "Unanswered audio call",
+ "description": "Shown in conversation history when your audio call is missed or declined"
+ },
+ "missedOrDeclinedOutgoingVideoCall": {
+ "message": "Unanswered video call",
+ "description": "Shown in conversation history when your video call is missed or declined"
+ },
+ "incomingAudioCall": {
+ "message": "Incoming audio call...",
+ "description": "Shown in both the incoming call bar and notification for an incoming audio call"
+ },
+ "incomingVideoCall": {
+ "message": "Incoming video call...",
+ "description": "Shown in both the incoming call bar and notification for an incoming video call"
+ },
+ "outgoingCallPrering": {
+ "message": "Calling...",
+ "description": "Shown in the call screen when placing an outgoing call that isn't ringing yet"
+ },
+ "outgoingCallRinging": {
+ "message": "Ringing...",
+ "description": "Shown in the call screen when placing an outgoing call that is now ringing"
+ },
+ "callReconnecting": {
+ "message": "Reconnecting...",
+ "description": "Shown in the call screen when the call is reconnecting due to network issues"
+ },
+ "callDuration": {
+ "message": "Signal $duration$",
+ "description": "Shown in the call screen to indicate how long the call has been connected",
+ "placeholders": {
+ "duration": {
+ "content": "$1",
+ "example": "00:01"
+ }
+ }
}
}
diff --git a/app/permissions.js b/app/permissions.js
index 20697a33d..3b012cfaf 100644
--- a/app/permissions.js
+++ b/app/permissions.js
@@ -7,7 +7,7 @@ const PERMISSIONS = {
notifications: true, // required to show OS notifications for new messages
// Off by default, can be enabled by user
- media: false, // required for access to microphone, used for voice notes
+ media: false, // required for access to microphone and camera, used for voice notes and calling
// Not allowed
geolocation: false,
@@ -17,9 +17,21 @@ const PERMISSIONS = {
};
function _createPermissionHandler(userConfig) {
- return (webContents, permission, callback) => {
- // We default 'media' permission to false, but the user can override that
- if (permission === 'media' && userConfig.get('mediaPermissions')) {
+ return (webContents, permission, callback, details) => {
+ // We default 'media' permission to false, but the user can override that for
+ // the microphone and camera.
+ if (
+ permission === 'media' &&
+ details.mediaTypes.includes('audio') &&
+ userConfig.get('mediaPermissions')
+ ) {
+ return callback(true);
+ }
+ if (
+ permission === 'media' &&
+ details.mediaTypes.includes('video') &&
+ userConfig.get('mediaCameraPermissions')
+ ) {
return callback(true);
}
diff --git a/background.html b/background.html
index 3ae938283..958869327 100644
--- a/background.html
+++ b/background.html
@@ -52,22 +52,25 @@