PhoenixKit.Modules.Publishing.Components.Video (phoenix_kit v1.7.33)

Copy Markdown View Source

Responsive YouTube embed component.

Supports both explicit video_id and full YouTube URLs. Optional attributes:

  • autoplay - "true" | "false" (default)

  • muted - "true" | "false" (default)

  • controls - "true" | "false" (default)

  • loop - "true" | "false" (default)

  • start - start time in seconds
  • ratio - aspect ratio string (e.g., "16:9", "4:3", "1:1") Component body text is rendered as a caption beneath the player.

Summary

Functions

render(assigns)

Attributes

  • attributes (:map) - Defaults to %{}.
  • variant (:string) - Defaults to "default".
  • content (:string) - Defaults to nil.