Skip to content

Commit

Permalink
backport autoplay
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Nov 12, 2024
1 parent b27177e commit ff770c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/animation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function Base.show(io::IO, ::MIME"text/html", agif::AnimatedGif)
"<img src=\"data:image/png;base64,$(base64encode(read(agif.filename)))\" />"
elseif ext in ("mov", "mp4", "webm")
mimetype = ext == "mov" ? "video/quicktime" : "video/$ext"
"<video controls><source src=\"data:$mimetype;base64,$(base64encode(read(agif.filename)))\" type = \"$mimetype\"></video>"
"<video autoplay controls><source src=\"data:$mimetype;base64,$(base64encode(read(agif.filename)))\" type = \"$mimetype\"></video>"
else
error("Cannot show animation with extension $ext: $agif")
end
Expand Down

0 comments on commit ff770c7

Please sign in to comment.