OPUS сборка
This commit is contained in:
@@ -114,8 +114,6 @@ export function MessageVoice(props: AttachmentProps) {
|
||||
totalDuration,
|
||||
currentMessageId,
|
||||
} = usePlayerContext();
|
||||
|
||||
// Важно: состояние "активности" теперь берется из глобального плеера
|
||||
const messageId = String((props.parent as any)?.id ?? (props.attachment as any)?.messageId ?? props.attachment.id);
|
||||
const isCurrentTrack = currentMessageId === messageId;
|
||||
|
||||
@@ -123,7 +121,7 @@ export function MessageVoice(props: AttachmentProps) {
|
||||
const safeCurrent = isCurrentTrack ? currentDuration : 0;
|
||||
const playbackProgress = Math.max(0, Math.min(1, safeCurrent / fullDuration));
|
||||
|
||||
const createAudioBlob = () => new Blob([Buffer.from(props.attachment.blob, "binary")], { type: "audio/webm" });
|
||||
const createAudioBlob = () => new Blob([Buffer.from(props.attachment.blob, "binary")], { type: "audio/webm;codecs=opus" });
|
||||
|
||||
const ensureStarted = (seekToSec?: number) => {
|
||||
const blob = createAudioBlob();
|
||||
@@ -204,7 +202,7 @@ export function MessageVoice(props: AttachmentProps) {
|
||||
|
||||
{downloadStatus !== DownloadStatus.DOWNLOADED && <IconArrowDown color="white" size={22} />}
|
||||
|
||||
{downloadStatus === DownloadStatus.DOWNLOADED &&
|
||||
{downloadStatus === DownloadStatus.DOWNLOADED && !isUploading &&
|
||||
(isCurrentTrack && playing ? (
|
||||
<IconPlayerPauseFilled color="white" size={22} />
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user