{"id":26601953,"url":"https://github.com/patrickmarabeas/ng-youtubeapi.js","last_synced_at":"2025-08-09T21:06:45.515Z","repository":{"id":12330092,"uuid":"14968775","full_name":"patrickmarabeas/ng-YouTubeAPI.js","owner":"patrickmarabeas","description":"Implementing the YouTube API with AngularJS","archived":false,"fork":false,"pushed_at":"2014-02-04T17:44:06.000Z","size":147,"stargazers_count":8,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T18:53:03.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://patrickmarabeas.github.io/ng-YouTubeAPI.js","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/patrickmarabeas.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":null,"support":null}},"created_at":"2013-12-05T23:33:46.000Z","updated_at":"2015-07-09T00:22:47.000Z","dependencies_parsed_at":"2022-09-10T16:33:08.807Z","dependency_job_id":null,"html_url":"https://github.com/patrickmarabeas/ng-YouTubeAPI.js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickmarabeas%2Fng-YouTubeAPI.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickmarabeas%2Fng-YouTubeAPI.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickmarabeas%2Fng-YouTubeAPI.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickmarabeas%2Fng-YouTubeAPI.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickmarabeas","download_url":"https://codeload.github.com/patrickmarabeas/ng-YouTubeAPI.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248069175,"owners_count":21042632,"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":[],"created_at":"2025-03-23T18:46:58.655Z","updated_at":"2025-04-09T16:42:32.405Z","avatar_url":"https://github.com/patrickmarabeas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ng-YouTubeAPI.js\n\n### Implementing the YouTube API with AngularJS.\n\nThis implementation comes with three directives for different functionality. This implementation is also specifically designed to handle multiple players on one page - there's nothing stopping you from simply using one however.\n\n#### The ytPlayer Directive\n\n\t\u003cdiv data-yt-player=\"myPlayer\" data-yt-vid=\"MyYouTubeVideoID\" data-yt-playervars=\"{'modestbranding': 1}\"\u003e\u003c/div\u003e\n\nThis baby is the actual video player. Give it an ID and the video you want it to load with. You can have as many of these on the page as you wish, just be sure to give each a unique ID.\n\nCrack ng-YouTubeAPI.js open and alter the template as you require.\n\nYou can see the full list of player vars here: https://developers.google.com/youtube/player_parameters?playerVersion=HTML5#Parameters\n\n#### The ytPlayto Directive\n\n\t\u003cdiv data-yt-playto=\"myPlayer\" data-yt-vid=\"anotherVideoID\"\u003e\u003c/div\u003e\n\nThis directive allows you to load another video into the stipulated player. Alter the template as needed. Feel free to strip out the $http call if you want to define the video name yourself.\n\nBut the API has `loadVideoById()`??? If you don't need to return any video data, feel free to use it.\n\n#### The ytSpy Directive\n\n\t\u003cdiv data-yt-spy=\"myPlayer\" data-yt-value=\"title\"\u003e\u003c/div\u003e\n\nThis directive allows you to spy on the player in question and retrieve data about it, outside of any template scope. Want your player and 'what's playing now' data in completely different areas? Use this instead, or as well as, the template found in the ytPlayer directive.\n\n#### API Functions\n\nAll the YouTube API functions can be called by passing in the constructor service to your custom directives / controllers:\n\n\tconstructor.players['myPlayer'].playVideo();\n\nThey can all be found here: https://developers.google.com/youtube/iframe_api_reference#Playback_controls","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickmarabeas%2Fng-youtubeapi.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickmarabeas%2Fng-youtubeapi.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickmarabeas%2Fng-youtubeapi.js/lists"}