HTML <video> crossorigin Attribute
The HTML crossorigin attribute is used in the <video> element that supports a CORS request when we tried to fetch out the video files from the third-party servers or from another domain.
<video crossorigin="anonymous | use-credentials">
- anonymous: It has a default value. It defines a CORS request that will be sent without passing the credentials information.
- use-credentials: A cross-origin request will be sent with credentials, cookies, and certificate.
Example: Below code illustrates the use of crossorigin attribute in the <video> element. It is set to “anonymous” value which retrieved the audio files without passing credentials information.
- Google Chrome 30.0
- Firefox 13.0
- Internet Explorer 18.0
- Opera 12.0
- Safari 1.0