LensStudio:Preview.PausedByUser
ClassPause reason reported when the creator pauses the Preview panel or switches it to a paused or inspected stream.
Index
Properties
Example
Describe a creator-initiated pause in a status message. Pass a preview's pauseReason.
import { LensPreview } from 'LensStudio:LensPreview';
import { PausedByUser } from 'LensStudio:Preview';
export function describeUserPause(reason: LensPreview['pauseReason']): string | null {
if (!(reason instanceof PausedByUser)) return null;
const stream = reason.streamType ? ` (${reason.streamType})` : '';
return `${reason.message}${stream}. Resume the preview, then try again.`;
}
Constructors
Constructor
new PausedByUser():
PausedByUser
Constructs a PausedByUser value with its default message and an empty stream type.
Returns
PausedByUser
Properties
isResumable
readonlyisResumable:boolean
Whether the preview can be resumed from this state. Always true for PausedByUser.
isSuspending
readonlyisSuspending:boolean
Whether this reason suspends the preview input.
message
readonlymessage:string
User-facing pause message, "Paused by Creator".
streamType
readonlystreamType:string
Stream type the creator switched the preview to, or an empty string if none was given.