Table of Contents

Class RateLimitResolver

Namespace
JLChnToZ.VRC.VVMW

This module is for reducing rate limit errors by debouncing (on holds and wait for certain time) video switching requests across VizVid instances.

public class RateLimitResolver : UdonSharpBehaviour
Inheritance
RateLimitResolver

Methods

_GetSafeLoadUrlDelay()

Request a safe delay time for loading a new video URL in seconds.

public float _GetSafeLoadUrlDelay()

Returns

float

The delay time in seconds.

Examples

// Assume the actual video loading logic lives in `_LoadUrl` method.
float delay = rateLimitResolver._GetSafeLoadUrlDelay();
if (delay > 0) {
   SendCustomEventDelayedSeconds(nameof(_LoadUrl), delay);
   return;
}
_LoadUrl();