{"id":13470797,"url":"https://github.com/videojs/videojs-youtube","last_synced_at":"2025-12-12T04:01:20.868Z","repository":{"id":7866247,"uuid":"9238613","full_name":"videojs/videojs-youtube","owner":"videojs","description":"YouTube playback technology for Video.js","archived":false,"fork":false,"pushed_at":"2024-06-11T16:40:13.000Z","size":889,"stargazers_count":1147,"open_issues_count":100,"forks_count":546,"subscribers_count":62,"default_branch":"main","last_synced_at":"2025-04-02T08:17:30.351Z","etag":null,"topics":["javascript","tech","video","video-option","videojs","youtube","youtube-controls","youtube-playback"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/videojs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2013-04-05T10:08:03.000Z","updated_at":"2025-03-27T22:15:58.000Z","dependencies_parsed_at":"2024-01-21T09:48:00.480Z","dependency_job_id":"6872da16-b963-4d0f-9d55-fa6a14f3bc72","html_url":"https://github.com/videojs/videojs-youtube","commit_stats":{"total_commits":443,"total_committers":66,"mean_commits":6.712121212121212,"dds":"0.35214446952595935","last_synced_commit":"3650587fdc774c566d2b89349383bb3c0bced08b"},"previous_names":["exon/videojs-youtube"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fvideojs-youtube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fvideojs-youtube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fvideojs-youtube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fvideojs-youtube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/videojs","download_url":"https://codeload.github.com/videojs/videojs-youtube/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246777821,"owners_count":20832033,"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","tech","video","video-option","videojs","youtube","youtube-controls","youtube-playback"],"created_at":"2024-07-31T16:00:36.077Z","updated_at":"2025-12-12T04:01:15.583Z","avatar_url":"https://github.com/videojs.png","language":"JavaScript","funding_links":[],"categories":["react-awesome-player"],"sub_categories":["videojs plugins"],"readme":"# YouTube Playback Technology\u003cbr /\u003efor [Video.js](https://github.com/videojs/video.js)\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/videojs/videojs-youtube.svg)](https://greenkeeper.io/)\n\n## Install\nYou can use bower (`bower install videojs-youtube`), npm (`npm install videojs-youtube`) or the source and build it using `npm run build`. Then, the only file you need is dist/Youtube.min.js.\n\n## Version Note\nUse branch `vjs4` if you still using old VideoJS `v4.x`.\n\n## Example\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003clink type=\"text/css\" rel=\"stylesheet\" href=\"../node_modules/video.js/dist/video-js.min.css\" /\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cvideo\n    id=\"vid1\"\n    class=\"video-js vjs-default-skin\"\n    controls\n    autoplay\n    width=\"640\" height=\"264\"\n    data-setup='{ \"techOrder\": [\"youtube\"], \"sources\": [{ \"type\": \"video/youtube\", \"src\": \"https://www.youtube.com/watch?v=xjS6SftYQaQ\"}] }'\n  \u003e\n  \u003c/video\u003e\n\n  \u003cscript src=\"../node_modules/video.js/dist/video.min.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"../dist/Youtube.min.js\"\u003e\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nSee the examples folder for more\n\n## How does it work?\nIncluding the script Youtube.min.js will add the YouTube as a tech. You just have to add it to your techOrder option. Then, you add the option src with your YouTube URL.\n\nIt supports:\n- youtube.com as well as youtu.be\n- Regular URLs: http://www.youtube.com/watch?v=xjS6SftYQaQ\n- Embeded URLs: http://www.youtube.com/embed/xjS6SftYQaQ\n- Playlist URLs: http://www.youtube.com/playlist?list=PLA60DCEB33156E51F OR http://www.youtube.com/watch?v=xjS6SftYQaQ\u0026list=SPA60DCEB33156E51F\n\n## Options\nIt supports every regular Video.js options. Additionally, you can change any [YouTube parameter](https://developers.google.com/youtube/player_parameters?hl=en#Parameters). Here is an example of setting the `iv_load_policy` parameter to `1`.\n\n```html\n\u003cvideo\n  id=\"vid1\"\n  class=\"video-js vjs-default-skin\"\n  controls\n  autoplay\n  width=\"640\" height=\"264\"\n  data-setup='{ \"techOrder\": [\"youtube\"], \"sources\": [{ \"type\": \"video/youtube\", \"src\": \"https://www.youtube.com/watch?v=xjS6SftYQaQ\"}], \"youtube\": { \"iv_load_policy\": 1 } }'\n\u003e\n\u003c/video\u003e\n```\n\n### YouTube controls\nBecause `controls` is already a Video.js option, to use the YouTube controls, you must set the `ytControls` parameter.\n\n```html\n\u003cvideo\n  id=\"vid1\"\n  class=\"video-js vjs-default-skin\"\n  controls\n  autoplay\n  width=\"640\" height=\"264\"\n  data-setup='{ \"techOrder\": [\"youtube\"], \"sources\": [{ \"type\": \"video/youtube\", \"src\": \"https://www.youtube.com/watch?v=xjS6SftYQaQ\"}], \"youtube\": { \"ytControls\": 2 } }'\n\u003e\n\u003c/video\u003e\n```\n\n### Custom Player Options\nIf you need to set any additional options on the YouTube player, you may do so with the `customVars` parameter:\n\n```html\n\u003cvideo\n  id=\"vid1\"\n  class=\"video-js vjs-default-skin\"\n  controls\n  autoplay\n  width=\"640\" height=\"264\"\n  data-setup='{ \"techOrder\": [\"youtube\"], \"sources\": [{ \"type\": \"video/youtube\", \"src\": \"https://www.youtube.com/watch?v=xjS6SftYQaQ\"}], \"youtube\": { \"customVars\": { \"wmode\": \"transparent\" } } }'\n\u003e\n\u003c/video\u003e\n```\n\n## Special Thank You\nThanks to Steve Heffernan for the amazing Video.js and to John Hurliman for the original version of the YouTube tech\n\n## License\nThe MIT License (MIT)\n\nCopyright (c) Benoit Tremblay \u003ctrembl.ben@gmail.com\u003e and videojs-youtube contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvideojs%2Fvideojs-youtube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvideojs%2Fvideojs-youtube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvideojs%2Fvideojs-youtube/lists"}