Type Alias: ActivityFrameMessage ​
ts
type ActivityFrameMessage =
| {
protocol: typeof ACTIVITY_PROTOCOL;
type: "ready";
}
| {
data: unknown;
id?: number;
protocol: typeof ACTIVITY_PROTOCOL;
to?: number[];
type: "broadcast";
}
| {
protocol: typeof ACTIVITY_PROTOCOL;
type: "close";
}
| {
on: boolean;
protocol: typeof ACTIVITY_PROTOCOL;
type: "fullscreen";
}
| {
pressed: boolean;
protocol: typeof ACTIVITY_PROTOCOL;
type: "pushToTalk";
};Defined in: activity.ts:78
the page to Refract
Union Members ​
Type Literal ​
ts
{
protocol: typeof ACTIVITY_PROTOCOL;
type: "ready";
}Type Literal ​
ts
{
data: unknown;
id?: number;
protocol: typeof ACTIVITY_PROTOCOL;
to?: number[];
type: "broadcast";
}to everyone else with it open, or only to; with an id, Refract answers with a result
Type Literal ​
ts
{
protocol: typeof ACTIVITY_PROTOCOL;
type: "close";
}this person is done with it; the others carry on
Type Literal ​
ts
{
on: boolean;
protocol: typeof ACTIVITY_PROTOCOL;
type: "fullscreen";
}put the page's frame full screen, or take it out. Refract does it, as a sandboxed frame can't reliably do it itself; only from a click or key press.
Type Literal ​
ts
{
pressed: boolean;
protocol: typeof ACTIVITY_PROTOCOL;
type: "pushToTalk";
}the push to talk key or button went down or up in the page. Refract only takes a press while the frame has the keyboard, and a release at any time.