On Thu, Feb 21, 2013 at 1:34 PM, petter <[email protected]> wrote:

> I tried the following snippet to generate an embedded video:
>
> (defun init-user-session (comp)
>   (setf (cl-who:html-mode) :html5)
>   (setf (composite-widgets comp)
>         (make-widget
>          (lambda (&rest args)
>            (declare (ignore args))
>            (with-html
>              (:body
>               (:html
>                (:body
>                 (:p "video test")
>                 ;; I would expect :controls t to return controls, but it
> returns controls='controls'
>                 (:video :width 320 :height 240 :controls nil
>                         (:source :src "/pub/images/video.mp4" :type
> "video/mp4")
>                         (:source :src "/pub/images/video.ogg" :type
> "video/ogg")
>                         (:source :src "/pub/images/video.webm" :type
> "video/webm")
>                         (:object :data "/pub/images/video.webm" :widht 320
> :height 240
>                                  (:embed :src "/pub/images/video.swf"
> :widht 320 :height 240)))))))))))
>
> But it does not work. All I get is a black box. Also, if I right click on
> the black box in Chromium I can save the video (webm) which I can play
> using mplayer. If I save the generated HTML to a file, remove
> "/pub/images/" and put the video files in the same directory I can open up
> the file and view the video i Chromium.
>

As for the "controls='controls'" thing, that is done on boolean attributes
for XHTML compatibility.  I suppose it could be turned off for HTML5, but
I'm fairly sure it doesn't cause any problems.

Also, you misspelled "width" twice :-)

I've never tried to do this, so I'm just guessing, but is it possible that
the browser is trying to use some streaming protocol that Hunchentoot
doesn't support?  I would use Wireshark to see exactly what the browser is
sending.  -- Maybe if you specified HTTP, as in "http://pub/images/video.mp4";,
it would override the browser's default.

-- Scott

-- 
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.


Reply via email to