mirror of https://github.com/OpenVidu/openvidu.git
openvidu-testapp: invert Speech To Text icons
parent
ce869588ec
commit
7f9b879d45
|
@ -69,7 +69,7 @@ export class VideoComponent implements OnInit, OnDestroy {
|
||||||
pubSubAudioIcon = 'mic';
|
pubSubAudioIcon = 'mic';
|
||||||
recordIcon = 'fiber_manual_record';
|
recordIcon = 'fiber_manual_record';
|
||||||
pauseRecordIcon = '';
|
pauseRecordIcon = '';
|
||||||
captionIcon = 'closed_caption';
|
captionIcon = 'closed_caption_disabled';
|
||||||
|
|
||||||
// Stats
|
// Stats
|
||||||
usedVideoCodec: string;
|
usedVideoCodec: string;
|
||||||
|
@ -187,7 +187,7 @@ export class VideoComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
this.pubSubVideoIcon = 'videocam';
|
this.pubSubVideoIcon = 'videocam';
|
||||||
this.pubSubAudioIcon = 'mic';
|
this.pubSubAudioIcon = 'mic';
|
||||||
this.captionIcon = 'closed_caption';
|
this.captionIcon = 'closed_caption_disabled';
|
||||||
this.recordIcon = 'fiber_manual_record';
|
this.recordIcon = 'fiber_manual_record';
|
||||||
this.pauseRecordIcon = '';
|
this.pauseRecordIcon = '';
|
||||||
this.pubSubIcon = 'stop';
|
this.pubSubIcon = 'stop';
|
||||||
|
@ -338,12 +338,12 @@ export class VideoComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
async speechToText() {
|
async speechToText() {
|
||||||
if (this.captionIcon === 'closed_caption') {
|
if (this.captionIcon === 'closed_caption_disabled') {
|
||||||
await this.streamManager.stream.session.subscribeToSpeechToText(this.streamManager.stream, 'en-US');
|
await this.streamManager.stream.session.subscribeToSpeechToText(this.streamManager.stream, 'en-US');
|
||||||
} else {
|
} else {
|
||||||
await this.streamManager.stream.session.unsubscribeFromSpeechToText(this.streamManager.stream);
|
await this.streamManager.stream.session.unsubscribeFromSpeechToText(this.streamManager.stream);
|
||||||
}
|
}
|
||||||
this.captionIcon = this.captionIcon === 'closed_caption' ? 'closed_caption_disabled' : 'closed_caption';
|
this.captionIcon = this.captionIcon === 'closed_caption_disabled' ? 'closed_caption' : 'closed_caption_disabled';
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSubscriberEvents(oldValues) {
|
updateSubscriberEvents(oldValues) {
|
||||||
|
|
Loading…
Reference in New Issue