Add a notice when recording

This commit is contained in:
Pierre HUBERT 2020-04-13 19:07:12 +02:00
parent bc3bdeec05
commit 74a05fbdde
2 changed files with 30 additions and 0 deletions

View File

@ -64,6 +64,17 @@
color: inherit;
}
.call-window .head .record-label {
color: red;
margin-left: 10px;
}
.call-window .head .record-label a {
margin-left: 5px;
background-color: darkred !important;
font-weight: bold;
}
.call-window .members-area {
color: white;
font-size: 80%;

View File

@ -923,6 +923,22 @@ class CallWindow extends CustomEvents {
this.recorder = new MultiStreamRecorder(streams);
this.recorder.ondataavailable = onDataAvailable
this.recorder.start(30*60*1000); // Ask for save every 30min
// Add notice
this.recordLabel = createElem2({
appendTo: this.windowHead,
type: "span",
class: "record-label",
innerHTML: "Recording"
});
createElem2({
appendTo: this.recordLabel,
type: "a",
innerHTML: "STOP",
onclick: () => this.startRecording()
})
}
@ -930,6 +946,9 @@ class CallWindow extends CustomEvents {
else {
this.recorder.stop(onDataAvailable)
delete this.recorder
// Remove notice
this.recordLabel.remove()
}
}
}