import React from "react"; import { observer } from "mobx-react"; import type { IAppStore } from "instrument/window/history/history"; import { HistoryItem } from "instrument/window/history/item"; import { Icon } from "eez-studio-ui/icon"; import { HistoryItemInstrumentInfo } from "../HistoryItemInstrumentInfo"; import { formatDateTimeLong } from "eez-studio-shared/util"; import { RECORD_AUDIO_ICON, RECORD_VIDEO_ICON } from "project-editor/ui-components/icons"; import { formatBytes } from "eez-studio-shared/formatBytes"; import { MediaPlayer, PreventDraggable } from "../helper"; import { Toolbar } from "eez-studio-ui/toolbar"; //////////////////////////////////////////////////////////////////////////////// export const MediaHistoryItemComponent = observer( class MediaHistoryItemComponent extends React.Component< { appStore: IAppStore; historyItem: MediaHistoryItem; }, {} > { get data() { return this.props.historyItem.data as Uint8Array; } render() { const mimeType = this.props.historyItem.mediaHistoryItemMessage.mimeType; const isVideo = mimeType.startsWith("video"); return (