{"id":19347664,"url":"https://github.com/datarhei/clappr-info-button-plugin","last_synced_at":"2025-11-18T04:01:48.675Z","repository":{"id":42232153,"uuid":"141710340","full_name":"datarhei/clappr-info-button-plugin","owner":"datarhei","description":"Info Button plugin for Clappr player","archived":false,"fork":false,"pushed_at":"2023-03-04T02:47:13.000Z","size":2705,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-24T09:45:54.776Z","etag":null,"topics":["clappr","clappr-plugin"],"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/datarhei.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-07-20T12:38:18.000Z","updated_at":"2021-04-21T12:53:38.000Z","dependencies_parsed_at":"2023-09-22T22:04:00.769Z","dependency_job_id":null,"html_url":"https://github.com/datarhei/clappr-info-button-plugin","commit_stats":{"total_commits":33,"total_committers":3,"mean_commits":11.0,"dds":"0.12121212121212122","last_synced_commit":"ae0e416ba49631369407203e5c22a84a3bc66638"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/datarhei/clappr-info-button-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarhei%2Fclappr-info-button-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarhei%2Fclappr-info-button-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarhei%2Fclappr-info-button-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarhei%2Fclappr-info-button-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datarhei","download_url":"https://codeload.github.com/datarhei/clappr-info-button-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datarhei%2Fclappr-info-button-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284999741,"owners_count":27097839,"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","status":"online","status_checked_at":"2025-11-18T02:00:05.759Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["clappr","clappr-plugin"],"created_at":"2024-11-10T04:17:32.574Z","updated_at":"2025-11-18T04:01:48.616Z","avatar_url":"https://github.com/datarhei.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clappr Info Button Plugin\n\n![Snapshot](../master/snapshot.png)\n\n## Usage\n\nAdd both Clappr and Info Button plugin scripts to your HTML:\n\n```html\n\u003chead\u003e\n    \u003cscript type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/clappr@latest/dist/clappr.min.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"dist/info-button.min.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n```\n\nThen just add `InfoButton` into the list of plugins of your player instance:\n\n```javascript\nvar player = new Clappr.Player({\n    source: \"http://your.video/here.m3u8\",\n    plugins: [InfoButton]\n});\n```\n\nYou can also customize the button, options, and title:\n\n```javascript\nvar player = new Clappr.Player({\n    source: \"http://your.video/here.m3u8\",\n    plugins: [InfoButton],\n    infoButtonConfig: {\n        button: {\n            image: 'info-button.png'\n        },\n        title: 'Info',\n        options: [\n            {label: 'About', link: 'https://github.com/datarhei/clappr-info-button-plugin'},\n            {label: 'Hello', link: function() { alert('Hello!'); }}\n        ]\n    },\n});\n```\n\nThe provided links in the options will be openend in a new window/tab. If the link is a function, the function will be executed and no\nnew window/tab will be opened.\n\nIn order to support different languages, you have the possibility to provide translations for the info button. In `infoButtonConfig` you\nadd a `strings` object which has the locale of the language as key and an object with `title` and `options` as value, e.g. to provide\na German translation:\n\n```javascript\nvar player = new Clappr.Player({\n    source: \"http://your.video/here.m3u8\",\n    plugins: [InfoButton],\n    infoButtonConfig: {\n        button: {\n            image: 'info-button.png'\n        },\n        title: 'Info',\n        options: [\n            {label: 'About', link: 'https://github.com/datarhei/clappr-info-button-plugin'},\n        ],\n        strings: {\n            'de': {\n                title: 'Informationen',\n                options: [\n                    {label: 'Über', link: 'https://github.com/datarhei/clappr-info-button-plugin'}\n                ]\n            }\n        }\n    },\n});\n```\n\nInstead of simply `de` you could use `de-DE`, but then this translation will only be used if the current locale matches exactly. With only `de`\nall `de-*` variants will cause this translation to be used.\n\nIf a translation for the current locale is not found, the defaults (as given in `title` and `options`) will be used instead.\n\nIn case you want to override the language of the player, add the key `language` to `infoButtonConfig` with a matching locale from your provided\ntranslations:\n\n```javascript\nvar player = new Clappr.Player({\n    source: \"http://your.video/here.m3u8\",\n    plugins: [InfoButton],\n    infoButtonConfig: {\n        button: {\n            image: 'info-button.png'\n        },\n        title: 'Info',\n        options: [\n            {label: 'About', link: 'https://github.com/datarhei/clappr-info-button-plugin'},\n        ],\n        language: 'de',\n        strings: {\n            'de': {\n                title: 'Informationen',\n                options: [\n                    {label: 'Über', link: 'https://github.com/datarhei/clappr-info-button-plugin'}\n                ]\n            }\n        }\n    },\n});\n```\n\n## How to hack\n\nClone this repository\n\n```bash\ngit clone https://github.com/datarhei/clappr-info-button-plugin.git\ncd clappr-info-button-plugin\n```\n\nInstall all dependencies\n\n```bash\nnpm install\n```\n\nIf something doesn't work, try to delete `node_modules` and `package-lock.json`.\n\nModify and build the code\n\n```bash\n# hack, hack, hack\n\n# check the JS-syntax and fix it (optionally)\nnpm run lint\nnpm run lint:fix\n\n# build the unminified version\nnpm run build\n\n# build the minified version\nnpm run release\n\n# find the builds in dist/\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatarhei%2Fclappr-info-button-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatarhei%2Fclappr-info-button-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatarhei%2Fclappr-info-button-plugin/lists"}