private async compressSession(session: SessionRecording): Promise<any> // Implement compression (e.g., using CompressionStream API) const jsonString = JSON.stringify(session.events); const compressed = await this.gzipCompress(jsonString); return compressed: true, algorithm: 'gzip', data: Array.from(new Uint8Array(compressed)), ;
This is the most common interpretation of "portable replays"—getting a video file (like MP4 or WebM) that can be emailed, archived, or opened in standard video players. posthog session replay portable
This method ensures that the moment a session is recorded, a portable copy lives in your cloud storage. // Implement compression (e.g.
return () => if (recorderRef.current && isRecording) const session = recorderRef.current.stop(); options?.onSessionComplete?.(session); const compressed = await this.gzipCompress(jsonString)
A key factor in the portability of PostHog's replays is its cross-platform nature. It is not restricted to web browsers; rather, it extends across mobile and specialized engineering environments.