audio/video embedded in HTML

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

audio/video embedded in HTML

ch007m
This post was updated on .
Hi,

Images are embedded (base64) by default in html generated but this is not the case for audio/video files

Example of code generated for image

- Asciidoc

image::images/lab-brms-1.png[width="45%"]

- Generated

<div class="imageblock">
<div class="content">
<img alt="lab brms 1" src="data:image/png;base64,iVBORw0KGgoAAAANS

<p></p>

And for audio

- Asciidoc

audio::audio/ocean_waves.mp3[options="autoplay,loop"]

- Generated

<div class="audioblock">
<div class="content">
<audio autoplay controls loop src="audio/ocean_waves.mp3">
Your browser does not support the audio tag.
</audio>
</div>

Is there a reason about that or simply code which has not been implemented ?

Remark/Question

- How base64 convertion takes place in ruby code as OI don't see it in html5.rb file ?
- The code is certainly buggy as Google Chrome supports audio tag but the code generated shows that this is not the case

Regards,

Charles
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: audio/video embedded in HTML

mojavelinux
Administrator
Can audio and video clips be embedded in HTML? I wasn't sure it was possible, mainly because I don't know if there is a size limit to the data: URI scheme. Anyone know? If it's perfectly legal, then by all means, we can implement it.

The conversion takes place behind the image_uri function, which is defined in abstract_node.rb. We'd just need to add the same logic to the media_uri function.

-Dan


On Mon, Nov 25, 2013 at 8:53 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

Images are embedded (base64) by default in html generated but this is not the case for audio/video files

Example of code generated for image

asciidoc

image::images/lab-brms-1.png[width="45%"]

generated

<div class="imageblock">
<div class="content">
<img alt="lab brms 1" src="data:image/png;base64,iVBORw0KGgoAAAANS... and for audio asciidoc audio::audio/ocean_waves.mp3[options="autoplay,loop"] generated <div class="audioblock">
<div class="content">
<audio autoplay controls loop src="audio/ocean_waves.mp3">
Your browser does not support the audio tag.
</audio>
</div>

Is there a reason about that or simply code which has not been implemented ?

Remark/Question

- How base64 convertion takes place in ruby code as OI don't see it in html5.rb file ?
- The code is certainly buggy as Google Chrome supports audio tag but the code generated shows that this is not the case

Regards,

Charles


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/audio-video-embedded-in-HTML-tp1089.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: audio/video embedded in HTML

ch007m
Embedding audio/video is supported since HTML5 even if the spec was not fully finalised (http://stackoverflow.com/questions/2270151/is-it-possible-to-use-data-uris-in-video-and-audio-tagshttp://html5media.info/) but there are limitations (codec, player, converter - http://www.htmlgoodies.com/html5/client/how-to-embed-video-using-html5.html#fbid=gFfsTLOk1ff). So I suggest that we add an attribute to enable/disable this option ? Make Sense ?


On Tue, Nov 26, 2013 at 3:06 AM, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Can audio and video clips be embedded in HTML? I wasn't sure it was possible, mainly because I don't know if there is a size limit to the data: URI scheme. Anyone know? If it's perfectly legal, then by all means, we can implement it.

The conversion takes place behind the image_uri function, which is defined in abstract_node.rb. We'd just need to add the same logic to the media_uri function.

-Dan


On Mon, Nov 25, 2013 at 8:53 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

Images are embedded (base64) by default in html generated but this is not the case for audio/video files

Example of code generated for image

asciidoc

image::images/lab-brms-1.png[width="45%"]

generated

<div class="imageblock">
<div class="content">
<img alt="lab brms 1" src="data:image/png;base64,iVBORw0KGgoAAAANS... and for audio asciidoc audio::audio/ocean_waves.mp3[options="autoplay,loop"] generated <div class="audioblock">
<div class="content">
<audio autoplay controls loop src="audio/ocean_waves.mp3">
Your browser does not support the audio tag.
</audio>
</div>

Is there a reason about that or simply code which has not been implemented ?

Remark/Question

- How base64 convertion takes place in ruby code as OI don't see it in html5.rb file ?
- The code is certainly buggy as Google Chrome supports audio tag but the code generated shows that this is not the case

Regards,

Charles


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/audio-video-embedded-in-HTML-tp1089.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/audio-video-embedded-in-HTML-tp1089p1093.html
To unsubscribe from audio/video embedded in HTML, click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard