{"id":18615093,"url":"https://github.com/s074/music-player","last_synced_at":"2025-11-03T03:30:35.104Z","repository":{"id":62390657,"uuid":"559357098","full_name":"dank074/music-player","owner":"dank074","description":"Plays Habbo Trax music","archived":false,"fork":false,"pushed_at":"2023-01-04T07:32:38.000Z","size":120,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-27T11:32:39.953Z","etag":null,"topics":["habbo","jukebox","trax"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dank074.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-29T21:26:37.000Z","updated_at":"2024-06-20T10:08:27.000Z","dependencies_parsed_at":"2023-02-02T03:32:09.087Z","dependency_job_id":null,"html_url":"https://github.com/dank074/music-player","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/dank074%2Fmusic-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dank074%2Fmusic-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dank074%2Fmusic-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dank074%2Fmusic-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dank074","download_url":"https://codeload.github.com/dank074/music-player/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406495,"owners_count":19633025,"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":["habbo","jukebox","trax"],"created_at":"2024-11-07T03:28:11.482Z","updated_at":"2025-11-03T03:30:35.074Z","avatar_url":"https://github.com/dank074.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# music-player\nPlays habbo trax music\n\nTest it out at https://dank074.github.io/music-player/\n\n## Usage\n```\nnpm install @dank074/music-player\n```\n## Listening for events\nYou can listen for specific events emmited by the music player. Available events are:\n- \"playing\"\n- \"stopped\"\n- \"paused\"\n- \"loading\"\n- \"time\"\n- \"songended\" \n\nexample:\n```js\nconst player = new MusicPlayer( 'https://flash.nitrodev.co/dcr/hof_furni/mp3/sound_machine_sample_%sample%.mp3');\n\nplayer.on(\"playing\", (currentTime, totalTime) =\u003e {\n    console.log(\"now playing at time\" + currentTime + \"/\" + totalTime);\n});\n\nplayer.on(\"time\", (pos) =\u003e {\n    console.log(\"current time: \" + pos);\n})\n```\n## Running example\n1. build the trax player library by running ```npm install \u0026\u0026 npm run build``` in the main directory. This will create the built files in the dist directory\n2. navigate to `/example` directory and run\n``` npm install \u0026\u0026 npm run start```\nThis will start the example\n\n## Trax track format\nThe track string follows the following format:\n\nThere can be 1 to n channels in a track. Channels are split by the `:` character.\n\nEach channel consists of channel entries which are split by the `;` character.\n\nA channel entry describes the sound id and duration of the sound, split by the `,` character. Duration is in blocks, and each block is 2 seconds long.\n\nFor example, the track `1:4,4:2:3,2;2,1:` results in the following:\n\nSecond: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | \n| --- | --- | --- | --- | ---- | --- | --- | --- | --- |\n| channel 1: | 4| 4 | 4 | 4 | 4| 4 | 4 | 4\n| channel 2: | 3 | 3 | 3 | 3 | 2 | 2 | | |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs074%2Fmusic-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs074%2Fmusic-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs074%2Fmusic-player/lists"}