{"id":13748856,"url":"https://github.com/caffeinalab/ti.musicplayer","last_synced_at":"2025-12-25T07:53:09.935Z","repository":{"id":153210669,"uuid":"89715062","full_name":"caffeinalab/ti.musicplayer","owner":"caffeinalab","description":"Widget for titanium to manage playing audio files","archived":false,"fork":false,"pushed_at":"2017-07-04T08:54:35.000Z","size":16,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-15T23:31:24.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/caffeinalab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-04-28T14:41:11.000Z","updated_at":"2024-03-04T02:57:19.000Z","dependencies_parsed_at":"2024-01-17T13:12:14.143Z","dependency_job_id":"df68ad19-0e55-42a6-bb37-0073f419a3c7","html_url":"https://github.com/caffeinalab/ti.musicplayer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.musicplayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.musicplayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.musicplayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffeinalab%2Fti.musicplayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caffeinalab","download_url":"https://codeload.github.com/caffeinalab/ti.musicplayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253240350,"owners_count":21876593,"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-03T07:00:50.940Z","updated_at":"2025-12-25T07:53:09.892Z","avatar_url":"https://github.com/caffeinalab.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Ti.MusicPlayer\n\n### com.caffeinalab.titanium.musicplayer\n\nA simple **Music player** widget.\n\n![image](https://cl.ly/3U2p0c3i0g3s/Image%202017-04-28%20at%204.58.55%20PM.png)\n\n## Installation\n\n#### Via Gittio\n\n```\ngittio install com.caffeinalab.titanium.musicplayer\n```\n\n#### Via Github\n\nDownload the latest release, unzip in `app/widgets` and add in your *config.json*, under `dependencies`:\n\n```json\n\"dependencies\": {\n    \"com.caffeinalab.titanium.musicplayer\": \"*\"\n}\n```\n\n## Usage\n\n```javascript\nvar mp = Alloy.createWidget('com.caffeinalab.titanium.musicplayer');\nmp.setPlaylist([{\n    id: \"\",\n    url: 'http://google.com',\n    cover: \"http://google.com\",\n    artist: \"\",\n    album: \"\",\n    track: 1\n}]);\nmp.setPlaylistIndex(0);\nmp.play()\n```\n\n## API\n\nThe `Track` object is:\n\n* `id`: Usually the model id but can be whatever you want. It is not used internally but it is recommended.\n* `url`: The link to the audio.\n* `cover`: Link to the cover image.\n* `artist`: The artist of the sound track.\n* `album`: The album where the sound track is featured.\n* `index`: Track index\n\n#### `play() `\n\nPlay current track.\n\n#### `stop()`\n\nStops the currently playing audio and releases the memory.\n\n#### `pause()`\n\nPauses the currently playing audio.\n\n#### `setPlaylist(Track[])`\n\nSet the playlist to use in the player.\n\n#### `setPlaylistIndex(Number)`\n\nSet the current index track in the playlist\n\n#### `deletePlaylist`\n\nDelete the current playlist. You can use `setTrack` to set a single track to play.\n\n#### `setTrack(Track)`\n\nOverride the current track.\n\n## Events\n\n#### `play`\n\nFired when the play function is called either from the widget's UI or programmatically\n\nPassed arguments:\n\n* `Track`\n\n#### `pause`\n\nFired when the pause function is called either from the widget's UI or programmatically\n\nPassed arguments:\n\n* `Track`\n\n#### `stop`\n\nFired when internally when the music reaches the end or when the stop function is called programmatically\n\n#### `progress`\n\nFired continuously while the music is playing.\n\nPassed arguments:\n\n* `Track`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaffeinalab%2Fti.musicplayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaffeinalab%2Fti.musicplayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaffeinalab%2Fti.musicplayer/lists"}