soundjs

Buffered audio in SoundJS

百般思念 提交于 2019-12-12 03:08:15
问题 I'm using SoundJS 0.5.2 to play audio in a music player that I'm designing for a client. According to the documentation, I have to register or preload an audio file before I can use it, by using the registerSound method of the Sound Class and the audio cannot be played before it is fully loaded. But how I do I go about buffering the audio while it is being played? Like wait till 10% of the audio is buffered, then play the song? Can this be accomplished using PreloadJS ? After Googling about

Using createjs-soundjs in react web app

十年热恋 提交于 2019-12-11 05:42:15
问题 I would like to use https://www.npmjs.com/package/createjs-soundjs to play sounds on a react web app. I installed the package normally with npm install createjs-soundjs and it's showing in the packages list. How should I include this to my project, so that I could use it? I have tried the following: import React from 'react'; import classNames from 'classnames'; import createjs from 'createjs'; import SoundJS from 'createjs-soundjs'; // this line causes an error The error message in console:

How to set position correctly in SoundJS for Firefox, IE

末鹿安然 提交于 2019-12-06 09:14:04
问题 I'm trying to use SoundJS to play sn mp3 file and seek to a specific position. I'm using: instance.setPosition(10000); which works correctly in Google Chrome. But in Mozilla Firefox I hear the sound playing from the correct position, and a second instance of the sound also playing from another position. In Internet Explorer, the sound starts playing again from the beginning. Here's a jsFiddle (with autoplaying sound) and here is the complete javascript: createjs.Sound.registerPlugins(

How to set position correctly in SoundJS for Firefox, IE

我是研究僧i 提交于 2019-12-04 18:28:47
I'm trying to use SoundJS to play sn mp3 file and seek to a specific position. I'm using: instance.setPosition(10000); which works correctly in Google Chrome. But in Mozilla Firefox I hear the sound playing from the correct position, and a second instance of the sound also playing from another position. In Internet Explorer, the sound starts playing again from the beginning. Here's a jsFiddle (with autoplaying sound) and here is the complete javascript: createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin, createjs.FlashPlugin]); createjs.Sound.addEventListener(