@netless/app-slide 0.2.105-beta.3 → 0.2.106-beta.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/main.es.js CHANGED
@@ -42859,7 +42859,7 @@ class SlidePreviewer {
42859
42859
  }
42860
42860
  }
42861
42861
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
42862
- const version = "0.2.105-beta.3";
42862
+ const version = "0.2.106-beta.0";
42863
42863
  const DEFAULT_SLIDE_SETUP_READY_TIMEOUT = 5e3;
42864
42864
  const SlideApp = {
42865
42865
  kind: "Slide",
@@ -43043,14 +43043,12 @@ const SlideApp = {
43043
43043
  SlideApp.__teardownByContext.set(context, teardown);
43044
43044
  const waitForFirstRender = (timeoutMs) => new Promise((resolve) => {
43045
43045
  let settled = false;
43046
- let pollTimer;
43047
43046
  const settle = (loaded) => {
43048
43047
  if (settled)
43049
43048
  return;
43050
43049
  settled = true;
43051
43050
  window.clearTimeout(timeoutTimer);
43052
- if (pollTimer !== void 0)
43053
- window.clearInterval(pollTimer);
43051
+ window.clearInterval(pollTimer);
43054
43052
  resolve(loaded);
43055
43053
  };
43056
43054
  const timeoutTimer = window.setTimeout(() => settle(false), timeoutMs);
@@ -43058,12 +43056,21 @@ const SlideApp = {
43058
43056
  () => settle(!firstRenderFailed),
43059
43057
  () => settle(false)
43060
43058
  );
43061
- pollTimer = window.setInterval(() => {
43059
+ const pollTimer = window.setInterval(() => {
43062
43060
  if (disposed || firstRenderFailed)
43063
43061
  settle(false);
43064
43062
  }, 100);
43065
43063
  });
43066
43064
  const appResult = {
43065
+ onPptMediaPermissionRequest: (callback) => {
43066
+ var _a2, _b2;
43067
+ const slide = (_a2 = docsViewer == null ? void 0 : docsViewer.slideController) == null ? void 0 : _a2.slide;
43068
+ return (_b2 = slide == null ? void 0 : slide.onPptMediaPermissionRequest(callback)) != null ? _b2 : () => void 0;
43069
+ },
43070
+ playPptMedia: () => {
43071
+ var _a2;
43072
+ (_a2 = docsViewer == null ? void 0 : docsViewer.slideController) == null ? void 0 : _a2.slide.playPptMedia();
43073
+ },
43067
43074
  onScaleChanged: (cb) => {
43068
43075
  if (!docsViewer) {
43069
43076
  return () => void 0;