Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Playing sound in Vue.js

var data = { soundurl : 'http://soundbible.com/mp3/analog-watch-alarm_daniel-simion.mp3'} 
new Vue({
  el: '#app',
  data: data,
  methods: {
    playSound () {
      var audio = new Audio(data.soundurl);
      audio.play();
    }
  }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: adonis js sort by 
Javascript :: getelementbyid 
Javascript :: create slug in javascript 
Javascript :: npm could not determine node.js install directory 
Javascript :: query date range in mongodb 
Javascript :: js get all select options 
Javascript :: node js load animation 
Javascript :: scrollview child layout ( justifycontent ) must be applied through the contentcontainerstyle prop 
Javascript :: fibonacci js code 
Javascript :: vuejs form prevent default event 
Javascript :: jquery class list 
Javascript :: js today set time 
Javascript :: javascript keywords 
Javascript :: html-webpack-plugin npm 
Javascript :: js map value in range 
Javascript :: typeface in gatsby 
Javascript :: javascript degree to radians 
Javascript :: get img src javascript 
Javascript :: image border shadow react native 
Javascript :: batch md 
Javascript :: serve a file in express 
Javascript :: Create slug from string in Javascript 
Javascript :: create random aleatory token javascript 
Javascript :: useswr 
Javascript :: stop next script when ajaxcall 
Javascript :: como pegar as propriedades css de um elemento :after html com js 
Javascript :: setattribute disabled javascript 
Javascript :: create a link javascript 
Javascript :: round up javascript 
Javascript :: percentage width react native 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =