Skip to content
Snippets Groups Projects
Commit aaf927c9 authored by jojohoch's avatar jojohoch
Browse files

Add VopRuntimeErrorNotification according to Verona API 6.0

parent f672425a
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,13 @@ export interface VopStartCommand { ...@@ -57,6 +57,13 @@ export interface VopStartCommand {
playerConfig?: PlayerConfig; playerConfig?: PlayerConfig;
} }
export interface VopRuntimeErrorNotification {
type: 'vopRuntimeErrorNotification';
sessionId: string;
code: string;
message?: string;
}
export interface VopNavigationDeniedNotification { export interface VopNavigationDeniedNotification {
type: 'vopNavigationDeniedNotification'; type: 'vopNavigationDeniedNotification';
sessionId: string; sessionId: string;
...@@ -80,6 +87,11 @@ export interface VopReadyNotification { ...@@ -80,6 +87,11 @@ export interface VopReadyNotification {
metadata: VopMetaData; metadata: VopMetaData;
} }
export interface VopError {
code: string;
message?: string;
}
export interface VopMetaData { export interface VopMetaData {
$schema: string, $schema: string,
id: string; id: string;
...@@ -133,6 +145,7 @@ export interface VopWindowFocusChangedNotification { ...@@ -133,6 +145,7 @@ export interface VopWindowFocusChangedNotification {
export type VopMessage = export type VopMessage =
VopStartCommand | VopStartCommand |
VopPlayerConfigChangedNotification | VopPlayerConfigChangedNotification |
VopRuntimeErrorNotification |
VopNavigationDeniedNotification | VopNavigationDeniedNotification |
VopPageNavigationCommand | VopPageNavigationCommand |
VopReadyNotification | VopReadyNotification |
......
...@@ -4,7 +4,7 @@ import { ...@@ -4,7 +4,7 @@ import {
LogData, LogData,
NavigationTarget, NavigationTarget,
PlayerState, PlayerState,
UnitState, UnitState, VopError,
VopMessage, VopMessage,
VopMetaData, VopMetaData,
VopStateChangedNotification VopStateChangedNotification
...@@ -54,6 +54,15 @@ export class VeronaPostService { ...@@ -54,6 +54,15 @@ export class VeronaPostService {
} }
} }
sendVopRuntimeErrorNotification(error: VopError): void {
this.sendMessage({
type: 'vopRuntimeErrorNotification',
sessionId: this.sessionID as string,
code: error.code,
message: error.message
});
}
sendVopUnitNavigationRequestedNotification(target: NavigationTarget): void { sendVopUnitNavigationRequestedNotification(target: NavigationTarget): void {
this.sendMessage({ this.sendMessage({
type: 'vopUnitNavigationRequestedNotification', type: 'vopUnitNavigationRequestedNotification',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment