{"id":22403321,"url":"https://github.com/springload/quicktube","last_synced_at":"2025-12-12T04:04:31.254Z","repository":{"id":43650044,"uuid":"14348276","full_name":"springload/quicktube","owner":"springload","description":"A lightweight embed video player, with support for YouTube and Vimeo","archived":false,"fork":false,"pushed_at":"2022-12-07T23:20:47.000Z","size":900,"stargazers_count":9,"open_issues_count":10,"forks_count":2,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-11-10T15:56:40.421Z","etag":null,"topics":["javascript","player","vimeo","youtube"],"latest_commit_sha":null,"homepage":"https://springload.github.io/quicktube/","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/springload.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}},"created_at":"2013-11-12T23:23:26.000Z","updated_at":"2021-11-19T01:20:42.000Z","dependencies_parsed_at":"2022-08-23T06:41:11.181Z","dependency_job_id":null,"html_url":"https://github.com/springload/quicktube","commit_stats":null,"previous_names":["joshbarr/quicktube.js"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springload%2Fquicktube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springload%2Fquicktube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springload%2Fquicktube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springload%2Fquicktube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/springload","download_url":"https://codeload.github.com/springload/quicktube/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228267806,"owners_count":17893841,"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","player","vimeo","youtube"],"created_at":"2024-12-05T09:16:48.465Z","updated_at":"2025-12-12T04:04:30.923Z","avatar_url":"https://github.com/springload.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Quicktube](https://springload.github.io/quicktube/) [![npm](https://img.shields.io/npm/v/quicktube.svg?style=flat-square)](https://www.npmjs.com/package/quicktube) [![Build Status](https://travis-ci.org/springload/quicktube.svg?branch=master)](https://travis-ci.org/springload/quicktube) [![Coverage Status](https://coveralls.io/repos/github/springload/quicktube/badge.svg)](https://coveralls.io/github/springload/quicktube)\n\n\u003e A lightweight embed video player, with support for YouTube and Vimeo. Check out our [online demo](https://springload.github.io/quicktube/)!\n\n## Usage\n\n```sh\nnpm install --save quicktube\n```\n\n### Initial setup\n\nIs really simple. Just add the video ID to `data-quicktube='{video-id}'` and `data-quicktube-play='{video-id}'` to the play trigger element.\n\n```html\n\u003cdiv class=\"quicktube\" data-quicktube=\"k6QanQUaDOo\"\u003e\n    \u003cdiv class=\"quicktube__video\" data-quicktube-video\u003e\u003c/div\u003e\n    \u003cdiv data-quicktube-play=\"k6QanQUaDOo\" class=\"quicktube__poster\" data-quicktube-poster\u003e\n        \u003c!-- Optional poster frame image --\u003e\n        \u003cimg class=\"quicktube__poster-image\" src=\"/path/to/image\" /\u003e\n        \u003cbutton class=\"quicktube__play quicktube__btn\"\u003e\n            Play\n        \u003c/button\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\nInitialise quicktube.\n\n```javascript\nimport quicktube from 'quicktube';\n\ndocument.addEventListener('DOMContentLoaded', () =\u003e {\n    quicktube.init();\n}, false);\n```\n\n\u003e:warning: Don't forget to include the [necessary CSS](https://github.com/springload/quicktube/blob/master/src/quicktube.css), as well as the required [polyfills](https://github.com/springload/quicktube/blob/master/examples/utils/polyfills.js) should your environment require it.\n\n### API\n\nYou can hook to the `play` and `pause` events like this:\n\n```js\nwindow.addEventListener('quicktube:play', () =\u003e {\n    showingItem.style.display = 'block';\n}, false);\n\nwindow.addEventListener('quicktube:pause', () =\u003e {\n    showingItem.style.display = 'none';\n}, false);\n```\n\n### Advanced\n\n#### Usage with [CSP (Content Security Policy)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) headers\n\nQuicktube's code relies on the YouTube and Vimeo APIs (depending on which provider is used), for which origins need to be whitelisted in order to work with CSP.\n\nFor YouTube, whitelist the following:\n\n```yaml\n# As script-src:\nhttps://www.youtube.com\nhttps://s.ytimg.com\n\n# As frame-src:\nhttps://www.youtube.com\n```\n\nAnd for Vimeo:\n\n```yaml\n# As script-src:\nhttps://player.vimeo.com\n\n# As `frame-src:\nhttps://player.vimeo.com\n```\n\nNote that the following are based on origins of the API scripts, and (undocumented) origins loaded by those scripts, as observed on our [online demo](https://springload.github.io/quicktube/).\n\n## Development\n\n### Install\n\n\u003e Clone the project on your computer, and install [Node](https://nodejs.org). This project also uses [nvm](https://github.com/creationix/nvm).\n\n```sh\nnvm install\n# Then, install all project dependencies.\nnpm install\n```\n\n\n### Releases\n\n- Make a new branch for the release of the new version.\n- Update the [CHANGELOG](CHANGELOG.md).\n- Update the version number in `package.json`, following semver.\n- Make a PR and squash merge it.\n- Back on master with the PR merged, follow the instructions below.\n\n```sh\nnpm run dist\n# Use irish-pub to check the package content. Install w/ npm install -g first.\nirish-pub\nnpm publish\n```\n\n- Finally, go to GitHub and create a release and a tag for the new version.\n- Done!\n\n\n## Documentation\n\n- [Vimeo Player API](https://github.com/vimeo/player.js)\n- [YouTube iFrame Player API](https://developers.google.com/youtube/iframe_api_reference)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringload%2Fquicktube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringload%2Fquicktube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringload%2Fquicktube/lists"}