No edit summary |
No edit summary |
||
| Line 17: | Line 17: | ||
<source src="/images/cold-slither.mp4 type="video/mp4"> | <source src="/images/cold-slither.mp4 type="video/mp4"> | ||
</video> | </video> | ||
<script> | |||
// Create a <video> element | |||
var videoElement = document.createElement('video'); | |||
// Set attributes for the <video> element | |||
videoElement.setAttribute('class', 'video-js'); | |||
videoElement.setAttribute('autoplay', ''); | |||
videoElement.style.maxWidth = '75%'; | |||
// Create a <source> element for the video | |||
var sourceElement = document.createElement('source'); | |||
sourceElement.setAttribute('src', '/images/cold-slither.mp4'); | |||
sourceElement.setAttribute('type', 'video/mp4'); | |||
// Append the <source> element to the <video> element | |||
videoElement.appendChild(sourceElement); | |||
// Append the <video> element to the <p> element with id "video-container" | |||
document.getElementById('video-container').appendChild(videoElement); | |||
</script> | |||
Revision as of 20:44, 22 March 2024
Cold Slither [related:
gi-joe
]
<video autoplay="" src="https://prismic-io.s3.amazonaws.com/eternal-september/17aaa6ae-d6d3-4c31-a255-51ffc98fdd24_Cold+Slither+Recompressed.mp4" style="max-width: 75%;">
</video>
<video class="video-js">
<source src="/images/cold-slither.mp4 type="video/mp4">
</video>
<script>
// Create a <video> element var videoElement = document.createElement('video');
// Set attributes for the <video> element videoElement.setAttribute('class', 'video-js'); videoElement.setAttribute('autoplay', ); videoElement.style.maxWidth = '75%';
// Create a <source> element for the video var sourceElement = document.createElement('source'); sourceElement.setAttribute('src', '/images/cold-slither.mp4'); sourceElement.setAttribute('type', 'video/mp4');
// Append the <source> element to the <video> element videoElement.appendChild(sourceElement);
// Append the <video> element to the
element with id "video-container" document.getElementById('video-container').appendChild(videoElement); </script>
