View Source Kino.Video (Kino v0.14.0)
A kino for rendering a binary video.
Examples
content = File.read!("/path/to/video.mp4")
Kino.Video.new(content, :mp4)
content = File.read!("/path/to/video.mp4")
Kino.Video.new(content, :mp4, autoplay: true, loop: true)
Summary
Functions
Creates a new kino displaying the given binary video.
Types
@type common_video_type() :: :mp4 | :ogg | :avi | :mwv | :mov
@type mime_type() :: binary()
@type t() :: Kino.JS.Live.t()
Functions
@spec new(binary(), common_video_type() | mime_type(), list()) :: t()
Creates a new kino displaying the given binary video.
The given type can be either :mp4
, :ogg
, :avi
, :wmv
, :mov
or a string with video MIME type.
Options
:autoplay
- whether the video should start playing as soon as it is rendered. Defaults tofalse
:loop
- whether the video should loop. Defaults tofalse
:muted
- whether the video should be muted. Defaults tofalse