Back to API Reference
Struct
MediaContent
sealed
Media offered to a MediaReceived hook — from a clipboard paste, a drag-and-drop, or a picker (see Source), before the text-adapter pipeline runs. A handler probes the formats it cares about — image blobs via GetData, files via GetFiles / ReadFile — and sets Handled to consume it; left unhandled, a paste falls through to the normal text channels. MediaInputBehavior is the inherit-and-override entry point.
public UniTextEditable Editable{ get }The editor the media is going into.
public MediaSource Source{ get }Whether this arrived by paste, drop, or picker.
public Task<byte[]> ReadFileAsync()Async variant of ReadFile — the right call for anything that can be large (video, archives): the file IO runs off the main thread. Resolves to if unreadable.
