Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Play and Pause media for HTML5 using JS/Javascript

function playPauseMedia() {
  if(media.paused) {
    play.setAttribute('data-icon','u');
    media.play();
  } else {
    play.setAttribute('data-icon','P');
    media.pause();
  }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: Return a Sorted Array Without Changing the Original Array 
Javascript :: how to highlight active screen react native 
Javascript :: jquery xpath 
Javascript :: math floor javascript 
Javascript :: for item loop 
Javascript :: first n elements of array js 
Javascript :: router nodejs 
Javascript :: what is closure in javascript 
Javascript :: console.log printing object object 
Javascript :: mock createRef jest react functional component 
Javascript :: angular erro ao adicionar um projeto no firebase Failed to make request to https://www.gstatic.com/firebasejs/releases.json 
Javascript :: Rounding off to desired no of digit after decimal 
Javascript :: alpine js update data 
Javascript :: document.getelementsbyclassname equivalent in jquery 
Javascript :: merge two strings with alternate characters javascript 
Javascript :: mongoose auto increment 
Javascript :: click on browser.find_element_by_xpath with href 
Javascript :: jsconfig.json code to support absolute import 
Javascript :: react native azure 
Javascript :: attr jquery 
Javascript :: acer swift 5 
Javascript :: regex to valied password strength stackoverflow 
Javascript :: js if the reverse of a number is better than the original num 
Javascript :: split array in to equal parts and make 2 array javascript 
Javascript :: aframe basic example 
Javascript :: inject html via template tags js 
Javascript :: angular remove element from array 
Javascript :: defaultdeep lodash 
Javascript :: react-app-rewired test single file 
Javascript :: jquery get element by data attribute 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =