{"id":23576041,"url":"https://github.com/theoplayer/samples-angular","last_synced_at":"2026-02-13T21:09:28.537Z","repository":{"id":38584185,"uuid":"249669496","full_name":"THEOplayer/samples-angular","owner":"THEOplayer","description":"A sample app integrating THEOplayer.js as an Angular component.","archived":false,"fork":false,"pushed_at":"2023-01-07T16:20:21.000Z","size":820,"stargazers_count":1,"open_issues_count":29,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T07:38:49.581Z","etag":null,"topics":["angular","angularjs","theoplayer","video-player"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/THEOplayer.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}},"created_at":"2020-03-24T09:48:19.000Z","updated_at":"2024-09-06T06:11:10.000Z","dependencies_parsed_at":"2023-02-07T15:31:04.568Z","dependency_job_id":null,"html_url":"https://github.com/THEOplayer/samples-angular","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/THEOplayer/samples-angular","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THEOplayer%2Fsamples-angular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THEOplayer%2Fsamples-angular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THEOplayer%2Fsamples-angular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THEOplayer%2Fsamples-angular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/THEOplayer","download_url":"https://codeload.github.com/THEOplayer/samples-angular/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THEOplayer%2Fsamples-angular/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29417724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","angularjs","theoplayer","video-player"],"created_at":"2024-12-26T21:11:50.244Z","updated_at":"2026-02-13T21:09:28.504Z","avatar_url":"https://github.com/THEOplayer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# THEOplayer Angular Sample\n\n## License\n\nThis projects falls under the license as defined in https://github.com/THEOplayer/license-and-disclaimer.\n\n## Step-by-step guide:\n\nNote that this information is for a basic player in a local testing environment. Additional information may be needed for specific cases.\n\n1. Make sure you have the Angular CLI installed\n\n```\nnpm install -g @angular/cli\n```\n\n2. If needed, create a new workspace and initial application\n   ng new appname\n\n3. In the root project, create a new component for the player (in this case appname)\n\n```\ncd appname\nng generate component theoplayer\n```\n\n4. add the THEOplayer.js files to the root project\n5. In index.html add the /THEOplayer.js as a script tag and /ui.css as a stylesheet\n6. In theoplayer.component.html add\n\n```\n\u003cdiv class=\"theoplayer-container video-js theoplayer-skin\"\u003e\u003c/div\u003e\n```\n\n7. In theoplayer.component.ts add\n\n```\nimport { Component, OnInit } from '@angular/core';\nimport * as THEOplayer from '../../../THEOplayer.js';\n\n@Component({\n  selector: 'app-theoplayer',\n  templateUrl: './theoplayer.component.html',\n  styleUrls: ['./theoplayer.component.css']\n})\nexport class TheoplayerComponent implements OnInit {\n\n  constructor() { }\n\n  ngOnInit() {\n    this.createPlayer();\n  }\n\n  createPlayer() {\n    const element = document.querySelector('.theoplayer-container');\n\n    const player = new THEOplayer.Player(element, {\n      libraryLocation : ''\n    });\n\n    player.source = {\n     sources : [{\n         src : '//cdn.theoplayer.com/video/elephants-dream/playlist.m3u8',\n         type : 'application/x-mpegurl' // sets type to MPEG-DASH\n     }]\n };\n  }\n}\n```\n\nThen\n\n```\nimport * as THEOplayer from '../../../THEOplayer.js;\n```\n\nwill make sure to get everything needed from our sdk.\n\n9. In app.component.html add the following code to display the player in the app component.\n\n```\n\u003capp-theoplayer\u003e\u003c/app-theoplayer\u003e\n```\n\n10. Profit.\n\n## Related articles\n\nhttps://angular.io/guide/quickstart\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheoplayer%2Fsamples-angular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheoplayer%2Fsamples-angular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheoplayer%2Fsamples-angular/lists"}