fix html output of video animations

This commit is contained in:
Daniel Schwabeneder 2019-10-11 12:52:38 +02:00
parent 4f705a6e58
commit 926a023b1d

View File

@ -104,7 +104,7 @@ function Base.show(io::IO, ::MIME"text/html", agif::AnimatedGif)
write(io, if ext == "gif" write(io, if ext == "gif"
"<img src=\"$(relpath(agif.filename))\" />" "<img src=\"$(relpath(agif.filename))\" />"
elseif ext in ("mov", "mp4") elseif ext in ("mov", "mp4")
"<video controls><source src=\"$(relpath(agif.filename)) type=\"video/$ext\"></video>" "<video controls><source src=\"$(relpath(agif.filename))\" type=\"video/$ext\"></video>"
else else
error("Cannot show animation with extension $ext: $agif") error("Cannot show animation with extension $ext: $agif")
end) end)