@tiledev/sdk-apptile-live-selling 0.15.1 → 0.15.3

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.
Files changed (43) hide show
  1. package/README.md +2 -0
  2. package/dist/clips.d.ts +10 -1
  3. package/dist/clips.d.ts.map +1 -1
  4. package/dist/clips.js +47 -0
  5. package/dist/clips.js.map +1 -1
  6. package/dist/commentHistory.d.ts +6 -2
  7. package/dist/commentHistory.d.ts.map +1 -1
  8. package/dist/commentHistory.js +19 -11
  9. package/dist/commentHistory.js.map +1 -1
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +5 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/react/index.d.ts +2 -0
  15. package/dist/react/index.d.ts.map +1 -1
  16. package/dist/react/index.js +8 -2
  17. package/dist/react/index.js.map +1 -1
  18. package/dist/react/index.web.d.ts +2 -0
  19. package/dist/react/index.web.d.ts.map +1 -1
  20. package/dist/react/index.web.js +8 -2
  21. package/dist/react/index.web.js.map +1 -1
  22. package/dist/react/replayPlayer.d.ts +9 -2
  23. package/dist/react/replayPlayer.d.ts.map +1 -1
  24. package/dist/react/replayPlayer.js +33 -7
  25. package/dist/react/replayPlayer.js.map +1 -1
  26. package/dist/react/systemPictureInPicture.d.ts +34 -0
  27. package/dist/react/systemPictureInPicture.d.ts.map +1 -0
  28. package/dist/react/systemPictureInPicture.js +93 -0
  29. package/dist/react/systemPictureInPicture.js.map +1 -0
  30. package/dist/react/useFeaturedClip.d.ts +11 -0
  31. package/dist/react/useFeaturedClip.d.ts.map +1 -0
  32. package/dist/react/useFeaturedClip.js +50 -0
  33. package/dist/react/useFeaturedClip.js.map +1 -0
  34. package/dist/react/useReplayPage.d.ts +3 -0
  35. package/dist/react/useReplayPage.d.ts.map +1 -1
  36. package/dist/react/useReplayPage.js +9 -1
  37. package/dist/react/useReplayPage.js.map +1 -1
  38. package/dist/types.d.ts +7 -0
  39. package/dist/types.d.ts.map +1 -1
  40. package/dist/ui/ReplayBubble.d.ts.map +1 -1
  41. package/dist/ui/ReplayBubble.js +8 -2
  42. package/dist/ui/ReplayBubble.js.map +1 -1
  43. package/package.json +1 -1
@@ -12,6 +12,7 @@ const react_1 = require("react");
12
12
  const react_native_1 = require("react-native");
13
13
  const LiveSellingProvider_1 = require("../react/LiveSellingProvider");
14
14
  const replayPlayer_1 = require("../react/replayPlayer");
15
+ const systemPictureInPicture_1 = require("../react/systemPictureInPicture");
15
16
  const BubbleFrame_1 = require("./BubbleFrame");
16
17
  /** Screen-reader words, the old app's. */
17
18
  const WORDS = {
@@ -31,8 +32,10 @@ const WORDS = {
31
32
  * which closes the bubble as it arrives; **✕** stops the video and closes the bubble.
32
33
  */
33
34
  function ReplayBubble({ onOpen, chipColor, openLabel = WORDS.open, closeLabel = WORDS.close } = {}) {
34
- const { recording, bubbleShown, player, stop, markVideoReady } = (0, replayPlayer_1.useReplayPlayer)();
35
+ const { recording, bubbleShown, player, stop, markVideoReady, noteSystemPictureInPicture } = (0, replayPlayer_1.useReplayPlayer)();
35
36
  const { routes } = (0, LiveSellingProvider_1.useLivePageOptions)();
37
+ // Put away with the video in the bubble, the phone takes it into its own window (0.15.2, ENG-941).
38
+ const startsPictureInPictureAutomatically = (0, systemPictureInPicture_1.useAutoPictureInPicture)(bubbleShown && !!recording);
36
39
  if (!bubbleShown || !recording)
37
40
  return null;
38
41
  const recordingId = recording.id;
@@ -54,7 +57,10 @@ function ReplayBubble({ onOpen, chipColor, openLabel = WORDS.open, closeLabel =
54
57
  style: styles.video,
55
58
  contentFit: 'cover',
56
59
  nativeControls: false,
57
- allowsPictureInPicture: false,
60
+ allowsPictureInPicture: true,
61
+ startsPictureInPictureAutomatically,
62
+ onPictureInPictureStart: () => noteSystemPictureInPicture(true),
63
+ onPictureInPictureStop: () => noteSystemPictureInPicture(false),
58
64
  onFirstFrameRender: markVideoReady,
59
65
  }),
60
66
  });
@@ -1 +1 @@
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CAAC,YAAY;QACjC,MAAM,EAAE,GAAG,EAAE;YACX,IAAI,MAAM;gBAAE,MAAM,CAAC,WAAW,CAAC,CAAC;;gBAC3B,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,EAAE,IAAI;QACb,SAAS;QACT,UAAU;QACV,SAAS;QACT,QAAQ,EAAE,IAAA,qBAAa,EAAC,sBAAS,EAAE;YACjC,MAAM;YACN,4GAA4G;YAC5G,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,UAAU,EAAE,OAAO;YACnB,cAAc,EAAE,KAAK;YACrB,sBAAsB,EAAE,IAAI;YAC5B,mCAAmC;YACnC,uBAAuB,EAAE,GAAG,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC;YAC/D,sBAAsB,EAAE,GAAG,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC;YAC/D,kBAAkB,EAAE,cAAc;SACnC,CAAC;KACH,CACF,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;CAChF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledev/sdk-apptile-live-selling",
3
- "version": "0.15.1",
3
+ "version": "0.15.3",
4
4
  "description": "Live selling, auctions and giveaways for React Native — the Apptile live-selling gateway as a typed singleton, a Zego room engine behind a platform boundary, an assembled session state machine, system picture-in-picture with its own config plugin, and the Live and Replay page models with their floating bubbles (`/ui`). Commerce comes from an adapter.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,