Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to take a input video on browser using javascript and play it

<input type="file" accept="video/*" capture="camera" id="recorder">
  <video id="player" controls> </video>
      <script>  
            var recorder = document.getElementById('recorder'); 
            var player = document.getElementById('player');  
                  recorder.addEventListener('change', function(e) {    
                    var file = e.target.files[0];   
        
                    player.src = URL.createObjectURL(file);  });
       </script>
Comment

PREVIOUS NEXT
Code Example
Javascript :: json data doesn show on console 
Javascript :: Jquery search in json 
Javascript :: mongoose and express get requests 
Javascript :: wait one second in javascript using async wait 
Javascript :: javascript explode 
Javascript :: Vanilla JS (on)load with page 
Javascript :: Clear Cell Value In Google Sheet By App Scripts 
Javascript :: moment set hours 
Javascript :: nock CORS error 
Javascript :: find element in array javascript 
Javascript :: loop an array in javascript 
Javascript :: javascript get unique values from key 
Javascript :: detect user browser javascript 
Javascript :: date of birth validation for 18 years javascript 
Javascript :: get minutes and seconds from seconds 
Javascript :: vue select option get attribute 
Javascript :: add all elements in array javascript 
Javascript :: javascript remove html element 
Javascript :: number pyramid in javascript 
Javascript :: get last in array javascript 
Javascript :: html javascript call function after pressing enter 
Javascript :: split string on multiple characters javascript 
Javascript :: class with attribute selector jquery 
Javascript :: lazy loading pagination react npm 
Javascript :: js delete object in dict 
Javascript :: Matched leaf route at location "/" does not have an element. This means it will render an <Outlet / with a null value by default resulting in an "empty" page. 
Javascript :: difference between slice and splice 
Javascript :: pipe of date angular 
Javascript :: Angular Unit Testing: Observable not returning results 
Javascript :: vue add script tags and link tags 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =