On Thu, Feb 21, 2013 at 4:31 PM, petter <[email protected]> wrote:
> > > On Friday, February 22, 2013 12:34:53 AM UTC+1, Scott L. Burson wrote: > >> 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 :-) >> > > Thanks, but it didn't change the behavior. > >> >> 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 >> > > I suspect that is what might be happening. Like I said saving the HTML and > opening it in the browser works. > > >> specified HTTP, as in "http://pub/images/video.mp4", it would override >> the browser's default >> > > If I do this it will not show the video. Only a black box with the > controls. If I open up the files directly in the browser it will work so it > seems like it's related to the way Hunchentoot is serving the video. > Oops -- stupid mistake on my part -- you either have to put in a hostname, as in "http://localhost/pub/images/video.mp4", or not use a double slash, as in "http:/pub/images/video.mp4". I'm not 100% sure the latter works, but I think it should. -- 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.
