fix ui: prefetching sessions from widgets fix
This commit is contained in:
parent
92a636960a
commit
044e23f10a
5 changed files with 8 additions and 4 deletions
|
|
@ -103,11 +103,12 @@ function WebPlayer(props: any) {
|
|||
}
|
||||
}, [session.sessionId]);
|
||||
|
||||
const domFiles = session?.domURL?.length ?? 0
|
||||
useEffect(() => {
|
||||
if (!props.prefetched && session.domURL.length > 0) {
|
||||
if (!props.prefetched && domFiles > 0) {
|
||||
playerInst?.reinit(session);
|
||||
}
|
||||
}, [session.domURL.length, props.prefetched]);
|
||||
}, [session, domFiles, props.prefetched]);
|
||||
|
||||
const {
|
||||
firstVisualEvent: visualOffset,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ function hashString(s: string): number {
|
|||
}
|
||||
|
||||
export default class Session {
|
||||
intertag = "_mobx"
|
||||
sessionId: string = "";
|
||||
viewed: boolean = false
|
||||
duration: number = 0
|
||||
|
|
@ -31,6 +32,9 @@ export default class Session {
|
|||
eventsCount: number = 0
|
||||
userNumericHash: number = 0
|
||||
userDisplayName: string = ""
|
||||
canvasURL: string[] = []
|
||||
domURL: string[] = []
|
||||
devtoolsURL: string[] = []
|
||||
|
||||
constructor() {
|
||||
makeAutoObservable(this, {
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ export default class TabSessionManager {
|
|||
if (!this.canvasManagers[managerId]) {
|
||||
const fileId = managerId;
|
||||
const delta = msg.timestamp - this.sessionStart;
|
||||
|
||||
const canvasNodeLinks = this.session.canvasURL.filter((url: string) => url.includes(fileId)) as string[];
|
||||
const tarball = canvasNodeLinks.find((url: string) => url.includes('.tar.'));
|
||||
const mp4file = canvasNodeLinks.find((url: string) => url.includes('.mp4'));
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@ export default class WebPlayer extends Player {
|
|||
this.targetMarker = new TargetMarker(this.screen, this.wpState)
|
||||
this.inspectorController = new InspectorController(this.screen, this.wpState)
|
||||
|
||||
|
||||
const endTime = session.duration?.valueOf() || 0
|
||||
this.wpState.update({
|
||||
//@ts-ignore
|
||||
|
|
|
|||
|
|
@ -310,7 +310,6 @@ export default class Session {
|
|||
frustrationIssues
|
||||
).sort(sortEvents)
|
||||
|
||||
console.log(session.platform)
|
||||
Object.assign(this, {
|
||||
...session,
|
||||
isMobileNative: ['ios', 'android'].includes(session.platform),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue