feat(frontend): allow ios_screen_change in replayer

This commit is contained in:
ShiKhu 2021-11-15 10:37:52 +01:00
parent 151c26d8cd
commit 394ca8fbbc
2 changed files with 24 additions and 2 deletions

View file

@ -3,7 +3,7 @@ package messages
func IsReplayerType(id uint64) bool {
return 0 == id || 2 == id || 4 == id || 5 == id || 6 == id || 7 == id || 8 == id || 9 == id || 10 == id || 11 == id || 12 == id || 13 == id || 14 == id || 15 == id || 16 == id || 18 == id || 19 == id || 20 == id || 22 == id || 37 == id || 38 == id || 39 == id || 40 == id || 41 == id || 44 == id || 45 == id || 46 == id || 47 == id || 48 == id || 49 == id || 54 == id || 55 == id || 59 == id || 69 == id || 70 == id || 90 == id || 93 == id || 100 == id || 102 == id || 103 == id || 105 == id
return 0 == id || 2 == id || 4 == id || 5 == id || 6 == id || 7 == id || 8 == id || 9 == id || 10 == id || 11 == id || 12 == id || 13 == id || 14 == id || 15 == id || 16 == id || 18 == id || 19 == id || 20 == id || 22 == id || 37 == id || 38 == id || 39 == id || 40 == id || 41 == id || 44 == id || 45 == id || 46 == id || 47 == id || 48 == id || 49 == id || 54 == id || 55 == id || 59 == id || 69 == id || 70 == id || 90 == id || 93 == id || 96 == id || 100 == id || 102 == id || 103 == id || 105 == id
}
func IsIOSType(id uint64) bool {

View file

@ -41,6 +41,7 @@ export const ID_TP_MAP = {
70: "create_i_frame_document",
90: "ios_session_start",
93: "ios_custom_event",
96: "ios_screen_changes",
100: "ios_click_event",
102: "ios_performance_event",
103: "ios_log",
@ -305,6 +306,16 @@ export interface IosCustomEvent {
payload: string,
}
export interface IosScreenChanges {
tp: "ios_screen_changes",
timestamp: number,
length: number,
x: number,
y: number,
width: number,
height: number,
}
export interface IosClickEvent {
tp: "ios_click_event",
timestamp: number,
@ -344,7 +355,7 @@ export interface IosNetworkCall {
}
export type Message = Timestamp | SessionDisconnect | SetPageLocation | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetCssData | SetNodeScroll | SetInputValue | SetInputChecked | MouseMove | ConsoleLog | CssInsertRule | CssDeleteRule | Fetch | Profiler | OTable | Redux | Vuex | MobX | NgRx | GraphQl | PerformanceTrack | ConnectionInformation | SetPageVisibility | LongTask | MouseClick | CreateIFrameDocument | IosSessionStart | IosCustomEvent | IosClickEvent | IosPerformanceEvent | IosLog | IosNetworkCall;
export type Message = Timestamp | SessionDisconnect | SetPageLocation | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetCssData | SetNodeScroll | SetInputValue | SetInputChecked | MouseMove | ConsoleLog | CssInsertRule | CssDeleteRule | Fetch | Profiler | OTable | Redux | Vuex | MobX | NgRx | GraphQl | PerformanceTrack | ConnectionInformation | SetPageVisibility | LongTask | MouseClick | CreateIFrameDocument | IosSessionStart | IosCustomEvent | IosScreenChanges | IosClickEvent | IosPerformanceEvent | IosLog | IosNetworkCall;
export default function (r: PrimitiveReader): Message | null {
switch (r.readUint()) {
@ -643,6 +654,17 @@ export default function (r: PrimitiveReader): Message | null {
payload: r.readString(),
};
case 96:
return {
tp: ID_TP_MAP[96],
timestamp: r.readUint(),
length: r.readUint(),
x: r.readUint(),
y: r.readUint(),
width: r.readUint(),
height: r.readUint(),
};
case 100:
return {
tp: ID_TP_MAP[100],