{"id":24846276,"url":"https://github.com/mefistosss/sirv-media-viewer-script","last_synced_at":"2025-03-26T08:45:47.457Z","repository":{"id":57689222,"uuid":"475810586","full_name":"Mefistosss/sirv-media-viewer-script","owner":"Mefistosss","description":"Add Sirv Media Viewer script to page","archived":false,"fork":false,"pushed_at":"2022-04-03T11:53:35.000Z","size":141,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T19:28:41.454Z","etag":null,"topics":["browser","loader","npm-module","script","sirv","viewer"],"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/Mefistosss.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-30T09:33:56.000Z","updated_at":"2022-04-03T11:32:08.000Z","dependencies_parsed_at":"2022-09-26T22:20:35.456Z","dependency_job_id":null,"html_url":"https://github.com/Mefistosss/sirv-media-viewer-script","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mefistosss%2Fsirv-media-viewer-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mefistosss%2Fsirv-media-viewer-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mefistosss%2Fsirv-media-viewer-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mefistosss%2Fsirv-media-viewer-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mefistosss","download_url":"https://codeload.github.com/Mefistosss/sirv-media-viewer-script/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245623017,"owners_count":20645679,"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":["browser","loader","npm-module","script","sirv","viewer"],"created_at":"2025-01-31T10:19:28.413Z","updated_at":"2025-03-26T08:45:47.434Z","avatar_url":"https://github.com/Mefistosss.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sirv Media Viewer script loader\n\n[![Test](https://github.com/Mefistosss/sirv-media-viewer-script/actions/workflows/test.yml/badge.svg)](https://github.com/Mefistosss/sirv-media-viewer-script/actions/workflows/test.yml)\n\nYou can add Sirv Media Viewer script to your page as the [documentation](https://sirv.com/help/articles/sirv-media-viewer/) recommends or you can use this module.\n\nThis module adds Sirv Media Viewer script to page once.\n\n\n## install\n```\nnpm install --save sirv-media-viewer-script\n```\n## usage\n```\nimport loadSMVScript from 'sirv-media-viewer-script';\n\nloadSMVScript().then((sirv) =\u003e {\n\t// script is loaded\n});\n\n```\n## API\n### `promise = loadSMVScript([attrs], [parentNode])`\nAppend a `\u003cscript\u003e` node with `'https://scripts.sirv.com/sirvjs/v3/sirv.js'` URL to the `\u003chead\u003e` element in the DOM.\n\n#### `attrs` (optional)\nMore about it you can find [here](https://www.npmjs.com/package/load-script2#attrs-optional)\n\n#### `parentNode` (optional)\nMore about it you can find [here](https://www.npmjs.com/package/load-script2#parentnode-optional)\n\n#### `promise`\nReturns a promise which resolves to the `sirv` object, or rejects with `err` if any occurred.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmefistosss%2Fsirv-media-viewer-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmefistosss%2Fsirv-media-viewer-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmefistosss%2Fsirv-media-viewer-script/lists"}