kopia lustrzana https://github.com/backface/turtlestitch
record sounds in mono
rodzic
5133adbd45
commit
0c0625932f
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
### 2020-01-28
|
### 2020-01-28
|
||||||
* new dev version
|
* new dev version
|
||||||
|
* gui: record sounds in mono
|
||||||
|
|
||||||
## 5.4.4:
|
## 5.4.4:
|
||||||
* **Notable Fixes**
|
* **Notable Fixes**
|
||||||
|
|
10
src/gui.js
10
src/gui.js
|
@ -9805,8 +9805,14 @@ SoundRecorderDialogMorph.prototype.buildContents = function () {
|
||||||
this.body.fixLayout();
|
this.body.fixLayout();
|
||||||
|
|
||||||
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
||||||
navigator.mediaDevices.getUserMedia({ audio: true })
|
navigator.mediaDevices.getUserMedia(
|
||||||
.then(function (stream) {
|
{
|
||||||
|
audio: {
|
||||||
|
channelCount: 1 // force mono, currently only works on FF
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
).then(function (stream) {
|
||||||
myself.mediaRecorder = new MediaRecorder(stream);
|
myself.mediaRecorder = new MediaRecorder(stream);
|
||||||
myself.mediaRecorder.ondataavailable = function (event) {
|
myself.mediaRecorder.ondataavailable = function (event) {
|
||||||
audioChunks.push(event.data);
|
audioChunks.push(event.data);
|
||||||
|
|
Ładowanie…
Reference in New Issue