{"id":49998081,"url":"https://github.com/meigo/svelte-video-player","last_synced_at":"2026-05-19T08:25:38.378Z","repository":{"id":42085468,"uuid":"328612980","full_name":"meigo/svelte-video-player","owner":"meigo","description":"Basic video player component for svelte","archived":false,"fork":false,"pushed_at":"2026-04-03T16:10:39.000Z","size":994,"stargazers_count":138,"open_issues_count":0,"forks_count":22,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-04-18T17:13:49.638Z","etag":null,"topics":["javascript","svelte","typescript","video","videoplayer"],"latest_commit_sha":null,"homepage":"","language":"Svelte","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/meigo.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":"2021-01-11T09:32:16.000Z","updated_at":"2026-04-10T02:24:04.000Z","dependencies_parsed_at":"2024-06-19T09:17:04.027Z","dependency_job_id":"66703fe4-0ee3-4fd8-b7df-9e17a9230465","html_url":"https://github.com/meigo/svelte-video-player","commit_stats":{"total_commits":65,"total_committers":1,"mean_commits":65.0,"dds":0.0,"last_synced_commit":"1a2bd325b9a1d45ab459af72aa20185744953e62"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meigo/svelte-video-player","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meigo%2Fsvelte-video-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meigo%2Fsvelte-video-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meigo%2Fsvelte-video-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meigo%2Fsvelte-video-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meigo","download_url":"https://codeload.github.com/meigo/svelte-video-player/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meigo%2Fsvelte-video-player/sbom","scorecard":{"id":635440,"data":{"date":"2025-08-11","repo":{"name":"github.com/meigo/svelte-video-player","commit":"1a2bd325b9a1d45ab459af72aa20185744953e62"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: licence:0","Info: FSF or OSI recognized license: MIT License: licence:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"19 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-wv8q-r932-8hc7","Warn: Project is vulnerable to: GHSA-8266-84wp-wv5c","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T09:02:41.142Z","repository_id":42085468,"created_at":"2025-08-21T09:02:41.142Z","updated_at":"2025-08-21T09:02:41.142Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33208150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:54:09.561Z","status":"ssl_error","status_checked_at":"2026-05-19T07:54:08.508Z","response_time":58,"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":["javascript","svelte","typescript","video","videoplayer"],"created_at":"2026-05-19T08:25:33.676Z","updated_at":"2026-05-19T08:25:38.366Z","avatar_url":"https://github.com/meigo.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./static/svp_animated.svg\" alt=\"SVP logo\" width=\"200\" /\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://npmjs.org/package/svelte-video-player\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/svelte-video-player?style=flat-square\" alt=\"version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/svelte-video-player\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/svelte-video-player?style=flat-square\" alt=\"licence\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/svelte-video-player\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/dependencies-0-green?style=flat-square\" alt=\"dependencies\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.org/package/svelte-video-player\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/types/typescript?style=flat-square\" alt=\"typescript\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n# Svelte Video Player\n\nA video player component for Svelte 5 with HLS/DASH streaming, subtitles, picture-in-picture, playback rate control, quality selection, and Media Session API support.\n\nControls are fully keyboard-accessible. Starting a player pauses any previously playing instance. Fullscreen is disabled on iPhone but works on other mobile and desktop browsers.\n\n## Demo\n\nhttps://svelte-video-player.netlify.app/\n\n## Installation\n\n```bash\nnpm install svelte-video-player\n```\n\nRequires Svelte 5.\n\n## Usage\n\nProvide `width` and `height` props matching the video's real dimensions to calculate the correct aspect ratio and prevent [CLS](https://web.dev/cls/). The player's actual size is determined by its parent element.\n\n```svelte\n\u003cscript\u003e\n  import VideoPlayer from 'svelte-video-player';\n\u003c/script\u003e\n\n\u003cVideoPlayer\n  poster=\"https://example.com/poster.jpg\"\n  source=\"https://example.com/video.mp4\"\n/\u003e\n```\n\n### Multiple sources\n\nPass an array to provide fallback formats:\n\n```svelte\n\u003cVideoPlayer\n  source={['video.mp4', 'video.webm']}\n/\u003e\n```\n\n### HLS streaming\n\nHLS streams are auto-detected from `.m3u8` URLs. [hls.js](https://github.com/video-dev/hls.js) is lazy-loaded only when needed.\n\n```svelte\n\u003cVideoPlayer source=\"https://example.com/stream.m3u8\" /\u003e\n```\n\n### DASH streaming\n\nDASH streams are auto-detected from `.mpd` URLs. [dashjs](https://github.com/Dash-Industry-Forum/dash.js) is lazy-loaded only when needed.\n\n```svelte\n\u003cVideoPlayer source=\"https://example.com/stream.mpd\" /\u003e\n```\n\n### Subtitles / Captions\n\nA CC toggle button appears automatically when tracks are provided. Track selection is available in the settings menu. The `crossorigin` attribute is set automatically when tracks are present.\n\n```svelte\n\u003cVideoPlayer\n  source=\"video.mp4\"\n  tracks={[\n    { src: '/subs/en.vtt', srclang: 'en', label: 'English', default: true },\n    { src: '/subs/es.vtt', srclang: 'es', label: 'Spanish' }\n  ]}\n/\u003e\n```\n\n### Chapters\n\n```svelte\n\u003cVideoPlayer\n  source=\"video.mp4\"\n  chapters={[\n    { time: 0, label: 'Intro' },\n    { time: 60, label: 'Chapter 1' },\n    { time: 180, label: 'Chapter 2' }\n  ]}\n/\u003e\n```\n\n### Media Session\n\nIntegrate with the browser's Media Session API for OS-level media controls:\n\n```svelte\n\u003cVideoPlayer\n  source=\"video.mp4\"\n  mediaSession={{\n    title: 'My Video',\n    artist: 'Author',\n    album: 'Collection',\n    artwork: [{ src: '/art.jpg', sizes: '512x512', type: 'image/jpeg' }]\n  }}\n/\u003e\n```\n\n## Props\n\n| Prop | Type | Default | Description |\n|:-----|:-----|:--------|:------------|\n| `width` | `number \\| string` | `1920` | Real video width for aspect ratio calculation |\n| `height` | `number \\| string` | `1080` | Real video height for aspect ratio calculation |\n| `poster` | `string` | `''` | Poster image URL |\n| `source` | `string \\| string[]` | `''` | Video source URL(s) — supports `mp4`, `webm`, `ogg`, `m3u8`, `mpd` |\n| `loop` | `boolean` | `false` | Loop playback |\n| `autoplay` | `boolean` | `false` | Autoplay on load |\n| `playsinline` | `boolean` | `true` | Play inline on mobile |\n| `preload` | `string` | `'metadata'` | Preload behavior (`none`, `metadata`, `auto`) |\n| `crossorigin` | `string` | `undefined` | CORS mode (auto-set to `anonymous` when tracks are provided) |\n| `skipSeconds` | `number \\| string` | `5` | Seconds to skip with arrow keys |\n| `controlsOnPause` | `boolean` | `true` | Show controls when paused |\n| `timeDisplay` | `boolean` | `true` | Show current time / duration |\n| `remainingTime` | `boolean` | `false` | Show remaining time instead of current time |\n| `playbackRateControl` | `boolean` | `true` | Enable playback rate control in settings menu |\n| `tracks` | `TextTrackConfig[]` | `[]` | Subtitle/caption tracks |\n| `chapters` | `Chapter[]` | `[]` | Chapter markers on the progress bar |\n| `mediaSession` | `MediaSessionConfig` | `undefined` | Media Session API metadata |\n| `currentTime` | `number` | `0` | Bindable. Use `bind:currentTime` to read playback position or seek by writing to it. |\n\n### Styling props\n\n| Prop | Type | Default | Description |\n|:-----|:-----|:--------|:------------|\n| `color` | `string` | `'#FF3E00'` | Main color of controls |\n| `playerBgColor` | `string` | `'black'` | Player background color |\n| `iconColor` | `string` | `'white'` | Button icon color |\n| `focusColor` | `string` | `'white'` | Focus outline color |\n| `barsBgColor` | `string` | `'white'` | Track background color |\n| `borderColor` | `string` | `'none'` | Player border color (set to a color value to show border) |\n| `controlsHeight` | `string` | `'55px'` | Height of bottom control bar |\n| `trackHeight` | `string` | `'4px'` | Height of playbar and volume tracks |\n| `thumbSize` | `string` | `'15px'` | Size of slider thumbs |\n| `centerIconSize` | `string` | `'60px'` | Size of center play icon |\n| `borderRadius` | `string` | `'8px'` | Player corner radius |\n| `buttonBorderRadius` | `string` | `'50%'` | Button corner radius |\n\n## Keyboard shortcuts\n\n| Key | Action |\n|:----|:-------|\n| Space | Play / Pause |\n| Left / Right arrow | Skip backward / forward |\n| Tab | Navigate controls |\n| Enter / Space | Activate focused control |\n| Escape | Close settings menu |\n| \u003c / \u003e | Decrease / Increase playback rate |\n\n## SSR\n\nThe component renders a server-side placeholder matching the video's aspect ratio. The full player hydrates on the client.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeigo%2Fsvelte-video-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeigo%2Fsvelte-video-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeigo%2Fsvelte-video-player/lists"}