美文网首页
soundjs插件

soundjs插件

作者: Rose_yang | 来源:发表于2018-10-08 17:56 被阅读0次
<!DOCTYPE html>
<html>
<head>
  <script src="https://code.createjs.com/createjs-2015.11.26.min.js"></script>
  <script>
  var soundID = "Thunder";
  
  function loadSound () {
    createjs.Sound.registerSound("/static/1.mp3", soundID);
  }
  var sound;
  function playSound () {
    sound = createjs.Sound.play(soundID);
  }
  function stopSound () {
    sound.stop()
  }
  
  </script>
</head>
<body onload="loadSound();">
<button onclick="playSound();" class="playSound">Play Sound</button>
<button onclick="stopSound();" class="playSound">Stop Sound</button>

</body>
</html>

相关文章

  • soundjs插件

  • SoundJS

    SoundJS提供了简单而强大的API来处理音频,大多数情况下这个类库都静态方式使用(无需创建实例)。通过插件来执...

  • SoundJS-音频处理

    SoundJS提供了简单而强大的API来处理音频,大多数情况下这个类库都静态方式使用(无需创建实例)。通过插件来执...

  • React配置过程中用到的插件汇总

    ●react插件●react-dom插件●react-router插件●react-redux插件●babel插件...

  • iOS项目实战02

    修改插件:查找插件 -> 插件路径(不能记) -> Xcode插件开发 -> 查看插件代码 -> 搜索instal...

  • 5.文档 - gitbook - 插件

    参考 官方插件 重点参考 GitBook 插件 常用插件 配置插件 到 官方插件 上找合适的插件 在配置文件中安装...

  • FCPX系列的插件怎么安装导入?Final cut pro x插

    fcpx插件怎么安装? Fcpx插件怎么解压安装?fcpx插件怎么卸载?fcpx插件怎么添加?fcpx lut插件...

  • Cordova 插件更新

    查看项目插件列表 移除插件 添加插件

  • IDEA破解

    配置插件 配置仓库 下载插件 使用插件

  • Cordova 本地插件

    1 安装插件环境 2 创建插件 例子 添加配置 进入插件文件夹下初始化插件 插件使用

网友评论

      本文标题:soundjs插件

      本文链接:https://www.haomeiwen.com/subject/grvjaftx.html