{"id":37386810,"url":"https://github.com/codd-tech/video-ad-sdk-web","last_synced_at":"2026-01-16T05:22:10.011Z","repository":{"id":262850370,"uuid":"888558952","full_name":"codd-tech/video-ad-sdk-web","owner":"codd-tech","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-21T13:18:34.000Z","size":235,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-14T01:57:52.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/codd-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2024-11-14T15:53:45.000Z","updated_at":"2025-05-21T13:18:39.000Z","dependencies_parsed_at":"2024-12-16T19:30:49.670Z","dependency_job_id":"80631eb4-1e72-4d62-a871-3e925bc56ccf","html_url":"https://github.com/codd-tech/video-ad-sdk-web","commit_stats":null,"previous_names":["codd-tech/video-ad-sdk-web"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codd-tech/video-ad-sdk-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codd-tech%2Fvideo-ad-sdk-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codd-tech%2Fvideo-ad-sdk-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codd-tech%2Fvideo-ad-sdk-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codd-tech%2Fvideo-ad-sdk-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codd-tech","download_url":"https://codeload.github.com/codd-tech/video-ad-sdk-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codd-tech%2Fvideo-ad-sdk-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: 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":[],"created_at":"2026-01-16T05:22:09.309Z","updated_at":"2026-01-16T05:22:09.994Z","avatar_url":"https://github.com/codd-tech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Video AD Player SDK Documentation\n\n## Overview\n\nThe Video AD Player SDK provides a simple interface for initializing and displaying video ads in your application.\nImport the SDK and use its functions to integrate video ads with customizable skip settings and callback methods for\nhandling the completion of ads.\n\n## Installation\n\nTo use this SDK, first install it in your project:\n\n```bash\nnpm install @teleads/tma-sdk\n```\n\nor\n\n```bash\nyarn add @teleads/tma-sdk\n```\n\n## Quick Start\n\nImport the SDK into your file and initialize the app using the provided token.\n\n```typescript\nimport TeleAdsTMA from '@teleads/tma-sdk';\n\n// Initialize the TeleAds SDK for TMA using the SDK token\nTeleAdsTMA.init('YOUR_SDK_TOKEN');\n\n// Show advertising\nTeleAdsTMA.showAD({\n  adUnitId: 'AD_UNIT_ID',\n  onVideoEnded: (status) =\u003e {\n    console.log(`Ad ended with status: ${status}`);\n  },\n});\n```\n\n### Also, you can use Promises\n\nFirst, ensure that you've set up the SDK as usual:\n\n```typescript\nimport TeleAdsTMA from '@teleads/tma-sdk';\n\n// Initialize the TeleAds SDK for TMA using the SDK token\nTeleAdsTMA.init('YOUR_SDK_TOKEN');\n\n// Show advertising with Promise-like API\nTeleAdsTMA.showAD({\n  adUnitId: 'AD_UNIT_ID'\n}).then(status =\u003e {\n  console.log(`Ad ended with status: ${status}`);\n}).catch(error =\u003e {\n  console.error('Ad failed to show:', error);\n});\n```\n\n## API Overview\n\n### Methods\n\n### `init(token: string): void`\n\nInitializes the application with the provided token.\n\n- **token** (string): Your API token for initializing the SDK.\n\n### `showAD(options: ShowAdOptions): void`\n\nDisplays a video with the specified options.\n\n- **options** (`ShowAdOptions`): An object containing options for displaying the video.\n\n## Interfaces\n\n### `ShowAdOptions`\n\nOptions for displaying the video.\n\n- **adUnitId** (`string`): The ad unit id to be displayed.\n- **onEnded** (function, optional): A callback invoked when the video ends.\n    - Accepts values: `'skipped'` | `'closed'`\n- **onClick** (function, optional): A callback invoked when the user clicked on AD.\n\n## Types\n\n### `VideoPlayedStatus`\n\nThe status of the completed video.\n\n- Values: `'skipped'`, `'closed'`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodd-tech%2Fvideo-ad-sdk-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodd-tech%2Fvideo-ad-sdk-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodd-tech%2Fvideo-ad-sdk-web/lists"}