https://github.com/videojs/vhs-utils
Objects and functions shared throughout @videojs/http-streaming code
https://github.com/videojs/vhs-utils
Last synced: 11 months ago
JSON representation
Objects and functions shared throughout @videojs/http-streaming code
- Host: GitHub
- URL: https://github.com/videojs/vhs-utils
- Owner: videojs
- License: mit
- Created: 2019-08-16T16:26:38.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-07-10T06:53:17.000Z (almost 2 years ago)
- Last Synced: 2025-07-08T02:13:37.626Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.47 MB
- Stars: 7
- Watchers: 20
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
- [@videojs/vhs-utils](#videojsvhs-utils)
- [Installation](#installation)
- [Usage](#usage)
# @videojs/vhs-utils
vhs-utils serves two purposes:
1. It extracts objects and functions shared throughout @videojs/http-streaming code to save on package size. See [the original @videojs/http-streaming PR](https://github.com/videojs/http-streaming/pull/637) for details.
2. It exports generic functions from VHS that may be useful to plugin authors.
## Installation
```sh
npm install --save @videojs/vhs-utils
```
## Usage
All utility functions are published under dist and can be required/imported like so:
> es import using es dist
```js
import resolveUrl from '@videojs/vhs-utils/es/resolve-url';
```
> cjs import using cjs dist
```js
const resolveUrl = require('@videojs/vhs-utils/cjs/resolve-url');
```
> depricated cjs dist
```js
const resolveUrl = require('@videojs/vhs-utils/dist/resolve-url');
```