{"id":13715007,"url":"https://github.com/Jasmin2895/web-monetized-video","last_synced_at":"2025-05-07T03:31:08.892Z","repository":{"id":42825853,"uuid":"263143922","full_name":"Jasmin2895/web-monetized-video","owner":"Jasmin2895","description":"experimenting with web monetisation API","archived":false,"fork":false,"pushed_at":"2023-07-05T10:32:12.000Z","size":416,"stargazers_count":16,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-26T04:37:19.090Z","etag":null,"topics":["javascript","pay","register","video","webcomponents","webmonetization"],"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/Jasmin2895.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-05-11T19:53:54.000Z","updated_at":"2025-03-26T12:38:03.000Z","dependencies_parsed_at":"2024-01-09T16:14:26.023Z","dependency_job_id":null,"html_url":"https://github.com/Jasmin2895/web-monetized-video","commit_stats":{"total_commits":97,"total_committers":3,"mean_commits":"32.333333333333336","dds":0.09278350515463918,"last_synced_commit":"d5b3e170a6a49798e5cab0640f95224eba4daa34"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jasmin2895%2Fweb-monetized-video","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jasmin2895%2Fweb-monetized-video/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jasmin2895%2Fweb-monetized-video/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jasmin2895%2Fweb-monetized-video/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jasmin2895","download_url":"https://codeload.github.com/Jasmin2895/web-monetized-video/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252806420,"owners_count":21807199,"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":["javascript","pay","register","video","webcomponents","webmonetization"],"created_at":"2024-08-03T00:00:52.952Z","updated_at":"2025-05-07T03:31:08.063Z","avatar_url":"https://github.com/Jasmin2895.png","language":"JavaScript","funding_links":[],"categories":["Resources"],"sub_categories":["Packages"],"readme":"# web-monetized-video\nA web component which has play and pay policy and charges you for the amount of video watched. :smile: :dancer:\n\n## Component:\n* [`\u003cweb-monetized-video\u003e`] - a component that allow the user to pay for the section of video watched.\n\n## Installation\n`\u003cweb-monetized-video\u003e` is a packaged javascript module.\n\u003e Modules are loaded asynchronulsy by browser, so for registering our component quickly we can load them in the head :thumbsup:\n\n```html\n\u003chead\u003e\n  \u003cscript type=\"module\" src=\"https://unpkg.com/web-monetized-video\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n```\n\n## How to use\n```html\n\u003chtml\u003e\n\u003chead\u003e\n  \u003cscript type=\"module\" src=\"https://unpkg.com/web-monetized-video\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\n  \u003cweb-monetized-video width=\"300\" height=\"200\" url=\"video_url\" monetization-link=\"payment_pointer\"\u003e\u003c/web-monetized-video\u003e\n\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Parameters\n* `width` - Width of the element\n* `height` - Height of the element\n* `url`- Link of the video. (Example- `https://www.html5rocks.com/en/tutorials/video/basics/Chrome_ImF.webm`)\n* `monetization-link`- link to payment wallet of the user (Example- `$wallet.example.com/alice`)\n\n### Events Listeners\n| Events        | Are           |\n| ------------- |:-------------:| \n| `monetizationstart`      | Determine when Web Monetization has started actively paying by adding an event listener for monetizationstart  |\n| `monetizationprogress`      | Determine the current status of the payment stream by adding an event listener for monetizationprogress |\n| `monetizationpending` |Determine when Web Monetization is enabled by adding an event listener for monetizationpending |\n| `monetizationstop` | Determine when Web Monetization has stopped by adding an event listener for monetizationstop |\n\n\n### Adding to your app via `npm`\n\n```bash\nnpm install web-monetized-video --save\n```\n\nInclude in your app javascript (e.g. src/App.js)\n```js\nimport 'web-monetized-video';\n```\nThis will register the custom elements with the browser so they can be used as HTML.\n\n## LICENSE\n\nMIT (c) 2020 Jasmin Virdi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJasmin2895%2Fweb-monetized-video","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJasmin2895%2Fweb-monetized-video","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJasmin2895%2Fweb-monetized-video/lists"}