html5 - Using <video> with <source>, where do you add the crossorigin attribute? -
when using <video>
tag alone, 1 adds crossorigin attribute so:
<video src="blah" crossorigin="anonymous"></video>
however, i've had trouble finding out correct placement of 'crossorigin' when using multiple video sources, example:
<video> <source src="/somesource.mp4"> <source src="/somesource.webm"> </video>
do put 'crossorigin' attribute on <video>
tag or individual <source>
tags?
if later, mean each source can have individual crossorigin handling within 1 video tag?
do put 'crossorigin' attribute on tag or individual tags?
the w3c specs specify crossorigin attribute on video tag (or more precisely htmlmediaelement) not on src element (or again more precisely, htmlsourceelement).
so, assuming follows specs, rash assumption - see margus's answer exmple, should put cross origin attribute on video tag rather individual source tags.
Comments
Post a Comment