Embedded video with MIME-based extension detection.
Videos are embedded with a poster frame image and timing XML for playback control within the slide.
Summary
Functions
Maps a MIME type string to a file extension.
Returns the OPC partname for the video media file.
Creates a new video from binary data with position and size.
Generates the <p:pic> XML for the video shape on a slide.
Returns the OPC partname for the poster frame image.
Generates the timing XML for video playback in the slide's <p:timing> element.
Types
@type t() :: %Podium.Video{ binary: binary(), extension: String.t(), height: non_neg_integer(), media_index: pos_integer() | nil, mime_type: String.t(), poster_frame: map(), sha1: String.t(), width: non_neg_integer(), x: non_neg_integer(), y: non_neg_integer() }
Functions
Maps a MIME type string to a file extension.
Returns the OPC partname for the video media file.
Creates a new video from binary data with position and size.
Options (required)
:x,:y,:width,:height- position and size
Options (optional)
:mime_type- MIME type string (default"video/unknown"):poster_frame- poster frame image binary (default: 1x1 transparent PNG)
Generates the <p:pic> XML for the video shape on a slide.
Returns the OPC partname for the poster frame image.
@spec video_timing_xml(pos_integer(), pos_integer()) :: String.t()
Generates the timing XML for video playback in the slide's <p:timing> element.