{"id":19177902,"url":"https://github.com/eyevinn/media-session-manager","last_synced_at":"2026-06-17T03:31:43.602Z","repository":{"id":57682194,"uuid":"473167049","full_name":"Eyevinn/media-session-manager","owner":"Eyevinn","description":" A small package to apply data as well as initiate handlers for the Media Session API","archived":false,"fork":false,"pushed_at":"2022-03-23T12:27:46.000Z","size":138,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T00:24:02.253Z","etag":null,"topics":["library"],"latest_commit_sha":null,"homepage":"","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/Eyevinn.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":"2022-03-23T11:56:34.000Z","updated_at":"2023-05-03T00:36:39.000Z","dependencies_parsed_at":"2022-09-10T15:02:05.134Z","dependency_job_id":null,"html_url":"https://github.com/Eyevinn/media-session-manager","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fmedia-session-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fmedia-session-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fmedia-session-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fmedia-session-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eyevinn","download_url":"https://codeload.github.com/Eyevinn/media-session-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240254788,"owners_count":19772486,"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":["library"],"created_at":"2024-11-09T10:35:42.675Z","updated_at":"2026-06-17T03:31:43.566Z","avatar_url":"https://github.com/Eyevinn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Media Session Manager\n===\n\nA small package to apply data as well as initiate handlers for the [Media Session API](https://developer.mozilla.org/en-US/docs/Web/API/MediaSession) implemented by most browsers on both desktop and mobile to visualize content playing.\n\n![media session manager visualisation](https://web-dev.imgix.net/image/admin/qwTz64KKq4rq7WeA3rlT.jpg?auto=format\u0026w=1600)\n\n**Valuable Resources**\n\n- [Customize media notifications and playback controls with the Media Session API](https://web.dev/media-session/)\n- [MDN MediaSession API Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaSession)\n\n## Simple Usage\n\n```js\nimport { MediaSessionManager } from \"@eyevinn/media-session-manager\";\n\ndocument.addEventListener(\"DOMContentLoaded\", () =\u003e {\n  const videoElement = document.querySelector(\"video\");\n\n  const metadata = {\n    title: \"Demo Video\",\n    siteName: \"Eyevinn Demo Site\",\n    artwork: [\n      {\n        src: \"https://via.placeholder.com/512?text=Eyevinn\",\n        sizes: \"512x512\",\n        type: \"image/png\",\n      },\n    ],\n  };\n  new MediaSessionManager(videoElement, metadata);\n});\n```\n\nThe constructor takes three arguments\n\n- **video element**\n- [**metadata**](#metadata)\n- **isLive**, boolean that defaults to false (being vod)\n\n### Metadata\n\n```typescript\ninterface MediaSessionMetadata {\n  title: string;\n  siteName: string;\n  pageName?: string;\n  artwork: Artwork[];\n}\n\ninterface Artwork {\n  src: string;\n  sizes: string; // ex \"512x512\" as string, width x height\n  type: \"image/jpeg\" | \"image/png\";\n}\n```\n\n## About Eyevinn Technology\n\nEyevinn Technology is an independent consultant firm specialized in video and streaming. Independent in the sense that we are not commercially tied to any platform or technology vendor.\n\nAt Eyevinn, every software developer consultant has a dedicated budget reserved for open source development and contribution to the open source community. This gives us room for innovation, team building and personal competence development. And also gives us as a company a way to contribute back to the open source community.\n\nWant to know more about Eyevinn and how it is to work here. Contact us at work@eyevinn.se!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyevinn%2Fmedia-session-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyevinn%2Fmedia-session-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyevinn%2Fmedia-session-manager/lists"}