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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -