Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html video

<video width="320" height="240" controls>
  <source src="your_video's_name.mp4" type="video/mp4">
  Error Message
</video>

<!-- i copied w3schools code lol-->
Comment

html 5 video

<video width="480" height="320" controls>
	// all browsers support mp4
  <source src="your_video_file_name.mp4" type="video/mp4">
   // safari doesn't support ogg
  <source src="your_video_file_name.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
Comment

html video

<div id='home-video' class="dl-neon-vid"><center>
    <video playsinline loop muted autoplay width="100%">
                <source src="video-link"  />
            </video></center>
    </div>

  <!-- script to pause ALL VIDEOS ON THE HOME PAGE when out of viewport -->

<script>
    let options = {
        root: null,
        rootMargin:'0px',
        threshold:1.0
    };
    let callback = (entries, observer)=>{
        entries.forEach(entry => {
            if(entry.target.id == 'home-video')
            {
                if(entry.isIntersecting){
                    entry.target.play();
                }
                else{
                    entry.target.pause();
                }
            }
        });
    }
let observer = new IntersectionObserver(callback, options);
observer.observe(document.querySelector('#home-video'));

</script>
Comment

html video

<video> 
  <source src="path_to_your_video_file.mp4" type="video/mp4"> 
</video> 
Comment

PREVIOUS NEXT
Code Example
Html :: disable autocomplete 
Html :: how to make a div stick to bottom of page bootstrap 
Html :: html csrf token input 
Html :: ionic ngfor object 
Html :: select empty option 
Html :: change icon on button click 
Html :: html <footer element 
Html :: html fieldset color background 
Html :: html auto refresh 
Html :: swiper js arrows 
Html :: nuxt v if two conditions 
Html :: html color maroon hex 
Html :: html lang 
Html :: salesforce aura toggle input 
Html :: down chevron unicode 
Html :: button navigate to page 
Html :: how to parse html data using beautifulsoup 
Html :: prevent image saving in html 
Html :: input float 
Html :: how to strike out text in html 
Html :: html simbols 
Html :: html change label color 
Html :: Translate html in magento 2 
Html :: how to add a image file in html 
Html :: phone input code 
Html :: fixed size body html 
Html :: HTML <i and <em Elements 
Html :: execute python script onclick html 
Html :: html 5 
Html :: curl html file 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =