{"id":13534222,"url":"https://github.com/CreateJS/SoundJS","last_synced_at":"2025-04-01T22:31:29.344Z","repository":{"id":1771820,"uuid":"2692921","full_name":"CreateJS/SoundJS","owner":"CreateJS","description":"A Javascript library for working with Audio. It provides a consistent API for loading and playing audio on different browsers and devices. Currently supports WebAudio, HTML5 Audio, Cordova / PhoneGap, and a Flash fallback.","archived":false,"fork":false,"pushed_at":"2021-03-27T15:13:45.000Z","size":84227,"stargazers_count":4485,"open_issues_count":94,"forks_count":834,"subscribers_count":215,"default_branch":"master","last_synced_at":"2025-03-27T11:06:21.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://createjs.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CreateJS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-11-02T04:18:36.000Z","updated_at":"2025-03-25T05:21:19.000Z","dependencies_parsed_at":"2022-08-06T11:01:21.443Z","dependency_job_id":null,"html_url":"https://github.com/CreateJS/SoundJS","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreateJS%2FSoundJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreateJS%2FSoundJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreateJS%2FSoundJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreateJS%2FSoundJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CreateJS","download_url":"https://codeload.github.com/CreateJS/SoundJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246720572,"owners_count":20822918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T07:01:28.270Z","updated_at":"2025-04-01T22:31:24.570Z","avatar_url":"https://github.com/CreateJS.png","language":"JavaScript","readme":"# SoundJS\r\n\r\nSoundJS is a library to make working with audio on the web easier. It provides a consistent API for playing audio in\r\ndifferent browsers, including using a target plugin model to provide an easy way to provide additional audio plugins\r\nlike a Flash fallback (included, but must be used separately from the combined/minified version).\r\n\r\nA mechanism has been provided for easily tying in audio preloading to [PreloadJS](http://createjs.com/preloadjs/).\r\n\r\n\r\n## Example\r\n\r\n```javascript\r\ncreatejs.Sound.on(\"fileload\", handleLoadComplete);\r\ncreatejs.Sound.alternateExtensions = [\"mp3\"];\r\ncreatejs.Sound.registerSound({src:\"path/to/sound.ogg\", id:\"sound\"});\r\nfunction handleLoadComplete(event) {\r\n\tcreatejs.Sound.play(\"sound\");\r\n}\r\n```\r\n\r\n## License\r\nBuilt by gskinner.com, and released for free under the MIT license, which means you can use it for almost any purpose\r\n(including commercial projects). We appreciate credit where possible, but it is not a requirement.\r\n\r\n\r\n## Support and Resources\r\n* Find examples and more information at the [SoundJS web site](http://soundjs.com/)\r\n* Read the [documentation](http://createjs.com/docs/soundjs/)\r\n* Discuss, share projects, and interact with other users on [reddit](http://www.reddit.com/r/createjs/).\r\n* Ask technical questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/soundjs).\r\n* File verified bugs or formal feature requests using Issues on [GitHub](https://github.com/CreateJS/SoundJS/issues).\r\n* Have a look at the included [examples](https://github.com/CreateJS/SoundJS/tree/master/examples) and\r\n[API documentation](http://createjs.com/docs/soundjs/) for more in-depth information.\r\n\r\n\r\n## Classes\r\n\r\n### [Sound](http://createjs.com/Docs/SoundJS/classes/Sound.html)\r\nThe core API for playing sounds. Call createjs.Sound.play(sound, ...options), and a sound instance is created that can be\r\nused to control the audio, and dispatches events when it is complete, loops, or is interrupted.\r\n\r\n### [SoundInstance](http://createjs.com/Docs/SoundJS/classes/AbstractSoundInstance.html)\r\nA controllable sound object that wraps the actual plugin implementation, providing a consistent API for audio playback,\r\nno matter what happens in the background. Sound instances can be paused, muted, and stopped; and the volume, pan (where\r\navailable), and position changed using the simple API.\r\n\r\n### [WebAudioPlugin](http://createjs.com/Docs/SoundJS/classes/WebAudioPlugin.html)\r\nThe default, built-in plugin, which uses Web Audio APIs to playback sounds. Note that WebAudio will fail to load when\r\nrun locally, and the HTML audio plugin will be used instead.\r\n\r\n### [HTMLAudioPlugin](http://createjs.com/Docs/SoundJS/classes/HTMLAudioPlugin.html)\r\nThe fallback built-in plugin, which manages audio playback via the HTML5 \u003caudio\u003e tag. This will be used in instances\r\nwhere the WebAudio plugin is not available.\r\n\r\n### [CordovaAudioPlugin](http://createjs.com/docs/soundjs/classes/CordovaAudioPlugin.html)\r\nAn additional plugin which will playback audio in a Cordova app and tools that utilize Cordova such as PhoneGap or Ionic.\r\nYou must manually register this plugin. Currently available on github since SoundJS-0.6.1.\r\n\r\n### [FlashAudioPlugin](http://createjs.com/Docs/SoundJS/classes/FlashAudioPlugin.html)\r\nAn additional plugin which uses a flash shim (and SWFObject) to playback audio using Flash. You must manually set up and\r\nregister this plugin.\r\n\r\n## [Documentation and examples](http://createjs.com/docs/soundjs/)\r\nHave a look at the included examples and API documentation for more in-depth information.\r\n","funding_links":[],"categories":["Libraries","JavaScript","Video/Audio","UI","目录","Uncategorized","视频/音频"],"sub_categories":["JavaScript","Other","其它","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCreateJS%2FSoundJS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCreateJS%2FSoundJS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCreateJS%2FSoundJS/lists"}