{"id":16156851,"url":"https://github.com/saghul/cordova-plugin-audioroute","last_synced_at":"2025-03-18T20:30:44.695Z","repository":{"id":57207832,"uuid":"60607775","full_name":"saghul/cordova-plugin-audioroute","owner":"saghul","description":"iOS audio route change events and more for Cordova","archived":false,"fork":false,"pushed_at":"2020-07-20T09:46:37.000Z","size":10,"stargazers_count":17,"open_issues_count":1,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-26T14:22:13.689Z","etag":null,"topics":["audio","cordova","ios"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/saghul.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":"2016-06-07T11:23:41.000Z","updated_at":"2023-07-04T02:59:28.000Z","dependencies_parsed_at":"2022-09-17T12:01:48.069Z","dependency_job_id":null,"html_url":"https://github.com/saghul/cordova-plugin-audioroute","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saghul%2Fcordova-plugin-audioroute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saghul%2Fcordova-plugin-audioroute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saghul%2Fcordova-plugin-audioroute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saghul%2Fcordova-plugin-audioroute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saghul","download_url":"https://codeload.github.com/saghul/cordova-plugin-audioroute/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243950792,"owners_count":20373664,"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":["audio","cordova","ios"],"created_at":"2024-10-10T01:46:48.174Z","updated_at":"2025-03-18T20:30:44.297Z","avatar_url":"https://github.com/saghul.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cordova-plugin-audioroute\n\n**This plugin works on iOS only.**\n\nThis plugin allows applications to get notified audio about route changes (for example when a headset is connected),\nand also to query and override the audio device in use.\n\n\n## Installation\n\nThe plugin can be installed using the Cordova CLI tool:\n\n    cordova plugin add cordova-plugin-audioroute --save\n\n\n## API\n\nAll these functions are available in the `cordova.plugins.audioroute` namespace.\n\n### currentOutputs(successCallback, errorCallback)\n\nGet an Array of the currently connected audio ports. The possible elements are:\n\n* line-out\n* headphones\n* bluetooth-a2dp\n* builtin-receiver\n* builtin-speaker\n* hdmi\n* airplay\n* bluetooth-le\n* unknown\n\n## overrideOutput(output, successCallback, errorCallback)\n\nOverrides the audio output device. `output` must be one of `default` or `speaker`.\n\n## \"audioroute-changed\" event\n\nWhen the audio route has changed a 'audioroute-changed' event will be fired in `document`.\nIt contains the reason as associated data, which can be one of:\n\n* unknown\n* new-device-available\n* old-device-unavailable\n* category-change\n* override\n* wake-from-sleep\n* no-suitable-route-for-category\n* route-config-change\n\nExample:\n\n    document.addEventListener('audioroute-changed',\n                              function(event) {\n                                  console.log('Audio route changed: ' + event.reason);\n                              });\n\n\n## License\n\nMIT\n\n\n## Author\n\nSaúl Ibarra Corretgé \u003csaghul@gmail.com\u003e\n\nThis work has been sponsored by [AG Projects](http://ag-projects.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaghul%2Fcordova-plugin-audioroute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaghul%2Fcordova-plugin-audioroute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaghul%2Fcordova-plugin-audioroute/lists"}