BlazeContentRestrictionReason
BlazeContentRestrictionReason
BlazeContentRestrictionReason is an enum that says why playback of an item was refused. It is passed to onContentRestricted. The full set is exposed rather than a few coarse buckets because the appropriate response differs per reason; use isRetriable when only the coarse distinction matters.
Each case carries the exact string from the content service contract as its value, so the client and the service cannot drift apart. New reasons added on the service after the SDK version was built degrade to UNKNOWN rather than failing.
enum class BlazeContentRestrictionReason(val value: String) {
SUBSCRIPTION_REQUIRED(value = "SubscriptionRequired"),
GEO_BLOCKED(value = "GeoBlocked"),
VPN_BLOCKED(value = "VpnBlocked"),
DEVICE_LIMIT_REACHED(value = "DeviceLimitReached"),
CONTENT_NOT_AVAILABLE(value = "ContentNotAvailable"),
EXTERNAL_USER_TOKEN_MISSING(value = "ExternalUserTokenMissing"),
EXTERNAL_USER_TOKEN_INVALID(value = "ExternalUserTokenInvalid"),
EXTERNAL_USER_TOKEN_EXPIRED(value = "ExternalUserTokenExpired"),
RATE_LIMITED(value = "RateLimited"),
TEMPORARILY_UNAVAILABLE(value = "TemporarilyUnavailable"),
UNKNOWN(value = "Unknown")
}| Value | Description |
|---|---|
| SUBSCRIPTION_REQUIRED | The viewer needs a subscription to watch this content. |
| GEO_BLOCKED | The content is not available in the viewer's region. |
| VPN_BLOCKED | The request appears to come through a VPN or proxy. |
| DEVICE_LIMIT_REACHED | The viewer is already streaming on the maximum number of devices. |
| CONTENT_NOT_AVAILABLE | The content is not available for playback, including when the service answers without a playable URL. |
| EXTERNAL_USER_TOKEN_MISSING | No viewer token was supplied, so entitlement cannot be established. |
| EXTERNAL_USER_TOKEN_INVALID | The supplied viewer token was rejected. |
| EXTERNAL_USER_TOKEN_EXPIRED | The supplied viewer token has expired; the host app should provide a fresh one. |
| RATE_LIMITED | Too many requests. Worth retrying later. |
| TEMPORARILY_UNAVAILABLE | The service is briefly unavailable, or the SDK could not get an answer from it (for example a network or server error). Worth retrying later. |
| UNKNOWN | The reason could not be recognized, including reasons added after this SDK version. |
isRetriable
isRetriable is a convenience for when only the coarse distinction matters: whether the same request could succeed later without anything changing for the viewer. It is true only for the transient cases (RATE_LIMITED, TEMPORARILY_UNAVAILABLE). A subscription or region problem does not resolve by retrying, so it is false there.
Updated 13 days ago
