fix ui: fix player platform check (#2044)

This commit is contained in:
Delirium 2024-04-05 17:23:07 +02:00 committed by GitHub
parent daddedebcc
commit 7719bb253e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -51,8 +51,8 @@ function Session({
clearLogs()
sessionStore.resetUserFilter();
} ,[])
const player = session.platform === 'ios' ? <MobilePlayer /> : <WebPlayer />
const player = session.isMobileNative ? <MobilePlayer /> : <WebPlayer />
return (
<NoContent
show={ hasErrors }

View file

@ -134,6 +134,7 @@ export interface ISession {
userEvents: any[];
timezone?: string;
videoURL?: string[]
isMobileNative?: boolean
}
const emptyValues = {
@ -217,6 +218,7 @@ export default class Session {
frustrations: Array<IIssue | InjectedEvent>
timezone?: ISession['timezone'];
platform: ISession['platform'];
isMobileNative?: ISession['isMobileNative'];
fileKey: ISession['fileKey'];
durationSeconds: number;
@ -304,7 +306,7 @@ export default class Session {
Object.assign(this, {
...session,
isIOS: session.platform === 'ios',
isMobileNative: ['ios', 'android'].includes(session.platform),
errors: exceptions,
siteId: projectId,
events,