Re: error code when insering a video using video tag
HiddenId <[email protected]> Sat, 5 Jan 2013 19:31:46 +0000 (GMT)
| Newsgroups | gmane.comp.web.amaya.general |
|---|---|
| Message-ID | <[email protected]> |
---970193273-1044145268-1357414306=:46521 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thank you Leif (I don't know if Leif is your surname or name, sorry for tha= t), for this additional information.=0AAntoine=0A=0A=0A=0A=0A______________= __________________=0A De=C2=A0: Leif Halvard Silli <xn--mlform-iua@m=C3=A5l= form.no>=0A=C3=80=C2=A0: laurent carcone <[email protected]> =0ACc= =C2=A0: HiddenId <[email protected]>; "[email protected]" <www-ama= [email protected]> =0AEnvoy=C3=A9 le : Samedi 5 janvier 2013 19h35=0AObjet=C2=A0: R= e: error code when insering a video using video tag=0A =0AThe most annoying= thing with Amaya - and the the most important =0Aprevention against using = it for HTML5 work =E2=80=94 is that it deletes =0Aelements that it doesn=E2= =80=99t know. =0A=0A#noteToSelf.=0A=0ALeif H Silli=0A=0A=0Alaurent carcone,= Sat, 05 Jan 2013 17:57:41 +0100:=0A> Hello,=0A> =0A> Amaya doesn't support= html5, it's why it raises an error on the =0A> element <video>.=0A> Unfort= unately, new developments on Amaya are stopped at W3C and =0A> Inria. I kno= w there is a project outside W3C to work on the HTML5 =0A> support, I'll le= t you know if I have some update.=0A> If you want to add a video in a html = page using Amaya, you can use =0A> the elements embed or object.=0A> =0A> T= hanks,=0A> Laurent=0A> =0A> Le 05/01/13 17:15, HiddenId a =C3=A9crit=C2=A0:= =0A>> Hello All.=0A>> Thanks a lot for your returns. =0A>> I've still quest= ions: is it better to stay in xhtml or move to html =0A>> code type, regard= ing results described bellow ?=0A>> Antoine=0A>> =0A>> Here is the code I'm= testing, including changes you told me:=0A>> =0A>> -----------------------= --------=0A>> 23 =C2=A0=C2=A0 <video width=3D"320" height=3D"240" controls= =3D"">=0A>> 24 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <source src=3D"proj.mp4= "=C2=A0 type=3D"video/mp4" />=0A>> 25 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = <source src=3D"proj.ogg"=C2=A0 type=3D"video/ogg" />=0A>> 26 =C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 <source src=3D"proj.webm" type=3D"video/webm" />= =0A>> 27 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <object data=3D"proj.mp4" wid= th=3D"320" height=3D"240">=0A>> 28 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 <embed src=3D"proj.swf" width=3D"320" height=3D"240">= =0A>> 29 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </object>=0A>> 30 =C2=A0=C2= =A0=C2=A0 </video>=0A>> 31 =C2=A0=C2=A0=C2=A0 <p><strong>Download Video:</s= trong>=0A>> 32 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Close= d Format:<a href=3D"proj.mp4">"mp4"</a>=0A>> 33 =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 Open Format:<a href=3D"proj.ogg">"ogg"</a>=0A>>= 34 =C2=A0=C2=A0 </p>=0A>> -----------------------------=0A>> =0A>> Then he= re are results concerning error alerts send back by Amaya:=0A>> =0A>> Test = 1: keeping XHTML code type (transitional 1.0)=0A>> ************************= *****************=0A>> =C2=A0=C2=A0=C2=A0=C2=A0 <!DOCTYPE html PUBLIC "-//W= 3C//DTD XHTML 1.0 Transitional//EN"=0A>> =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 = =C2=A0 =C2=A0 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">=0A= >> =0A>> Amaya returns following errors=0A>> =0A>> *** Errors/warnings in t= est.html=0A>> =C2=A0 line 23, char 0: Invalid or unsupported XHTML element = <video>=0A>> =C2=A0 line 24, char 0: Invalid or unsupported XHTML element <= source>=0A>> =C2=A0 line 25, char 0: Invalid or unsupported XHTML element <= source>=0A>> =C2=A0 line 26, char 0: Invalid or unsupported XHTML element <= source>=0A>> =C2=A0 line 29, char 2: mismatched tag=0A>> =0A>> Test 2: chan= ging to HTML code type:=0A>> ******************************=0A>> <!DOCTYPE = html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"=0A>> =C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 "http://www.w3.org/TR/html4/loose.dtd">=0A>> =0A>> Amaya do= es not return any error.=0A>> And Amaya modify the code, erasing the "layou= t" of the code (see bellow):=0A>> =0A>> <video width=3D320 height=3D240 con= trols><source src=3Dproj.mp4 type=3Dvideo/mp4=0A>> =C2=A0 /><source src=3Dp= roj.ogg type=3Dvideo/ogg /><source src=3Dproj.webm =0A>> type=3Dvideo/webm= =0A>> =C2=A0 /><object data=3D"proj.mp4" width=3D"320" height=3D"240">=0A>>= =C2=A0=C2=A0=C2=A0 <embed src=3D"proj.swf" width=3D"320" height=3D"240" />= </object> </video>=0A>> =0A>> =C2=A0 <p><strong>Download Video:</strong> Cl= osed Format:<a=0A>> =C2=A0 href=3D"proj.mp4">"mp4"</a> Open Format:<a href= =3D"proj.ogg">"ogg"</a> </p>=0A>> =0A>> Conclusion:=0A>> **********=0A>> XH= TML: still errors, and code is not changed by Amaya=0A>> HTML 4: no error, = but code layout is modified=0A>> =0A>> Then: what should I decide ?=0A>> = =0A>> =0A>> De=C2=A0: Leif Halvard Silli <xn--mlform-iua@m=C3=A5lform.no>= =0A>> =C3=80=C2=A0: HiddenId <[email protected]> =0A>> Cc=C2=A0: = "[email protected]" <[email protected]> =0A>> Envoy=C3=A9 le : Samedi 5 janvi= er 2013 15h46=0A>> Objet=C2=A0: Re: error code when insering a video using = video tag=0A>> =0A>> HiddenId, Fri, 4 Jan 2013 17:43:32 +0000 (GMT):=0A>> = =0A>>> I'm trying to insert a video in an HTML page.=0A>>> I've tried a w3s= chool code example :=0A>>> =0A>>> <video width=3D"320" height=3D"240" contr= ols>=0A>>> =C2=A0 <source src=3D"movie.mp4" type=3D"video/mp4">=0A>>> =C2= =A0 <source src=3D"movie.ogg" type=3D"video/ogg">=0A>>> =C2=A0 <source src= =3D"movie.webm" type=3D"video/webm">=0A>>> =C2=A0 <object data=3D"movie.mp4= " width=3D"320" height=3D"240">=0A>>> =C2=A0=C2=A0=C2=A0 <embed src=3D"movi= e.swf" width=3D"320" height=3D"240">=0A>>> =C2=A0 </object> =0A>>> </video>= =0A>> =0A>>> Unfortunatly, Amaya returns "an error code": invalid token=0A= >>> It seems it is the "s" of controls which generate the error.=0A>>> =0A>= >> Do you know what I should do to avoid this error ?=0A>> =0A>> Firstly, a= ssuming that you work with an XHTML document, then, instead =0A>> of contro= ls, you should write controls=3D"" or controls=3D"controls". Then =0A>> tha= t particular error message will disappear. This is because XML =0A>> requir= es boolean attributes to be of the shape foo=3D"foo" or foo=3D"". By =0A>> = contrast, HTML permits the author to type foo (the HTML browser will =0A>> = still think of it as foo=3D"", however).=0A>> =0A>> Secondly, the empty <so= urce/> elements must be equipped with a closing =0A>> "/", since that is th= e canonical form of empty elements in XHTML. =0A>> =0A>> All in all, this w= ould work:=0A>> =0A>> <video width=3D"320" height=3D"240" controls=3D"">=0A= >> =C2=A0 <source src=3D"movie.mp4" type=3D"video/mp4" />=0A>> =C2=A0 <sour= ce src=3D"movie.ogg" type=3D"video/ogg" />=0A>> =C2=A0 <source src=3D"movie= .webm" type=3D"video/webm" />=0A>> =C2=A0 <object data=3D"movie.mp4" width= =3D"320" height=3D"240">=0A>> =C2=A0=C2=A0=C2=A0 <embed src=3D"movie.swf" w= idth=3D"320" height=3D"240" />=0A>> =C2=A0 </object> =0A>> </video>=0A>> --= =0A>> leif halvard silli=0A>> =0A> ---970193273-1044145268-1357414306=:46521 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><body><div style=3D"color:#000; background-color:#fff; font-family:ti= mes new roman, new york, times, serif;font-size:12pt">Thank you Leif (I don= 't know if Leif is your surname or name, sorry for that), for this addition= al information.<br>Antoine<br><div><span></span></div><div><br></div> <div= style=3D"font-family: times new roman, new york, times, serif; font-size: = 12pt;"> <div style=3D"font-family: times new roman, new york, times, serif;= font-size: 12pt;"> <div dir=3D"ltr"> <font face=3D"Arial" size=3D"2"> <hr = size=3D"1"> <b><span style=3D"font-weight:bold;">De :</span></b> Leif= Halvard Silli <xn--mlform-iua@m=C3=A5lform.no><br> <b><span style=3D= "font-weight: bold;">=C3=80 :</span></b> laurent carcone <laurent.c= [email protected]> <br><b><span style=3D"font-weight: bold;">Cc :</s= pan></b> HiddenId <[email protected]>; "[email protected]" &= lt;[email protected]> <br> <b><span style=3D"font-weight: bold;">Envoy=C3= =A9 le :</span></b> Samedi 5 janvier 2013 19h35<br> <b><span style=3D"font-weight: bold;">Objet = :</span></b> Re: error code when insering a video using video tag<br> </fon= t> </div> <br>The most annoying thing with Amaya - and the the most importa= nt <br>prevention against using it for HTML5 work =E2=80=94 is that it dele= tes <br>elements that it doesn=E2=80=99t know. <br><br>#noteToSelf.<br><br>= Leif H Silli<br><br><br>laurent carcone, Sat, 05 Jan 2013 17:57:41 +0100:<b= r>> Hello,<br>> <br>> Amaya doesn't support html5, it's why it rai= ses an error on the <br>> element <video>.<br>> Unfortunately, = new developments on Amaya are stopped at W3C and <br>> Inria. I know the= re is a project outside W3C to work on the HTML5 <br>> support, I'll let= you know if I have some update.<br>> If you want to add a video in a ht= ml page using Amaya, you can use <br>> the elements embed or object.<br>= > <br>> Thanks,<br>> Laurent<br>> <br>> Le 05/01/13 17:15, H= iddenId a =C3=A9crit :<br>>> Hello All.<br>>> Thanks a lot for yo= ur returns. <br>>> I've still questions: is it better to stay in xhtm= l or move to html <br>>> code type, regarding results described bello= w ?<br>>> Antoine<br>>> <br>>> Here is the code I'm testi= ng, including changes you told me:<br>>> <br>>> ---------------= ----------------<br>>> 23 <video width=3D"320" height= =3D"240" controls=3D""><br>>> 24 &nb= sp; <source src=3D"proj.mp4" type=3D"video/mp4" /><br>>> = 25 <source src=3D"proj.ogg" t= ype=3D"video/ogg" /><br>>> 26 = <source src=3D"proj.webm" type=3D"video/webm" /><br>>> 27 &nbs= p; <object data=3D"proj.mp4" width=3D"320"= height=3D"240"><br>>> 28 &nbs= p; <embed src=3D"proj.swf" width=3D"320" height=3D"240"><br>>> 29= </object><br>>> 30 = </video><br>>> 31 <p><= strong>Download Video:</strong><br>>> 32 &= nbsp; Closed Format:<a href=3D"proj.mp4"&g= t;"mp4"</a><br>>> 33 = Open Format:<a href=3D"proj.ogg">"ogg"</a><br>>= > 34 </p><br>>> -----------------------------<b= r>>> <br>>> Then here are results concerning error alerts send = back by Amaya:<br>>> <br>>> Test 1: keeping XHTML code type (tr= ansitional 1.0)<br>>> *****************************************<br>&g= t;> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML= 1.0 Transitional//EN"<br>>> "<a href=3D"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd= " target=3D"_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd= </a>"><br>>> <br>>> Amaya returns following errors<br>>&g= t; <br>>> *** Errors/warnings in test.html<br>>> line 23= , char 0: Invalid or unsupported XHTML element <video><br>>> &n= bsp; line 24, char 0: Invalid or unsupported XHTML element <source><b= r>>> line 25, char 0: Invalid or unsupported XHTML element <= ;source><br>>> line 26, char 0: Invalid or unsupported XHTM= L element <source><br>>> line 29, char 2: mismatched tag= <br>>> <br>>> Test 2: changing to HTML code type:<br>>> *= *****************************<br>>> <!DOCTYPE html PUBLIC "-//W3C/= /DTD HTML 4.01 Transitional//EN"<br>>> = "<a href=3D"http://www.w3.org/TR/html4/loose.dtd" target=3D"_blank">http://www.w3.org/TR/html4/loose.dtd</a>"><br>>>= ; <br>>> Amaya does not return any error.<br>>> And Amaya modif= y the code, erasing the "layout" of the code (see bellow):<br>>> <br>= >> <video width=3D320 height=3D240 controls><source src=3Dpr= oj.mp4 type=3Dvideo/mp4<br>>> /><source src=3Dproj.ogg t= ype=3Dvideo/ogg /><source src=3Dproj.webm <br>>> type=3Dvideo/w= ebm<br>>> /><object data=3D"proj.mp4" width=3D"320" heig= ht=3D"240"><br>>> <embed src=3D"proj.swf" wi= dth=3D"320" height=3D"240" /></object> </video><br>>> = <br>>> <p><strong>Download Video:</strong> C= losed Format:<a<br>>> href=3D"proj.mp4">"mp4"</a> = Open Format:<a href=3D"proj.ogg">"ogg"</a> </p><br>>&g= t; <br>>> Conclusion:<br>>> **********<br>>> XHTML: still= errors, and code is not changed by Amaya<br>>> HTML 4: no error, but code layout is modified= <br>>> <br>>> Then: what should I decide ?<br>>> <br>>= > <br>>> De : Leif Halvard Silli <xn--mlform-iua@m=C3=A5lf= orm.no><br>>> =C3=80 : HiddenId <<a ymailto=3D"mailto:cour= [email protected]" href=3D"mailto:[email protected]">courri= [email protected]</a>> <br>>> Cc : "<a ymailto=3D"mailto:= [email protected]" href=3D"mailto:[email protected]">[email protected]</a>" &l= t;<a ymailto=3D"mailto:[email protected]" href=3D"mailto:[email protected]">w= [email protected]</a>> <br>>> Envoy=C3=A9 le : Samedi 5 janvier 2013= 15h46<br>>> Objet : Re: error code when insering a video using = video tag<br>>> <br>>> HiddenId, Fri, 4 Jan 2013 17:43:32 +0000= (GMT):<br>>> <br>>>> I'm trying to insert a video in an HTM= L page.<br>>>> I've tried a w3school code example :<br>>>>= ; <br>>>> <video width=3D"320" height=3D"240" controls><br>&g= t;>> <source src=3D"movie.mp4" type=3D"video/mp4"><br>&g= t;>> <source src=3D"movie.ogg" type=3D"video/ogg"><br>&g= t;>> <source src=3D"movie.webm" type=3D"video/webm"><br>= >>> <object data=3D"movie.mp4" width=3D"320" height=3D"2= 40"><br>>>> <embed src=3D"movie.swf" widt= h=3D"320" height=3D"240"><br>>>> </object> <br>>= ;>> </video> <br>>> <br>>>> Unfortunatly, Amaya = returns "an error code": invalid token<br>>>> It seems it is the "= s" of controls which generate the error.<br>>>> <br>>>> D= o you know what I should do to avoid this error ?<br>>> <br>>> = Firstly, assuming that you work with an XHTML document, then, instead <br>&= gt;> of controls, you should write controls=3D"" or controls=3D"controls= ". Then <br>>> that particular error message will disappear. This is because XML <br>>> = requires boolean attributes to be of the shape foo=3D"foo" or foo=3D"". By = <br>>> contrast, HTML permits the author to type foo (the HTML browse= r will <br>>> still think of it as foo=3D"", however).<br>>> <b= r>>> Secondly, the empty <source/> elements must be equipped wi= th a closing <br>>> "/", since that is the canonical form of empty el= ements in XHTML. <br>>> <br>>> All in all, this would work:<br>= >> <br>>> <video width=3D"320" height=3D"240" controls=3D""&= gt;<br>>> <source src=3D"movie.mp4" type=3D"video/mp4" />= ;<br>>> <source src=3D"movie.ogg" type=3D"video/ogg" /><= br>>> <source src=3D"movie.webm" type=3D"video/webm" /><= br>>> <object data=3D"movie.mp4" width=3D"320" height=3D"24= 0"><br>>> <embed src=3D"movie.swf" width=3D"= 320" height=3D"240" /><br>>> </object> <br>>> </video><br>&g= t;> -- <br>>> leif halvard silli<br>>> <br>> <br><br> </d= iv> </div> </div></body></html> ---970193273-1044145268-1357414306=:46521--