Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add request package (CommonMediaRequest and CommonMediaResponse) #18

Merged
merged 47 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
bc1111c
Add request package (CommonMediaRequest and CommonMediaResponse)
bbert May 17, 2023
645aa1e
Newline required at end of file
bbert May 23, 2023
ef1cfb5
Fix lint errors
bbert May 23, 2023
cc8a032
chore: remove unnecessary cache action
littlespex May 24, 2023
6008c0d
CommonMediaRequest.headers as optional property
bbert May 25, 2023
b28a170
Add request property in CommonMediaResponse
bbert May 25, 2023
5164954
Update ResourceTiming:
bbert May 25, 2023
17cd9bc
CommobMediaResponse: remove length prroperty (replaced by resourceTim…
bbert May 25, 2023
6b56463
Remove application based request execution functionnality
bbert May 25, 2023
355644c
chore: add npm scope change warning to readme (#19)
littlespex May 25, 2023
90c4d29
task/svta-scope (#20)
littlespex May 25, 2023
40a1d6d
ci: update NPM token
littlespex May 25, 2023
9a3d223
release/0.4.3 (#21)
littlespex Jul 25, 2023
fa08e10
no message
littlespex Jul 25, 2023
351e30b
no message
littlespex Jul 25, 2023
e6dbda1
fix: list default as last export in package json (#23)
littlespex Sep 27, 2023
3f519d6
chore: autogenerate release notes from change log
littlespex Sep 27, 2023
8dd7a0d
chore: remove provenance unti repo is published
littlespex Sep 27, 2023
0f31d95
chore: fix package files
littlespex Sep 27, 2023
f13b7da
LICENSE.md
jnthibeault Oct 11, 2023
733d0b0
Create LICENSE
jnthibeault Oct 11, 2023
490de16
Delete LICENSE.md
jnthibeault Oct 11, 2023
0e71e8a
Add governance and related files (#24)
littlespex Oct 11, 2023
8b114fb
chore: link license files
littlespex Oct 11, 2023
2b11895
chore: remove top level license
littlespex Oct 11, 2023
a4f66fb
chore: link license files
littlespex Oct 11, 2023
8940587
chore: update package license fields
littlespex Oct 11, 2023
4448736
chore: correct date for 0.4.4 release
littlespex Oct 11, 2023
7f5a11d
Fix imports
bbert Sep 27, 2023
ec48e9f
chore: update version to 0.4.5
littlespex Oct 12, 2023
e69f086
fix: rename CmcdParam file to match exported const (#31)
littlespex Oct 12, 2023
5ee292d
fix: lint errors when using typedoc specific tags (#33)
littlespex Oct 12, 2023
97312aa
feat: allow files to be imported with file extensions (#30)
littlespex Oct 12, 2023
796d664
chore: update code owners
littlespex Oct 12, 2023
018a110
chore: update contributing guide with DCO warning
littlespex Oct 12, 2023
51ce582
chore: update code owners
littlespex Oct 12, 2023
aadd6ad
fix: remove first line of auto generated release notes
littlespex Oct 13, 2023
0f3ec57
Rename Request/ResponsePlugin to Request/ResponseInterceptor
bbert Oct 25, 2023
e56e77c
chore: update version to 0.5.0
littlespex Oct 19, 2023
e9a95bf
Merge remote-tracking branch 'origin/release/0.5.0' into common-media…
bbert Nov 10, 2023
d045710
Fix index.ts
bbert Nov 10, 2023
7b4b713
Update lib/config/common-media-library.api.md
bbert Nov 10, 2023
19c7131
Add CHANGELOG for request/response API
bbert Nov 10, 2023
131adbc
package.json: add keywords for Common Media Request/Response
bbert Nov 10, 2023
a105404
package.json: add keywords for Common Media Request/Response
bbert Nov 10, 2023
986f776
request package: add tsdoc release tag
bbert Nov 10, 2023
d7d5dde
Reorder export in alphabetical order
bbert Nov 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @streaming-video-technology-alliance/common-media-library @littlespex
* @streaming-video-technology-alliance/common-media-library @streaming-video-technology-alliance/players-playback
9 changes: 1 addition & 8 deletions .github/workflows/ci.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
registry-url: "https://npm.pkg.github.com"
scope: "@cbsinteractive"

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install
run: npm ci

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
docs:
Expand All @@ -21,7 +21,7 @@ jobs:
node-version: 20
cache: 'npm'
registry-url: "https://registry.npmjs.org"
scope: "@svta.org"
scope: "@svta"

- name: Install
run: npm ci
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/publish-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish Tag

on:
workflow_dispatch:
inputs:
tag:
description: "The npm tag (i.e @svta/common-media-library@dev)"
default: 'dev'
required: true
id:
description: "An id to append to the version. Defaults to the current timestamp"
type: string
required: false

env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
registry-url: "https://registry.npmjs.org"
scope: "@svta"

- name: Install
run: npm ci

- name: Test
run: npm test

- name: Get Version
run: echo "version=`node -p "require('./package').version"`" >> $GITHUB_ENV

- name: Get Time
if: github.event.inputs.id == ''
run: echo "id=`date +%s`" >> $GITHUB_ENV

- name: Get ID
if: github.event.inputs.id != ''
run: echo "id=${{ github.event.inputs.id }}" >> $GITHUB_ENV

- name: Generate Version
run: npm version ${{ env.version }}-${{ github.event.inputs.tag }}.${{ env.id }} --no-git-tag-version

- name: Publish Tag
run: npm run pub --tag ${{ github.event.inputs.tag }}
20 changes: 6 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
publish:
Expand All @@ -21,7 +21,7 @@ jobs:
node-version: 20
cache: 'npm'
registry-url: "https://registry.npmjs.org"
scope: "@svta.org"
scope: "@svta"

- name: Install
run: npm ci
Expand All @@ -35,6 +35,9 @@ jobs:
- name: Get Version
run: echo "version=`node -p "require('./package').version"`" >> $GITHUB_ENV

- name: Create Release Notes
run: npm run notes

- name: Draft Release
uses: actions/create-release@v1
env:
Expand All @@ -43,18 +46,7 @@ jobs:
tag_name: v${{ env.version }}
release_name: ${{ env.version }}
commitish: main
body: |
## Release Notes
*

## Documentation
TBD

## NPM Package
```sh
npm install @svta.org/common-media-library@${{ env.version }}
```

body_path: ./RELEASE.md
draft: true
prerelease: false

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules/
dist
.vscode
RELEASE.md
47 changes: 46 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]


## [0.5.0] - ????-??-??


## [0.4.5] - 2023-10-12

### Fixed
- `CMCD_PARAM` constant does not match file name [#27](https://github.com/streaming-video-technology-alliance/common-media-library/issues/27)
- lint errors when using typedoc specific tags [#32](https://github.com/streaming-video-technology-alliance/common-media-library/issues/32)
- Allow imports with file extensions [#26](https://github.com/streaming-video-technology-alliance/common-media-library/issues/26)


## [0.4.4] - 2023-10-11

### Fixed
- Module not found: Error: Default condition should be last one [#22](https://github.com/streaming-video-technology-alliance/common-media-library/issues/22)


## [0.4.3] - 2023-07-25

### Added
- Add `NOTICE` file for attributions
- Export library in cjs format [#11](https://github.com/streaming-video-technology-alliance/common-media-library/issues/11)

### Changed
- Switch to inline source maps


## [0.4.2] - 2023-05-25

### Changed
- The project has moved to a new NPM org. First release under `@svta/common-media-library`.


## [0.4.1] - 2023-05-25

### Changed
- The project has moved to a new NPM org. Last release under `@svta.org/common-media-library`.


## [0.4.0] - 2023-05-05

### Added
Expand Down Expand Up @@ -97,7 +136,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Bootstrap project [#2](https://github.com/streaming-video-technology-alliance/common-media-library/issues/2)


[Unreleased]\: https://github.com/streaming-video-technology-alliance/common-media-library/compare/v0.4.0...HEAD
[Unreleased]\: https://github.com/streaming-video-technology-alliance/common-media-library/compare/v0.5.0...HEAD
[0.5.0]\: https://github.com/streaming-video-technology-alliance/common-media-library/compare/v0.4.5...v0.5.0
[0.4.5]\: https://github.com/streaming-video-technology-alliance/common-media-library/compare/v0.4.4...v0.4.5
[0.4.4]\: https://github.com/streaming-video-technology-alliance/common-media-library/compare/v0.4.3...v0.4.4
[0.4.3]\: https://github.com/streaming-video-technology-alliance/common-media-library/compare/v0.4.2...v0.4.3
[0.4.2]\: https://github.com/streaming-video-technology-alliance/common-media-library/compare/v0.4.1...v0.4.2
[0.4.1]\: https://github.com/streaming-video-technology-alliance/common-media-library/compare/v0.4.0...v0.4.1
[0.4.0]\: https://github.com/streaming-video-technology-alliance/common-media-library/compare/v0.3.0...v0.4.0
[0.3.0]\: https://github.com/streaming-video-technology-alliance/common-media-library/compare/v0.2.6...v0.3.0
[0.2.6]\: https://github.com/streaming-video-technology-alliance/common-media-library/compare/v0.2.5...v0.2.6
Expand Down
19 changes: 12 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Welcome to the Common Media Library contributing guide <!-- omit in toc -->
# Common Media Library Contributing Guide

Thank you for investing your time in contributing to the Common Media Library.

<!-- Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable. -->
Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable.

In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.

Expand All @@ -23,18 +23,23 @@ Scan through our [existing issues](https://github.com/streaming-video-technology
1. Fork the repository.
[Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.

2. Install or update to **Node.js**.
1. Install or update to **Node.js**.

3. Create a working branch and start with your changes!
1. Create a working branch and start with your changes!

4. Update the CHANGELOG. Make sure to update the change log with the change you've made, along with a referene to the issue. See the [CHANGELOG](./CHANGELOG.md) for more information.
1. Update the [CHANGELOG](./CHANGELOG.md). Make sure to update the change log with the change you've made, along with a referene to the issue.

5. Add tests for your changes.
1. Add yourself to the [Contributors List](./CONTRIBUTORS.md) if you haven't already.

6. Add documentation for your changes.
1. Add tests for your changes.

1. Add documentation for your changes.

### Commit your update

> **Warning**
> This library requires all commits to sign the DCO. See https://github.com/apps/dco for more information.

1. Run `npm run format` to format the code before committing.

1. Make sure all tests pass by running `npm run test`.
Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Common Media Library Contributors List
Please add entries to the bottom of the list in the following format:
```
- @GitHub UserName (Required) [Name, Organization] (Optional)
```

- @littlespex [Casey Occhialini, Paramount]
- @dsparacio [Daniel Sparaico, Paramount]
- @acbegen [Ali C. Begen, Comcast]
3 changes: 3 additions & 0 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Common Media Library Governance

The Common Media Library is a public project of the Streaming Video Alliance and is governed by https://github.com/streaming-video-technology-alliance/common-media-library/wiki/Governance-Model
1 change: 1 addition & 0 deletions LICENSE
1 change: 0 additions & 1 deletion LICENSE.md

This file was deleted.

1 change: 1 addition & 0 deletions NOTICE
63 changes: 63 additions & 0 deletions SCOPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Common Media Library Scope

## Overview

The purpose of the Common Media Library is to consolidate common pieces of functionality and interfaces relating to browser-based media playback that have been implemented independently across multiple open-source libraries leading to mismatched functionality and feature sets.

In our work across Hls.js, Dash.js and Shaka player, we have noticed common pieces of functionality that have been implemented independently, and sometimes copied and pasted, across the libraries. This is particularly true when looking at standards-based features, like ID3 parsing, 608 parsing and CMCD. Since the functionality is shared in spirit but not implementation, they can fall out of sync where certain bugs are fixed in one player but not the others. Having a common library creates a single place where these utilities can be maintained. It also creates a single place for standards groups to request and oversee feature implementation.


## Contributors

- Casey Occhialini - Author, Reviewer
- Dan Sparacio - Reviewer
- Ali Begen - Reviewer


## Objectives

Maintain a modern, modular, Javascript utility library for media playback. To achieve this the library will:
- Be written in TypeScript and modern build tools
- Distributed as standalone files that can be imported as needed.
- Provide documentation pertaining to the library's API and usage.


## Project Scope

The initial scope of the Common Media Library will address the following functionality:
- Providing SDKs for standards based media player features like:
- Common Media Client Data (CMCD) encoding / decoding
- Common Media Server Data (CMSD) encoding / decoding
- ID3 tag parsing
- ISO BMFF parsing
- CTA-608 / 708 parsing and rendering
- VTT parsing and rendering
- IMSC parsing and rendering
- HLS manifest parser
- Dash manifest parser
- Providing a place to develop SDKs for new/upcoming standards like C2PA, MoQ, etc.

The initial scope of this project does not include:
- A working media player. The library should be used by developers to implement standards based features in their own players.


## Constraints

The library will be licensed under the Apache 2.0 license. References to other license notifications will be maintained in a `NOTICE.md` file when applicable.


## Deliverables

### Source Code

The source code for the library will be maintained in a public Github repository under the `streaming-video-technology-alliance` organization. Changes to the library are submitted as pull requests to the repository. All pull requests must be approved by a minimum of two SVTA approved code reviewers (SVTA member or subject matter expert).


### Documentation

The documentation for the library will be distributed via Github pages, deployed with every version release.


### Distribution

The library will be distributed as an NPM package in the `@svta` organization, `@svta/common-media-library`. Publishing permissions are restricted to SVTA members.
8 changes: 4 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@svta.org/common-media-library-docs",
"name": "@svta/common-media-library-docs",
"private": true,
"version": "0.4.0",
"license": "MIT",
"version": "0.5.0",
"license": "Apache-2.0",
"type": "module",
"homepage": "https://github.com/streaming-video-technology-alliance/common-media-library",
"authors": "Casey Occhialini <[email protected]>",
"repository": {
"type": "git",
"url": "git+https://github.com/streaming-video-technology-alliance/common-media-library"
"url": "git+https://github.com/streaming-video-technology-alliance/common-media-library.git"
},
"bugs": {
"url": "https://github.com/streaming-video-technology-alliance/common-media-library/issues"
Expand Down
Loading