{"id":19177830,"url":"https://github.com/eyevinn/hls-query","last_synced_at":"2026-06-20T20:30:17.622Z","repository":{"id":38522788,"uuid":"434299192","full_name":"Eyevinn/hls-query","owner":"Eyevinn","description":"Library for appending query params on each media segment URL","archived":false,"fork":false,"pushed_at":"2022-06-23T11:58:55.000Z","size":430,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-02-04T04:54:09.403Z","etag":null,"topics":["library"],"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/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":"2021-12-02T16:41:01.000Z","updated_at":"2023-05-03T00:36:10.000Z","dependencies_parsed_at":"2022-09-05T00:03:36.769Z","dependency_job_id":null,"html_url":"https://github.com/Eyevinn/hls-query","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fhls-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fhls-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fhls-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eyevinn%2Fhls-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eyevinn","download_url":"https://codeload.github.com/Eyevinn/hls-query/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240254774,"owners_count":19772484,"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:24.509Z","updated_at":"2026-06-20T20:30:17.561Z","avatar_url":"https://github.com/Eyevinn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hls-query\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Slack](http://slack.streamingtech.se/badge.svg)](http://slack.streamingtech.se)\n\nNode library to append query params on each media segment URL in a media playlist\n\n## Installation\n\n```\nnpm install --save @eyevinn/hls-query\n```\n\n## Usage\n\n```javascript\nconst { HLSMultiVariant, HLSMediaPlaylist } = require(\"@eyevinn/hls-query\");\nconst params = new URLSearchParams({ token: \"TOKEN\" });\nconst multiVariant = new HLSMultiVariant({ \n  url: new URL(\"https://lab.cdn.eyevinn.technology/sto-slate.mp4/manifest.m3u8\") \n}, params);\nawait multiVariant.fetch();\n\nconst mediaPlaylist = new HLSMediaPlaylist({ url: multiVariant.streamURLs[0] }, params);\n// multiVariant.streamURLs[0].href === \"https://lab.cdn.eyevinn.technology/sto-slate.mp4/manifest_1.m3u8?token=TOKEN\"\nawait mediaPlaylist.fetch();\n\nconsole.log(mediaPlaylist.toString());\n// #EXTM3U\n// #EXT-X-VERSION:3\n// #EXT-X-TARGETDURATION:10\n// #EXT-X-MEDIA-SEQUENCE:1\n// #EXT-X-PLAYLIST-TYPE:VOD\n// #EXTINF:10.0000,\n// manifest_1_00001.ts?token=TOKEN\n// #EXT-X-ENDLIST\n```\n\nIt is also possible to apply a function that should be applied on each item in a multivariant or media playlist.\n\n```javascript\nlet i = 0;\nconst mediaPlaylist = new HLSMediaPlaylist({ url: multiVariant.streamURLs[0] }, \n  (uri) =\u003e new URLSearchParams({ i: `${i++}` }));\nawait mediaPlaylist.fetch();\n\nconsole.log(mediaPlaylist.toString());\n// #EXTM3U\n// #EXT-X-VERSION:3\n// #EXT-X-TARGETDURATION:10\n// #EXT-X-MEDIA-SEQUENCE:1\n// #EXT-X-PLAYLIST-TYPE:VOD\n// #EXTINF:10.0000,\n// manifest_1_00001.ts?i=0\n// manifest_1_00002.ts?i=1\n// #EXT-X-ENDLIST\n```\n\n# About Eyevinn Technology\n\nEyevinn Technology is an independent consultant firm specialized in video and streaming. Independent in a way 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 give 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!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyevinn%2Fhls-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyevinn%2Fhls-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyevinn%2Fhls-query/lists"}