четверг, 21 февраля 2013 г., 23:34:13 UTC+2 пользователь petter написал: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.Have you seen working example ? Does similar code works on other platforms (under apache or nginx) ?
You can put working html example into /pub/ directory and open it in browser. The next step would be to serve this html from
On Thu, Feb 21, 2013 at 1:34 PM, petter <petter...@gmail.com> 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
-- Scott
http://www-local:8080/pub/images/weblocks-alien-small.png I get the weblocks alienhttp://www-local:8080/pub/images/movie.mp4 I get a video player interface with black content which does not respond when I hit the play buttonhttp://techslides.com/demos/sample-videos/small.mp4 I get the same player interface with video contentIf I download small.mp4 and put it into the images directory and tryhttp://www-local:8080/pub/images/small.mp4 I get a video player interface with black content which does not respond when I hit the play button