Re: [elinks-dev] Rudimentary support for HTML5 media elements

2010-08-07 Thread Simon Ruderich
On Sun, Oct 25, 2009 at 10:46:26AM +0100, Nils Dagsson Moskopp wrote:
 Hello elinks developers,

 recently I have patched  elinks to recognize audio and video
 elements. Details can be found here:
 http://blog.dieweltistgarnichtso.net/html5-media-elements-in-elinks.

 Is someone going to merge this into mainline ?
 Also, can someone help with parsing for the source element ?

 Cheers
 Nils Dagsson Moskopp // erlehmann

Hello,

I'm no elinks developer (just a user) - but this sounds useful.
Could you please post the patch, I didn't find it on your web
page.

Thanks,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9


pgpTaO8H3Wb5A.pgp
Description: PGP signature
___
elinks-dev mailing list
elinks-dev@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-dev


Re: [elinks-dev] Rudimentary support for HTML5 media elements

2010-08-07 Thread Nils Dagsson Moskopp
Simon Ruderich si...@ruderich.org schrieb am Sat, 7 Aug 2010 17:56:08
+0200:

 I'm no elinks developer (just a user) - but this sounds useful.

I am afraid there are no elinks developers anymore. Or maybe there is a
different mailing list.

 Could you please post the patch, I didn't find it on your web
 page.

There is no patch, only a full archive. But it should be easy to diff
against elinks-0.12~pre5.
http://daten.dieweltistgarnichtso.net/src/elinks-0.12~pre5-html5-media.tar.gz

Be aware that there is no parsing for the source element. Since that
element is used almost universally (because Apple refuses to implement
open standards like Theora, VP8 and Vorbis), you will probably need to
add it.


Cheers,
-- 
Nils Dagsson Moskopp // erlehmann
http://dieweltistgarnichtso.net


signature.asc
Description: PGP signature
___
elinks-dev mailing list
elinks-dev@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-dev


Re: [elinks-dev] Rudimentary support for HTML5 media elements

2010-08-07 Thread أحمد المحمودي
On Sat, Aug 07, 2010 at 09:04:36PM +0300, Timo Juhani Lindfors wrote:
 Here too, you should use git so that people don't need to download 7
 megabytes to see your changes :-)
---end quoted text---

-- 
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8  B176 BC19 6A94 EDDD A1B7
Description: Make use of the HTML5 media elements
 A link is inserted, that, when activated (via enter key or mouse click), gives
 you a choice between downloading the file to disk or viewing it in your
 favorite media player (probably with AAlib output enabled)
Origin: http://blog.dieweltistgarnichtso.net/html5-media-elements-in-elinks
Forwarded: yes
Author: Nils Dagsson Moskopp n...@dieweltistgarnichtso.net
--- a/src/document/html/parser/link.c
+++ b/src/document/html/parser/link.c
@@ -407,6 +407,27 @@
 	mem_free(code);
 }
 
+void
+html_audio(struct html_context *html_context, unsigned char *a,
+unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5)
+{
+	unsigned char *url;
+
+	/* This just places a link where a audio element would be. */
+
+	url = get_url_val(a, src, html_context-doc_cp);
+	if (!url) return;
+
+	html_focusable(html_context, a);
+
+	put_link_line(Audio: , basename(url), url,
+  html_context-options-framename, html_context);
+
+	html_skip(html_context, a);
+
+	mem_free(url);
+}
+
 static void
 html_iframe_do(unsigned char *a, unsigned char *object_src,
struct html_context *html_context)
@@ -530,7 +551,26 @@
 	mem_free_set(object_src, NULL);
 }
 
+void
+html_video(struct html_context *html_context, unsigned char *a,
+unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5)
+{
+	unsigned char *url;
+
+	/* This just places a link where a video element would be. */
+
+	url = get_url_val(a, src, html_context-doc_cp);
+	if (!url) return;
 
+	html_focusable(html_context, a);
+
+	put_link_line(Video: , basename(url), url,
+  html_context-options-framename, html_context);
+
+	html_skip(html_context, a);
+
+	mem_free(url);
+}
 
 /* Link types:
 
--- a/src/document/html/parser/link.h
+++ b/src/document/html/parser/link.h
@@ -14,6 +14,8 @@
 element_handler_T html_img;
 element_handler_T html_link;
 element_handler_T html_object;
+element_handler_T html_audio;
+element_handler_T html_video;
 element_handler_T html_embed;
 
 #endif
--- a/src/document/html/parser/parse.c
+++ b/src/document/html/parser/parse.c
@@ -429,6 +429,7 @@
  {ABBR,html_italic,  NULL, 0, ET_NESTABLE},
  {ADDRESS, html_address, NULL, 2, ET_NESTABLE},
  {APPLET,  html_applet,  NULL, 1, ET_NON_PAIRABLE},
+ {AUDIO,   html_audio,   NULL, 1, ET_NON_PAIRABLE},
  {B,   html_bold,NULL, 0, ET_NESTABLE},
  {BASE,html_base,NULL, 0, ET_NON_PAIRABLE},
  {BASEFONT,html_font,NULL, 0, ET_NON_PAIRABLE},
@@ -496,6 +497,7 @@
  {TT,  html_tt,  NULL, 0, ET_NON_NESTABLE},
  {U,   html_underline,   NULL, 0, ET_NESTABLE},
  {UL,  html_ul,  NULL, 2, ET_NESTABLE},
+ {VIDEO,   html_video,   NULL, 1, ET_NON_PAIRABLE},
  {XMP, html_xmp, html_xmp_close,   2, ET_NESTABLE},
  {NULL,  NULL, NULL, 0, ET_NESTABLE},
 };


signature.asc
Description: Digital signature
___
elinks-dev mailing list
elinks-dev@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-dev