The two plain Hunchentooth handlers below seem work to play video at url
http://www:4242/html and http://www:4242/video?ext=mp4 (or ext=webm or
ext=ogv) and I put the files under Hunchentooths root.
(hunchentoot:define-easy-handler (fun-video :uri "/video") (ext)
(let* ((ext (or ext "mp4"))
(vtype (cadr (assoc ext '(("mp4" "mp4") ("webm" "webm") ("ogv"
"ogg")) :test #'equal))))
(setf (hunchentoot:content-type*) (concatenate 'string "video/" vtype))
(copy-file
(make-pathname :directory '(:absolute "tmp") :name "gizmo" :type ext)
(hunchentoot:send-headers))))
(hunchentoot:define-easy-handler (fun-text :uri "/html") ()
(setf (hunchentoot:content-type*) "text/html")
(cl-who:with-html-output (*standard-output* nil :prologue t)
(:html
(:body
(:video
(:source :src "/tmp/gizmo.mp4" :type "video/mp4")
(:source :src "/tmp/gizmo.webm" :type "video/webm")
(:source :src "/tmp/gizmo.ogv" :type "video/ogg"))))))
However, in Weblocks I get some kind of crash:
[2013-02-22 18:13:15 [ERROR]] Couldn't write to #<SB-SYS:FD-STREAM
for "socket
172.30.30.252:8080
, peer: 172.30.30.252:37767"
{1002D20003}>:
Connection reset by peer
0: (SB-DEBUG::MAP-BACKTRACE
#<CLOSURE (LAMBDA # :IN BACKTRACE) {10060CAC4B}>
:START
0
:COUNT
4611686018427387903)
Seem to be a pretty big number... Need to debug this further.
The files I've used for testing can be downloaded from:
http://www.808.dk/pics/video/gizmo.mp4
http://www.808.dk/pics/video/gizmo.webm
http://www.808.dk/pics/video/gizmo.ogv
--
You received this message because you are subscribed to the Google Groups
"weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/weblocks?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.