-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: eme controller #47
base: main
Are you sure you want to change the base?
Conversation
Note Urls will be available only after netlify deploy. PreviewApi Reference
Demo |
❌ Deploy Preview for videojsdev failed. Why did it fail? →
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #47 +/- ##
==========================================
+ Coverage 63.89% 63.98% +0.09%
==========================================
Files 114 115 +1
Lines 4833 4848 +15
Branches 633 635 +2
==========================================
+ Hits 3088 3102 +14
- Misses 1737 1738 +1
Partials 8 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start! Just added a few thoughts after my first quick read through.
* @param keySystem The key system string | ||
* @returns Whether the key system is PlayReady | ||
*/ | ||
private isPlayReadyKeySystem_(keySystem: string): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think helpers such as these are perfect for either adding to, or importing from the CML.
keyStatusMap.forEach((status, keyId) => { | ||
// Edge has the order of these values swaped from the spec. | ||
// We need to account for this | ||
if (typeof keyId === 'string') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to split out the Edge specific logic into its own function here.
|
||
let hasExpiredKeys = false; | ||
|
||
keyStatusMap.forEach((status, keyId) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some additional complexity here that will likely have to be accounted for with HDCP, specifically mapping keyIds to 'usable' status'.
export type EventTypeToEventMap = NetworkEventMap & PlayerEventMap; | ||
export interface ParseEventMap { | ||
[PlayerEventType.HlsPlaylistParsed]: LoggerLevelChangedEvent; | ||
[PlayerEventType.DashManifestParsed]: VolumeChangedEvent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it just a mock for now?
public readonly category = ErrorCategory.Eme; | ||
} | ||
|
||
export class SourceNotSetError extends EmeError { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have this type of error for EME?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a safety check to ensure that we don't try setting init data when the source is not set on the player. This can probably be handled on the player side.
// TODO: check if we have pending request or init one if we have init data | ||
} | ||
|
||
public stop(): void { | ||
for (const [id] of this.activeSessions_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if we can have multiple active sessions
NOTE: WIP⚠️
As of now, I am looking for discussion regarding the API/Config. Values that are commented out are things I am leabing towards EXCLUDING from the API/Config. Anything not commented is what I am expecting to include.
Please read through the comments, as I have some thoughts that I'd appreciate feedback on.
Description
Draft PR for EME controller related changes.
Specific Changes proposed
Please list the specific changes involved in this pull request.
Requirements Checklist