{"id":16125058,"url":"https://github.com/hughsk/tap-to-start","last_synced_at":"2025-03-18T13:30:33.337Z","repository":{"id":65514470,"uuid":"58854854","full_name":"hughsk/tap-to-start","owner":"hughsk","description":null,"archived":false,"fork":false,"pushed_at":"2016-06-28T01:59:49.000Z","size":14,"stargazers_count":48,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"gh-pages","last_synced_at":"2025-03-16T20:35:15.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://hughsk.io/tap-to-start/","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/hughsk.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}},"created_at":"2016-05-15T09:59:17.000Z","updated_at":"2023-10-11T16:21:58.000Z","dependencies_parsed_at":"2023-01-26T21:05:12.248Z","dependency_job_id":null,"html_url":"https://github.com/hughsk/tap-to-start","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/hughsk%2Ftap-to-start","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hughsk%2Ftap-to-start/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hughsk%2Ftap-to-start/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hughsk%2Ftap-to-start/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hughsk","download_url":"https://codeload.github.com/hughsk/tap-to-start/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244231466,"owners_count":20419957,"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-10-09T21:25:28.234Z","updated_at":"2025-03-18T13:30:33.084Z","avatar_url":"https://github.com/hughsk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tap-to-start\n\nA simple fullscreen button to prompt the user to tap/click. Useful for audio/video demos, where mobile devices require playback to be triggered in response to user input.\n\n[![](http://i.imgur.com/Xex2wpJ.png)](http://hughsk.io/tap-to-start/)\n\n[**view demo**](http://hughsk.io/tap-to-start/)\n\n## Usage\n\n### `tapToStart(options, done)`\n\nCreates a new `tap-to-start` overlay. Accepts the following options:\n\n* `foreground`: the color of the foreground circle. Defaults to `#000`.\n* `background`: the color of the background. Defaults to `transparent`.\n* `accent`: the color of the tap icon. Defaults to `background`, or `#fff` if not specified.\n* `skip`: if truthy, skip the UI and call `done` in the next frame. Useful if you only want the UI to be visible if user input is required to continue.\n* `parent`: optional, defaults to `document.body`. Set the element the button is attached to.\n* `icon`: pass in a custom icon as an SVG element. Defaults to the one seen in the demo.\n\n`done` is called when the UI is tapped/clicked and begins to transition out.\n\n``` javascript\nconst tts = require('tap-to-start')\nconst audio = document.createElement('audio')\n\naudio.src = 'song.mp3'\naudio.load()\n\ntts({\n  background: '#000',\n  foreground: '#fff'\n}, function () {\n  audio.play()\n})\n```\n\n## License\n\nMIT, see [LICENSE.md](LICENSE.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhughsk%2Ftap-to-start","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhughsk%2Ftap-to-start","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhughsk%2Ftap-to-start/lists"}