-
Notifications
You must be signed in to change notification settings - Fork 0
cmcdv2/Implement CMCD v2 types and constants #49
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
Open
juanmanuel-qualabs
wants to merge
39
commits into
main
Choose a base branch
from
cmcdv2/constants
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… obtained from type at runtime
cotid-qualabs
approved these changes
Jun 3, 2025
…ion to their own file
Co-authored-by: Casey Occhialini <[email protected]> Signed-off-by: Juan Manuel Gonzalez <[email protected]>
…media-library into cmcdv2/constants
…tion and extending it
ea94d88 to
c905bce
Compare
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
Signed-off-by: Casey Occhialini <[email protected]>
chore: rename files and types to match repo naming conventions
Signed-off-by: Casey Occhialini <[email protected]>
see: streaming-video-technology-alliance#218 Signed-off-by: Casey Occhialini <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The PR brings CMCD v2 support with fully-documented type definitions and mode-specific key mappings.
New files are added for each conceptual area of CMCD v2 (Common, Event Mode, Request Mode, Response Mode)
No deletions or breaking changes are present;
Details:
lib/src/cmcd/Cmcd.ts: Adds the CMCD_V1_KEYS array listing all CMCD v1 keys, improving v1/v2 separation and documentation.lib/src/cmcd/CMCD_V2.ts: Exports the new CMCD version constant (CMCD_V2 = 2).lib/src/cmcd/CmcdV2.ts: Defines the top-level CmcdV2 type, encompassing all v2 structures (object, request, event, response, reporting event, player state).lib/src/cmcd/CmcdV2Object.ts: Implements the CmcdV2Object type, describing all common CMCD v2 keys (bitrate, buffer lengths, CDN ID, content ID, session ID, error codes, etc.), including detailed JSDoc documentation for each field.lib/src/cmcd/CmcdV2Request.ts: Introduces CmcdV2Request type for request-specific keys (object duration, deadline, next object request, object type, throughput, startup flag) and the CMCD_V2_REQUEST_MODE_KEYS array.lib/src/cmcd/CmcdV2Response.ts: Adds CmcdV2Response type for response-specific and timing keys (response code, TTFB, TTLB, requested URL, CMSD headers, etc.) and the CMCD_V2_RESPONSE_MODE_KEYS array.lib/src/cmcd/CmcdV2Event.ts: Defines CmcdV2Event type and CMCD_V2_EVENT_MODE_KEYS array for event and event-response keys, including detailed JSDoc for each reporting event token.lib/src/cmcd/CmcdReportingEvent.ts: Enumerates possible CMCD v2 reporting events for the 'e' key (error, time interval, play state change) and defines the CmcdReportingEvent type.lib/src/cmcd/CmcdPlayerState.ts: Lists CMCD v2 player states for the 'sta' key (starting, playing, seeking, rebuffering, paused, waiting, ended, fatal error) and defines the CmcdPlayerState type.lib/src/cmcd/CmcdMode.ts: Introduces CMCD_MODE constant for CMCD modes (request, response, event) and the corresponding CmcdMode type.