@playruo/embed 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
EmbedTester: () => EmbedTester,
|
|
34
|
+
PLAYRUO_IFRAME_ALLOW: () => PLAYRUO_IFRAME_ALLOW,
|
|
34
35
|
PLAYRUO_UUID_STORAGE_KEY: () => PLAYRUO_UUID_STORAGE_KEY,
|
|
35
36
|
PlayruoEmbed: () => PlayruoEmbed,
|
|
36
37
|
buildEmbedUrl: () => buildEmbedUrl,
|
|
@@ -40,6 +41,9 @@ __export(index_exports, {
|
|
|
40
41
|
});
|
|
41
42
|
module.exports = __toCommonJS(index_exports);
|
|
42
43
|
|
|
44
|
+
// src/iframe-allow.ts
|
|
45
|
+
var PLAYRUO_IFRAME_ALLOW = "cross-origin-isolated; fullscreen *; autoplay *; gamepad *; clipboard-write *; web-share *; encrypted-media *; accelerometer *; gyroscope *; screen-wake-lock *";
|
|
46
|
+
|
|
43
47
|
// src/react/playruo-embed.tsx
|
|
44
48
|
var import_react = require("react");
|
|
45
49
|
|
|
@@ -836,7 +840,7 @@ var PlayruoEmbed = ({
|
|
|
836
840
|
{
|
|
837
841
|
ref: iframeRef,
|
|
838
842
|
src,
|
|
839
|
-
allow:
|
|
843
|
+
allow: PLAYRUO_IFRAME_ALLOW,
|
|
840
844
|
className: "w-full h-[70vh] rounded-lg border",
|
|
841
845
|
...{ credentialless: "true" },
|
|
842
846
|
sandbox: "allow-same-origin allow-scripts allow-popups allow-forms allow-presentation allow-top-navigation allow-modals allow-pointer-lock",
|
|
@@ -2145,6 +2149,7 @@ var isPlayruoInternalMessage = (data) => {
|
|
|
2145
2149
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2146
2150
|
0 && (module.exports = {
|
|
2147
2151
|
EmbedTester,
|
|
2152
|
+
PLAYRUO_IFRAME_ALLOW,
|
|
2148
2153
|
PLAYRUO_UUID_STORAGE_KEY,
|
|
2149
2154
|
PlayruoEmbed,
|
|
2150
2155
|
buildEmbedUrl,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* iframe `allow` feature policy delegated to the Playruo player.
|
|
6
|
+
* Must stay aligned with the webapp embed harness (`front/scripts/embed-host/host.js`)
|
|
7
|
+
* and `next.config.ts` Permissions-Policy. `screen-wake-lock` is required so the
|
|
8
|
+
* framed player can hold a Wake Lock while streaming.
|
|
9
|
+
*/
|
|
10
|
+
declare const PLAYRUO_IFRAME_ALLOW = "cross-origin-isolated; fullscreen *; autoplay *; gamepad *; clipboard-write *; web-share *; encrypted-media *; accelerometer *; gyroscope *; screen-wake-lock *";
|
|
11
|
+
|
|
4
12
|
interface PlayruoEmbedState {
|
|
5
13
|
hasPlayedOnce: boolean;
|
|
6
14
|
tryNow: {
|
|
@@ -265,4 +273,4 @@ declare const PLAYRUO_UUID_STORAGE_KEY = "playruo_uuid";
|
|
|
265
273
|
*/
|
|
266
274
|
declare const resolveVisitorUuid: (clientFingerprint?: string) => string;
|
|
267
275
|
|
|
268
|
-
export { type DemoCompletedPayload, EmbedTester, type EmbedTesterProps, PLAYRUO_UUID_STORAGE_KEY, type PlayruoDemoCompletedMessage, PlayruoEmbed, type PlayruoEmbedActions, type PlayruoEmbedMessage, type PlayruoEmbedPasswordState, type PlayruoEmbedProps, type PlayruoEmbedRenderState, type PlayruoEmbedState, type PlayruoErrorMessage, type PlayruoEventMessage, type PlayruoEventPayload, type PlayruoInternalMessage, type PlayruoPasswordError, type PlayruoPasswordErrorCode, type PlayruoPasswordNotRequiredMessage, type PlayruoPasswordRequiredMessage, type PlayruoPasswordResultMessage, type PlayruoPurchaseRequestMessage, type PlayruoReadyMessage, type PlayruoRequestExitFullscreenMessage, type PlayruoSessionOverMessage, type PlayruoStateUpdateMessage, type PlayruoStreamStartMessage, type PlayruoStreamStopMessage, buildEmbedUrl, isPlayruoEmbedMessage, isPlayruoInternalMessage, resolveVisitorUuid };
|
|
276
|
+
export { type DemoCompletedPayload, EmbedTester, type EmbedTesterProps, PLAYRUO_IFRAME_ALLOW, PLAYRUO_UUID_STORAGE_KEY, type PlayruoDemoCompletedMessage, PlayruoEmbed, type PlayruoEmbedActions, type PlayruoEmbedMessage, type PlayruoEmbedPasswordState, type PlayruoEmbedProps, type PlayruoEmbedRenderState, type PlayruoEmbedState, type PlayruoErrorMessage, type PlayruoEventMessage, type PlayruoEventPayload, type PlayruoInternalMessage, type PlayruoPasswordError, type PlayruoPasswordErrorCode, type PlayruoPasswordNotRequiredMessage, type PlayruoPasswordRequiredMessage, type PlayruoPasswordResultMessage, type PlayruoPurchaseRequestMessage, type PlayruoReadyMessage, type PlayruoRequestExitFullscreenMessage, type PlayruoSessionOverMessage, type PlayruoStateUpdateMessage, type PlayruoStreamStartMessage, type PlayruoStreamStopMessage, buildEmbedUrl, isPlayruoEmbedMessage, isPlayruoInternalMessage, resolveVisitorUuid };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* iframe `allow` feature policy delegated to the Playruo player.
|
|
6
|
+
* Must stay aligned with the webapp embed harness (`front/scripts/embed-host/host.js`)
|
|
7
|
+
* and `next.config.ts` Permissions-Policy. `screen-wake-lock` is required so the
|
|
8
|
+
* framed player can hold a Wake Lock while streaming.
|
|
9
|
+
*/
|
|
10
|
+
declare const PLAYRUO_IFRAME_ALLOW = "cross-origin-isolated; fullscreen *; autoplay *; gamepad *; clipboard-write *; web-share *; encrypted-media *; accelerometer *; gyroscope *; screen-wake-lock *";
|
|
11
|
+
|
|
4
12
|
interface PlayruoEmbedState {
|
|
5
13
|
hasPlayedOnce: boolean;
|
|
6
14
|
tryNow: {
|
|
@@ -265,4 +273,4 @@ declare const PLAYRUO_UUID_STORAGE_KEY = "playruo_uuid";
|
|
|
265
273
|
*/
|
|
266
274
|
declare const resolveVisitorUuid: (clientFingerprint?: string) => string;
|
|
267
275
|
|
|
268
|
-
export { type DemoCompletedPayload, EmbedTester, type EmbedTesterProps, PLAYRUO_UUID_STORAGE_KEY, type PlayruoDemoCompletedMessage, PlayruoEmbed, type PlayruoEmbedActions, type PlayruoEmbedMessage, type PlayruoEmbedPasswordState, type PlayruoEmbedProps, type PlayruoEmbedRenderState, type PlayruoEmbedState, type PlayruoErrorMessage, type PlayruoEventMessage, type PlayruoEventPayload, type PlayruoInternalMessage, type PlayruoPasswordError, type PlayruoPasswordErrorCode, type PlayruoPasswordNotRequiredMessage, type PlayruoPasswordRequiredMessage, type PlayruoPasswordResultMessage, type PlayruoPurchaseRequestMessage, type PlayruoReadyMessage, type PlayruoRequestExitFullscreenMessage, type PlayruoSessionOverMessage, type PlayruoStateUpdateMessage, type PlayruoStreamStartMessage, type PlayruoStreamStopMessage, buildEmbedUrl, isPlayruoEmbedMessage, isPlayruoInternalMessage, resolveVisitorUuid };
|
|
276
|
+
export { type DemoCompletedPayload, EmbedTester, type EmbedTesterProps, PLAYRUO_IFRAME_ALLOW, PLAYRUO_UUID_STORAGE_KEY, type PlayruoDemoCompletedMessage, PlayruoEmbed, type PlayruoEmbedActions, type PlayruoEmbedMessage, type PlayruoEmbedPasswordState, type PlayruoEmbedProps, type PlayruoEmbedRenderState, type PlayruoEmbedState, type PlayruoErrorMessage, type PlayruoEventMessage, type PlayruoEventPayload, type PlayruoInternalMessage, type PlayruoPasswordError, type PlayruoPasswordErrorCode, type PlayruoPasswordNotRequiredMessage, type PlayruoPasswordRequiredMessage, type PlayruoPasswordResultMessage, type PlayruoPurchaseRequestMessage, type PlayruoReadyMessage, type PlayruoRequestExitFullscreenMessage, type PlayruoSessionOverMessage, type PlayruoStateUpdateMessage, type PlayruoStreamStartMessage, type PlayruoStreamStopMessage, buildEmbedUrl, isPlayruoEmbedMessage, isPlayruoInternalMessage, resolveVisitorUuid };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/iframe-allow.ts
|
|
2
|
+
var PLAYRUO_IFRAME_ALLOW = "cross-origin-isolated; fullscreen *; autoplay *; gamepad *; clipboard-write *; web-share *; encrypted-media *; accelerometer *; gyroscope *; screen-wake-lock *";
|
|
3
|
+
|
|
1
4
|
// src/react/playruo-embed.tsx
|
|
2
5
|
import { useEffect, useMemo, useRef, useState, useCallback } from "react";
|
|
3
6
|
|
|
@@ -794,7 +797,7 @@ var PlayruoEmbed = ({
|
|
|
794
797
|
{
|
|
795
798
|
ref: iframeRef,
|
|
796
799
|
src,
|
|
797
|
-
allow:
|
|
800
|
+
allow: PLAYRUO_IFRAME_ALLOW,
|
|
798
801
|
className: "w-full h-[70vh] rounded-lg border",
|
|
799
802
|
...{ credentialless: "true" },
|
|
800
803
|
sandbox: "allow-same-origin allow-scripts allow-popups allow-forms allow-presentation allow-top-navigation allow-modals allow-pointer-lock",
|
|
@@ -2102,6 +2105,7 @@ var isPlayruoInternalMessage = (data) => {
|
|
|
2102
2105
|
};
|
|
2103
2106
|
export {
|
|
2104
2107
|
EmbedTester,
|
|
2108
|
+
PLAYRUO_IFRAME_ALLOW,
|
|
2105
2109
|
PLAYRUO_UUID_STORAGE_KEY,
|
|
2106
2110
|
PlayruoEmbed,
|
|
2107
2111
|
buildEmbedUrl,
|