{"id":22505425,"url":"https://github.com/azer/alert","last_synced_at":"2025-08-03T11:33:20.950Z","repository":{"id":9636823,"uuid":"11568436","full_name":"azer/alert","owner":"azer","description":"JavaScript library to play sound alerts","archived":false,"fork":false,"pushed_at":"2017-10-07T20:04:30.000Z","size":112,"stargazers_count":111,"open_issues_count":1,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-15T03:09:22.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-21T22:04:54.000Z","updated_at":"2023-01-28T11:27:01.000Z","dependencies_parsed_at":"2022-09-22T18:02:32.705Z","dependency_job_id":null,"html_url":"https://github.com/azer/alert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Falert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Falert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Falert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Falert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azer","download_url":"https://codeload.github.com/azer/alert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228541050,"owners_count":17934066,"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-12-07T00:18:37.193Z","updated_at":"2024-12-07T00:18:37.693Z","avatar_url":"https://github.com/azer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## alert\n\nJavaScript library to play sound alerts \n\n```js\nalert = require('alert')\n\nalert() // Plays default alert \"bottle\"\nalert('purr')\nalert.volume(0.5)\n```\n\nSee `content.js` for all available sounds.\n\nTry it at\n* [requirebin](http://requirebin.com/?gist=6050220)\n* [jsbin](http://jsbin.com/enobox/1/edit)\n\n## Install\n\n```bash\n$ npm install alert\n```\n\n## Manual\n\n### Available Sounds\n\n* bottle (default)\n* glass\n* funk\n* morse\n* purr\n* tink\n* submarine\n\n### Adding Custom Sounds\n\n```js\nalert.content['foo'] = ['http://bar.com/foo.mp3', 'http://bar.com/foo.ogg']\nalert('foo')\n```\n\n## How to use without NPM?\n\nIf your application isn't structured as a CommonJS package, you can download the distribution file;\n\n```bash\n$ wget https://raw.github.com/azer/alert/master/dist/alert.js\n```\n\nAnd include it on your page:\n\n```html\n\u003cscript src=\"alert.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  playAlert('purr')\n\u003c/script\u003e\n```\n\n### Accessing Audio API\n\n```js\nalert.player.src()\n// =\u003e foobar.mp3\n\nalert.player.on('ended', function(){})\n```\n\nMore info is at [azer/play-audio](http://github.com/azer/play-audio)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazer%2Falert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazer%2Falert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazer%2Falert/lists"}