{"id":13491752,"url":"https://github.com/daviddarnes/play-button","last_synced_at":"2026-02-03T14:05:41.561Z","repository":{"id":215257610,"uuid":"730322672","full_name":"daviddarnes/play-button","owner":"daviddarnes","description":"A Web Component to play audio or video with a button","archived":false,"fork":false,"pushed_at":"2024-04-15T10:26:47.000Z","size":12,"stargazers_count":40,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T03:04:19.576Z","etag":null,"topics":["component","components","customelement","customelements","webcomponent","webcomponents"],"latest_commit_sha":null,"homepage":"https://daviddarnes.github.io/play-button/demo.html","language":"HTML","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/daviddarnes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"buy_me_a_coffee":"daviddarnes"}},"created_at":"2023-12-11T17:11:15.000Z","updated_at":"2025-09-08T10:26:50.000Z","dependencies_parsed_at":"2024-01-03T12:26:40.956Z","dependency_job_id":"50d0e033-5895-4eee-a67b-a690efcc5813","html_url":"https://github.com/daviddarnes/play-button","commit_stats":null,"previous_names":["daviddarnes/play-button"],"tags_count":1,"template":false,"template_full_name":"daviddarnes/component-template","purl":"pkg:github/daviddarnes/play-button","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daviddarnes%2Fplay-button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daviddarnes%2Fplay-button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daviddarnes%2Fplay-button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daviddarnes%2Fplay-button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daviddarnes","download_url":"https://codeload.github.com/daviddarnes/play-button/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daviddarnes%2Fplay-button/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29047100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["component","components","customelement","customelements","webcomponent","webcomponents"],"created_at":"2024-07-31T19:00:59.887Z","updated_at":"2026-02-03T14:05:38.987Z","avatar_url":"https://github.com/daviddarnes.png","language":"HTML","funding_links":["https://buymeacoffee.com/daviddarnes"],"categories":["HTML"],"sub_categories":[],"readme":"# `play-button`\n\nA Web Component to play audio or video with a button.\n\n**[Demo](https://daviddarnes.github.io/play-button/demo.html)** | **[Further reading](https://darn.es/play-button-web-component/)**\n\n## Examples\n\n```html\n\u003cscript type=\"module\" src=\"play-button.js\"\u003e\u003c/script\u003e\n\n\u003cplay-button\u003e\n  \u003caudio controls src=\"https://darn.es/sounds/daviddarnes.m4a\"\u003e\u003c/audio\u003e\n  \u003cbutton\u003ePlay\u003c/button\u003e\n\u003c/play-button\u003e\n```\n\n## Features\n\nThis Web Component allows you to:\n\n- Control `audio` or `video` elements with a single `button` which can play and pause the audio or video\n\n## Installation\n\nYou have a few options (choose one of these):\n\n1. Install via [npm](https://www.npmjs.com/package/@daviddarnes/play-button): `npm install @daviddarnes/play-button`\n1. [Download the source manually from GitHub](https://github.com/daviddarnes/play-button/releases) into your project.\n1. Skip this step and use the script directly via a 3rd party CDN (not recommended for production use)\n\n### Usage\n\nMake sure you include the `\u003cscript\u003e` in your project (choose one of these):\n\n```html\n\u003c!-- Host yourself --\u003e\n\u003cscript type=\"module\" src=\"play-button.js\"\u003e\u003c/script\u003e\n```\n\n```html\n\u003c!-- 3rd party CDN, not recommended for production use --\u003e\n\u003cscript type=\"module\" src=\"https://www.unpkg.com/@daviddarnes/play-button@1.0.0/play-button.js\"\u003e\u003c/script\u003e\n```\n\n```html\n\u003c!-- 3rd party CDN, not recommended for production use --\u003e\n\u003cscript type=\"module\" src=\"https://esm.sh/@daviddarnes/play-button@1.0.0\"\u003e\u003c/script\u003e\n```\n\n## Credit\n\nWith thanks to the following people:\n\n- [Zach Leatherman](https://zachleat.com) for inspiring this [Web Component repo template](https://github.com/daviddarnes/component-template)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaviddarnes%2Fplay-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaviddarnes%2Fplay-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaviddarnes%2Fplay-button/lists"}