Replace console.warn with logger.warn
Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
parent
5e73a212f4
commit
5290afcc4c
71 changed files with 195 additions and 127 deletions
|
@ -157,7 +157,7 @@ export class Playback extends EventEmitter implements IDestroyable {
|
|||
// This error handler is largely for Safari as well, which doesn't support Opus/Ogg
|
||||
// very well.
|
||||
logger.error("Error decoding recording: ", e);
|
||||
console.warn("Trying to re-encode to WAV instead...");
|
||||
logger.warn("Trying to re-encode to WAV instead...");
|
||||
|
||||
const wav = await decodeOgg(this.buf);
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@ import { isVoiceMessage } from "../utils/EventUtils";
|
|||
import RoomViewStore from "../stores/RoomViewStore";
|
||||
import { EventType } from "matrix-js-sdk/src/@types/event";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
/**
|
||||
* Audio playback queue management for a given room. This keeps track of where the user
|
||||
* was at for each playback, what order the playbacks were played in, and triggers subsequent
|
||||
|
@ -114,7 +116,7 @@ export class PlaybackQueue {
|
|||
if (next) {
|
||||
const instance = this.playbacks.get(next);
|
||||
if (!instance) {
|
||||
console.warn(
|
||||
logger.warn(
|
||||
"Voice message queue desync: Missing playback for next message: "
|
||||
+ `Current=${this.currentPlaybackId} Last=${last} Next=${next}`,
|
||||
);
|
||||
|
@ -173,7 +175,7 @@ export class PlaybackQueue {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
console.warn(
|
||||
logger.warn(
|
||||
"Voice message queue desync: Expected playback stop to be last in order. "
|
||||
+ `Current=${this.currentPlaybackId} Last=${last} EventID=${mxEvent.getId()}`,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue