When you trigger a launch request, the first thing our SDK does is test the user's network latency to all of our possible server endpoints. This process takes between 0.7 and 2 seconds.
Many experiences on our platform have use cases where an interactive stream doesn’t start immediately when the user navigates to the page, but instead starts in response to a user interaction. For example, in an architectural configurator a configuration page may load first, but the user can later switch to a pixel streamed view vs 2D images by toggling a control in the web client.
In order to use the pre-caching feature, there are some necessary platform connection activities that can be done in advance of the user launching a stream. By performing these activities when the page loads, you can reduce the perceived time-to-first-frame for your users.
Our SDK now implements an await platform.getLatencyMeasurements();
call. This call can be made immediately after your call to platform.connect();
, which can happen any time before the user action triggers a queueLaunchRequest();
.
In order to use this feature you will need to use version 4.10.2 or higher of our SDK, which can be downloaded here: npm: @pureweb/platform-sdk.