Audio: Fix playing voice messages on iOS

This commit is contained in:
Alexander Zinchuk 2021-06-30 04:46:36 +03:00
parent 5680af5967
commit cfe9c40abb
3 changed files with 4 additions and 5 deletions

5
package-lock.json generated
View File

@ -15124,9 +15124,8 @@
} }
}, },
"opus-recorder": { "opus-recorder": {
"version": "6.2.0", "version": "github:Ajaxy/opus-recorder#116830a94120baad5ac60ac060c2ecd032b6107b",
"resolved": "https://registry.npmjs.org/opus-recorder/-/opus-recorder-6.2.0.tgz", "from": "github:Ajaxy/opus-recorder"
"integrity": "sha512-890khMXgmkqarxvocdTc9iADKIxbhzX8DyBcjVcE5nyuOVfVAkvyIAI1jF8qUscdsgaRM+tVy20QM6LZy1Gp9A=="
}, },
"original": { "original": {
"version": "1.0.2", "version": "1.0.2",

View File

@ -105,7 +105,7 @@
"emoji-data-ios": "github:korenskoy/emoji-data-ios#1a4532f", "emoji-data-ios": "github:korenskoy/emoji-data-ios#1a4532f",
"events": "^3.0.0", "events": "^3.0.0",
"idb-keyval": "^5.0.5", "idb-keyval": "^5.0.5",
"opus-recorder": "^6.2.0", "opus-recorder": "github:Ajaxy/opus-recorder",
"pako": "^1.0.10", "pako": "^1.0.10",
"qr-creator": "^1.0.0", "qr-creator": "^1.0.0",
"websocket": "^1.0.30" "websocket": "^1.0.30"

View File

@ -389,7 +389,7 @@ function renderWaveform(
} }
const fillColor = theme === 'dark' ? '#494B75' : '#CBCBCB'; const fillColor = theme === 'dark' ? '#494B75' : '#CBCBCB';
const fillOwnColor = theme === 'dark' ? '#C69C85' : '#B0DEA6'; const fillOwnColor = theme === 'dark' ? '#C0BBED' : '#B0DEA6';
const progressFillColor = theme === 'dark' ? '#868DF5' : '#54a3e6'; const progressFillColor = theme === 'dark' ? '#868DF5' : '#54a3e6';
const progressFillOwnColor = theme === 'dark' ? '#FFFFFF' : '#53ad53'; const progressFillOwnColor = theme === 'dark' ? '#FFFFFF' : '#53ad53';
const durationFactor = Math.min(duration / AVG_VOICE_DURATION, 1); const durationFactor = Math.min(duration / AVG_VOICE_DURATION, 1);