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

Adding optional error to KeyStatusesChangedEvent type #3541

Merged
merged 4 commits into from
Mar 2, 2021
Merged
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ declare namespace dashjs {
setCalleeNameVisible(flag: boolean): void;
}

interface DashJSError {
code: number | null;
message: string | null;
data: unknown | null;
}

interface VideoModel { }

interface ProtectionController {
Expand Down Expand Up @@ -689,12 +695,13 @@ declare namespace dashjs {
export interface KeySessionEvent extends Event {
type: MediaPlayerEvents['KEY_SESSION_CREATED'];
data: SessionToken | null;
error?: string;
error?: DashJSError;
}

export interface KeyStatusesChangedEvent extends Event {
type: MediaPlayerEvents['KEY_STATUSES_CHANGED'];
data: SessionToken;
error?: DashJSError;
}

export interface KeySystemSelectedEvent extends Event {
Expand All @@ -709,7 +716,7 @@ declare namespace dashjs {
sessionToken: SessionToken;
messageType: string;
};
error?: string;
error?: DashJSError;
}

export interface LogEvent extends Event {
Expand Down