diff --git a/src/animation.jl b/src/animation.jl
index e4a213ce..63e001d0 100644
--- a/src/animation.jl
+++ b/src/animation.jl
@@ -104,15 +104,18 @@ end
# write out html to view the gif
function Base.show(io::IO, ::MIME"text/html", agif::AnimatedGif)
ext = file_extension(agif.filename)
- write(io, if ext == "gif"
- "
"
+ if ext == "gif"
+ html = "
"
elseif ext in ("mov", "mp4")
- ""
+ mimetype = ext == "mov" ? "video/quicktime" : "video/mp4"
+ html = ""
else
error("Cannot show animation with extension $ext: $agif")
- end)
+ end
+
+ write(io, html)
return nothing
end