Skip to content

Commit

Permalink
fix: extend interface:
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed Oct 31, 2024
1 parent 582b8c5 commit edaa044
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
10 changes: 1 addition & 9 deletions packages/hms-video-store/src/schema/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ export interface HMSException {
nativeError?: Error;
}

export interface HMSTrackException {
code: number;
action: string;
name: string;
message: string;
description: string;
isTerminal: boolean;
timestamp: Date;
nativeError?: Error;
export interface HMSTrackException extends HMSException {
trackType: HMSTrackExceptionTrackType;
}
4 changes: 2 additions & 2 deletions packages/hms-video-store/src/schema/notification.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HMSDeviceChangeEvent } from './device-change';
import { HMSException, HMSTrackException } from './error';
import { HMSException } from './error';
import { HMSMessage } from './message';
import { HMSPeer, HMSTrack } from './peer';
import { HMSPlaylistItem } from './playlist';
Expand Down Expand Up @@ -44,7 +44,7 @@ export interface HMSMessageNotification extends BaseNotification {
}
export interface HMSExceptionNotification extends BaseNotification {
type: HMSNotificationTypes.ERROR;
data: HMSException | HMSTrackException;
data: HMSException;
}
export interface HMSChangeTrackStateRequestNotification extends BaseNotification {
type: HMSNotificationTypes.CHANGE_TRACK_STATE_REQUEST;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function PermissionErrorNotificationModal() {
return <PermissionErrorModal error={notification?.data} />;
}

export const PermissionErrorModal = ({ error }: { error?: HMSTrackException | HMSException }) => {
export const PermissionErrorModal = ({ error }: { error?: HMSException }) => {
const [deviceType, setDeviceType] = useState('');
const [isSystemError, setIsSystemError] = useState(false);
const isMobile = useMedia(cssConfig.media.md);
Expand Down

0 comments on commit edaa044

Please sign in to comment.