Slackblocks.Blocks.Video (slackblocks v2.8.0)
View SourceAn embedded video player.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/video-block
Fields
alt_text— Sets a plain-text summary of the image or video for assistive technology. Required.thumbnail_url— Sets the URL of the image shown before the video plays. Required.title— Sets the video title. Required.video_url— Sets the embeddable URL of the video. The domain must be listed in the app's unfurl domains. Required.block_id— Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again. Optional;nilomits the field.author_name— Sets the name of the video's author. Optional;nilomits the field.description— Sets the video description. Optional;nilomits the field.provider_icon_url— Sets the URL of the video provider's icon. Optional;nilomits the field.provider_name— Sets the name of the video provider, such as YouTube. Optional;nilomits the field.title_url— Sets the HTTPS URL opened when the title is clicked. Optional;nilomits the field.
Summary
Functions
Atomically replaces supplied fields; omitted fields retain their values.
Replaces fields or raises Slackblocks.ValidationError.
Constructs and validates a value. Text conveniences apply to keyword input.
Constructs a value or raises Slackblocks.ValidationError.
Types
@type t() :: %Slackblocks.Blocks.Video{ alt_text: binary(), author_name: binary() | nil, block_id: binary() | nil, description: Slackblocks.Objects.PlainText.t() | nil, provider_icon_url: binary() | nil, provider_name: binary() | nil, thumbnail_url: binary(), title: Slackblocks.Objects.PlainText.t(), title_url: binary() | nil, video_url: binary() }
Functions
@spec change( t(), keyword() ) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
Atomically replaces supplied fields; omitted fields retain their values.
Replaces fields or raises Slackblocks.ValidationError.
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
Constructs and validates a value. Text conveniences apply to keyword input.
Constructs a value or raises Slackblocks.ValidationError.