mirror of
https://github.com/TangSengDaoDao/TangSengDaoDaoWeb
synced 2025-06-04 08:08:44 +00:00
fix: voice cell crash
This commit is contained in:
parent
b3d4aabaa5
commit
9c0c9f90f0
@ -69,7 +69,9 @@ export class VoiceCell extends MessageCell<any,VoiceCellState> {
|
||||
this.timeRef = React.createRef()
|
||||
const { message } = props
|
||||
this.content = message.content
|
||||
this.waveform = Uint8Array.from(Buffer.from(this.content.waveform, "base64"))
|
||||
if(this.content.waveform && this.content.waveform.length>0) {
|
||||
this.waveform = new Uint8Array(atob(this.content.waveform).split('').map(char => char.charCodeAt(0)));
|
||||
}
|
||||
this.timeFormat = this.formatSecond(this.content.timeTrad)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user