@realsee/vreo 0.2.0-alpha.10 → 0.2.0-alpha.13

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 (78) hide show
  1. package/README.md +2 -2
  2. package/docs/assets/search.js +1 -1
  3. package/docs/classes/Player.AudioLike.html +52 -0
  4. package/docs/classes/Player.Controller.html +3 -3
  5. package/docs/classes/Player.Player-1.html +3 -3
  6. package/docs/classes/Player.VideoAgentMesh.html +12 -12
  7. package/docs/classes/Player.VideoAgentScene.html +1 -1
  8. package/docs/demo/assets/AppReact.388465e9.js +1 -0
  9. package/docs/demo/assets/default.0350c336.css +1 -0
  10. package/docs/demo/assets/default.f03f1cdd.js +64 -0
  11. package/docs/demo/assets/dynamic.3f7479e4.js +1 -0
  12. package/docs/demo/assets/examples.02abaf01.js +25 -0
  13. package/docs/demo/assets/examples.dac4a6fe.css +1 -0
  14. package/docs/demo/assets/index.485f13f7.js +1 -0
  15. package/docs/demo/assets/index.a7bafdff.css +1 -0
  16. package/docs/demo/assets/main.0b6b41ab.js +1 -0
  17. package/docs/demo/assets/react.aa3cf7f7.css +1 -0
  18. package/docs/demo/assets/react.b14dadc7.js +25 -0
  19. package/docs/demo/assets/vendor.d3e0753c.js +3903 -0
  20. package/docs/demo/assets/znRoyv06SZQeqA7m.0057e8ae.js +1 -0
  21. package/docs/demo/examples.html +18 -0
  22. package/docs/demo/index-react-dynamic.html +21 -0
  23. package/docs/demo/index-react.html +21 -0
  24. package/docs/demo/index.html +20 -0
  25. package/docs/enums/Player.InfoPanelStyleEnum.html +1 -1
  26. package/docs/enums/Player.InfoPanelTypeEnum.html +1 -1
  27. package/docs/enums/Player.PanoEffectEnum.html +1 -1
  28. package/docs/enums/Player.PanoTagEnum.html +1 -1
  29. package/docs/enums/Player.PanoTagStyleEnum.html +7 -0
  30. package/docs/enums/Player.VreoKeyframeEnum.html +12 -12
  31. package/docs/enums/fivePlugins.CameraMovementEffect.html +1 -1
  32. package/docs/enums/fivePlugins.Rotation.html +1 -1
  33. package/docs/index.html +2 -2
  34. package/docs/interfaces/Player.CustomVreoKeyframeProps.html +1 -1
  35. package/docs/interfaces/Player.PlayerConfigs.html +2 -2
  36. package/docs/interfaces/Player.Vertex.html +1 -1
  37. package/docs/interfaces/Player.VideoAgentMeshOptions.html +1 -1
  38. package/docs/interfaces/Player.VreoKeyframe.html +1 -1
  39. package/docs/interfaces/Player.VreoUnit.html +1 -1
  40. package/docs/interfaces/Player.VreoVideo.html +1 -1
  41. package/docs/interfaces/fivePlugins.CameraMovementOptsCallback.html +1 -1
  42. package/docs/interfaces/fivePlugins.CameraMovementPluginExportType.html +2 -2
  43. package/docs/interfaces/fivePlugins.ModelTVVideoPluginData.html +1 -1
  44. package/docs/interfaces/fivePlugins.ModelTVVideoPluginExportType.html +1 -1
  45. package/docs/interfaces/fivePlugins.ModelTVVideoPluginParameterType.html +1 -1
  46. package/docs/interfaces/react.VreoActionCallbacks.html +6 -6
  47. package/docs/interfaces/react.VreoProviderProps.html +1 -1
  48. package/docs/modules/Player.html +16 -14
  49. package/docs/modules/custom.html +1 -1
  50. package/docs/modules/fivePlugins.html +2 -2
  51. package/docs/modules/react.html +1 -1
  52. package/lib/Player/Controller.d.ts +1 -1
  53. package/lib/Player/index.d.ts +1 -1
  54. package/lib/Player/index.js +15 -15
  55. package/lib/Player/modules/VideoAgent/VideoAgentMesh.d.ts +4 -2
  56. package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +71 -23
  57. package/lib/Player/modules/VideoAgent/VideoAgentScene.js +2 -1
  58. package/lib/Player/modules/keyframes/ModelVideo/index.js +2 -2
  59. package/lib/Player/modules/keyframes/PanoTag/index.js +19 -6
  60. package/lib/Player/modules/keyframes/Prompter/index.js +2 -3
  61. package/lib/react/index.d.ts +2 -2
  62. package/lib/react/index.js +2 -2
  63. package/lib/shared-utils/AduioLike.d.ts +37 -0
  64. package/lib/shared-utils/AduioLike.js +165 -0
  65. package/lib/typings/VreoUnit.d.ts +14 -0
  66. package/lib/typings/VreoUnit.js +13 -1
  67. package/package.json +4 -4
  68. package/resources/Player/Controller.ts +2 -0
  69. package/resources/Player/index.tsx +42 -28
  70. package/resources/Player/modules/VideoAgent/VideoAgentMesh.ts +39 -9
  71. package/resources/Player/modules/VideoAgent/VideoAgentScene.ts +2 -0
  72. package/resources/Player/modules/keyframes/ModelVideo/index.tsx +1 -1
  73. package/resources/Player/modules/keyframes/PanoTag/index.tsx +31 -12
  74. package/resources/Player/modules/keyframes/Prompter/index.tsx +2 -1
  75. package/resources/react/index.tsx +2 -2
  76. package/resources/shared-utils/AduioLike.ts +108 -0
  77. package/resources/typings/VreoUnit.ts +15 -0
  78. package/stylesheets/default.css +25 -4
@@ -1 +1 @@
1
- <!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>react | Vreo</title><meta name="description" content="Documentation for Vreo"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Vreo</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Vreo</a></li><li><a href="react.html">react</a></li></ul><h1>Module react</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/react.VreoActionCallbacks.html" class="tsd-kind-icon">Vreo<wbr/>Action<wbr/>Callbacks</a></li><li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/react.VreoProviderProps.html" class="tsd-kind-icon">Vreo<wbr/>Provider<wbr/>Props</a></li></ul></section><section class="tsd-index-section "><h3>Variables</h3><ul class="tsd-index-list"><li class="tsd-kind-variable tsd-parent-kind-module"><a href="react.html#VreoProvider" class="tsd-kind-icon">Vreo<wbr/>Provider</a></li></ul></section><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function tsd-parent-kind-module"><a href="react.html#useVreoAction" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Action</a></li><li class="tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter"><a href="react.html#useVreoEventCallback" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Event<wbr/>Callback</a></li><li class="tsd-kind-function tsd-parent-kind-module"><a href="react.html#useVreoPausedState" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Paused<wbr/>State</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Variables</h2><section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-module"><a id="VreoProvider" class="tsd-anchor"></a><h3>Vreo<wbr/>Provider</h3><div class="tsd-signature tsd-kind-icon">Vreo<wbr/>Provider<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.FC</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/react.VreoProviderProps.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoProviderProps</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/realsee-developer/vreo/blob/69b8ee6/resources/react/index.tsx#L13">resources/react/index.tsx:13</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Functions</h2><section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module"><a id="useVreoAction" class="tsd-anchor"></a><h3>use<wbr/>Vreo<wbr/>Action</h3><ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module"><li class="tsd-signature tsd-kind-icon">use<wbr/>Vreo<wbr/>Action<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>dispose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>hide<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>load<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>vreoUnit<span class="tsd-signature-symbol">: </span><a href="../interfaces/Player.VreoUnit.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoUnit</a>, currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">; </span>pause<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>play<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>show<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> }</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/realsee-developer/vreo/blob/69b8ee6/resources/react/index.tsx#L76">resources/react/index.tsx:76</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span>dispose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>hide<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>load<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>vreoUnit<span class="tsd-signature-symbol">: </span><a href="../interfaces/Player.VreoUnit.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoUnit</a>, currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">; </span>pause<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>play<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>show<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> }</span></h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>dispose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>hide<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>load<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>vreoUnit<span class="tsd-signature-symbol">: </span><a href="../interfaces/Player.VreoUnit.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoUnit</a>, currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>vreoUnit<span class="tsd-signature-symbol">: </span><a href="../interfaces/Player.VreoUnit.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoUnit</a>, currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>vreoUnit: <a href="../interfaces/Player.VreoUnit.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoUnit</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> currentTime: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>pause<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>play<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>show<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter"><a id="useVreoEventCallback" class="tsd-anchor"></a><h3>use<wbr/>Vreo<wbr/>Event<wbr/>Callback</h3><ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">use<wbr/>Vreo<wbr/>Event<wbr/>Callback<span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span>, callback<span class="tsd-signature-symbol">: </span><a href="Player.html#VreoKeyframeEvent" class="tsd-signature-type" data-tsd-kind="Type alias">VreoKeyframeEvent</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">]</span>, deps<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">DependencyList</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/realsee-developer/vreo/blob/69b8ee6/resources/react/index.tsx#L93">resources/react/index.tsx:93</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>T<span class="tsd-signature-symbol">: </span><a href="../enums/Player.VreoKeyframeEnum.html" class="tsd-signature-type" data-tsd-kind="Enumeration">VreoKeyframeEnum</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;loaded&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;paused&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;playing&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;unknownKeyframeType&quot;</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h5></li><li><h5>callback: <a href="Player.html#VreoKeyframeEvent" class="tsd-signature-type" data-tsd-kind="Type alias">VreoKeyframeEvent</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">]</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> deps: <span class="tsd-signature-type">DependencyList</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module"><a id="useVreoPausedState" class="tsd-anchor"></a><h3>use<wbr/>Vreo<wbr/>Paused<wbr/>State</h3><ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module"><li class="tsd-signature tsd-kind-icon">use<wbr/>Vreo<wbr/>Paused<wbr/>State<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/realsee-developer/vreo/blob/69b8ee6/resources/react/index.tsx#L113">resources/react/index.tsx:113</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Modules</a></li><li class=" tsd-kind-module"><a href="Player.html">Player</a></li><li class=" tsd-kind-module"><a href="custom.html">custom</a></li><li class=" tsd-kind-module"><a href="fivePlugins.html">five<wbr/>Plugins</a></li><li class="current tsd-kind-module"><a href="react.html">react</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/react.VreoActionCallbacks.html" class="tsd-kind-icon">Vreo<wbr/>Action<wbr/>Callbacks</a></li><li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/react.VreoProviderProps.html" class="tsd-kind-icon">Vreo<wbr/>Provider<wbr/>Props</a></li><li class="tsd-kind-variable tsd-parent-kind-module"><a href="react.html#VreoProvider" class="tsd-kind-icon">Vreo<wbr/>Provider</a></li><li class="tsd-kind-function tsd-parent-kind-module"><a href="react.html#useVreoAction" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Action</a></li><li class="tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter"><a href="react.html#useVreoEventCallback" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Event<wbr/>Callback</a></li><li class="tsd-kind-function tsd-parent-kind-module"><a href="react.html#useVreoPausedState" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Paused<wbr/>State</a></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li><li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li><li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li><li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
1
+ <!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>react | Vreo</title><meta name="description" content="Documentation for Vreo"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Vreo</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Vreo</a></li><li><a href="react.html">react</a></li></ul><h1>Module react</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/react.VreoActionCallbacks.html" class="tsd-kind-icon">Vreo<wbr/>Action<wbr/>Callbacks</a></li><li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/react.VreoProviderProps.html" class="tsd-kind-icon">Vreo<wbr/>Provider<wbr/>Props</a></li></ul></section><section class="tsd-index-section "><h3>Variables</h3><ul class="tsd-index-list"><li class="tsd-kind-variable tsd-parent-kind-module"><a href="react.html#VreoProvider" class="tsd-kind-icon">Vreo<wbr/>Provider</a></li></ul></section><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function tsd-parent-kind-module"><a href="react.html#useVreoAction" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Action</a></li><li class="tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter"><a href="react.html#useVreoEventCallback" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Event<wbr/>Callback</a></li><li class="tsd-kind-function tsd-parent-kind-module"><a href="react.html#useVreoPausedState" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Paused<wbr/>State</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Variables</h2><section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-module"><a id="VreoProvider" class="tsd-anchor"></a><h3>Vreo<wbr/>Provider</h3><div class="tsd-signature tsd-kind-icon">Vreo<wbr/>Provider<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">React.FC</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/react.VreoProviderProps.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoProviderProps</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/realsee-developer/vreo/blob/3ba6c8c/resources/react/index.tsx#L13">resources/react/index.tsx:13</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Functions</h2><section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module"><a id="useVreoAction" class="tsd-anchor"></a><h3>use<wbr/>Vreo<wbr/>Action</h3><ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module"><li class="tsd-signature tsd-kind-icon">use<wbr/>Vreo<wbr/>Action<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>dispose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>hide<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>load<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>vreoUnit<span class="tsd-signature-symbol">: </span><a href="../interfaces/Player.VreoUnit.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoUnit</a>, currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">; </span>pause<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>play<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>show<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> }</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/realsee-developer/vreo/blob/3ba6c8c/resources/react/index.tsx#L76">resources/react/index.tsx:76</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span>dispose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>hide<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>load<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>vreoUnit<span class="tsd-signature-symbol">: </span><a href="../interfaces/Player.VreoUnit.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoUnit</a>, currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">; </span>pause<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span>play<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>show<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> }</span></h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>dispose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>hide<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>load<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>vreoUnit<span class="tsd-signature-symbol">: </span><a href="../interfaces/Player.VreoUnit.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoUnit</a>, currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>vreoUnit<span class="tsd-signature-symbol">: </span><a href="../interfaces/Player.VreoUnit.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoUnit</a>, currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>vreoUnit: <a href="../interfaces/Player.VreoUnit.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoUnit</a></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> currentTime: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>pause<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>play<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>currentTime<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> currentTime: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>show<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter"><a id="useVreoEventCallback" class="tsd-anchor"></a><h3>use<wbr/>Vreo<wbr/>Event<wbr/>Callback</h3><ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">use<wbr/>Vreo<wbr/>Event<wbr/>Callback<span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span>, callback<span class="tsd-signature-symbol">: </span><a href="Player.html#VreoKeyframeEvent" class="tsd-signature-type" data-tsd-kind="Type alias">VreoKeyframeEvent</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">]</span>, deps<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">DependencyList</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/realsee-developer/vreo/blob/3ba6c8c/resources/react/index.tsx#L93">resources/react/index.tsx:93</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>T<span class="tsd-signature-symbol">: </span><a href="../enums/Player.VreoKeyframeEnum.html" class="tsd-signature-type" data-tsd-kind="Enumeration">VreoKeyframeEnum</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;loaded&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;paused&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;playing&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;unknownKeyframeType&quot;</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h5></li><li><h5>callback: <a href="Player.html#VreoKeyframeEvent" class="tsd-signature-type" data-tsd-kind="Type alias">VreoKeyframeEvent</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">]</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> deps: <span class="tsd-signature-type">DependencyList</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module"><a id="useVreoPausedState" class="tsd-anchor"></a><h3>use<wbr/>Vreo<wbr/>Paused<wbr/>State</h3><ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module"><li class="tsd-signature tsd-kind-icon">use<wbr/>Vreo<wbr/>Paused<wbr/>State<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/realsee-developer/vreo/blob/3ba6c8c/resources/react/index.tsx#L113">resources/react/index.tsx:113</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Modules</a></li><li class=" tsd-kind-module"><a href="Player.html">Player</a></li><li class=" tsd-kind-module"><a href="custom.html">custom</a></li><li class=" tsd-kind-module"><a href="fivePlugins.html">five<wbr/>Plugins</a></li><li class="current tsd-kind-module"><a href="react.html">react</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/react.VreoActionCallbacks.html" class="tsd-kind-icon">Vreo<wbr/>Action<wbr/>Callbacks</a></li><li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/react.VreoProviderProps.html" class="tsd-kind-icon">Vreo<wbr/>Provider<wbr/>Props</a></li><li class="tsd-kind-variable tsd-parent-kind-module"><a href="react.html#VreoProvider" class="tsd-kind-icon">Vreo<wbr/>Provider</a></li><li class="tsd-kind-function tsd-parent-kind-module"><a href="react.html#useVreoAction" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Action</a></li><li class="tsd-kind-function tsd-parent-kind-module tsd-has-type-parameter"><a href="react.html#useVreoEventCallback" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Event<wbr/>Callback</a></li><li class="tsd-kind-function tsd-parent-kind-module"><a href="react.html#useVreoPausedState" class="tsd-kind-icon">use<wbr/>Vreo<wbr/>Paused<wbr/>State</a></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li><li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li><li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li><li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
@@ -31,7 +31,7 @@ export declare class Controller extends Subscribe<VreoKeyframeEvent> {
31
31
  get ready(): boolean;
32
32
  get currentTime(): number;
33
33
  get currentKeyframes(): VreoKeyframe[];
34
- get videoInstance(): HTMLAudioElement | undefined;
34
+ get videoInstance(): HTMLAudioElement | import("../shared-utils/AduioLike").AudioLike | undefined;
35
35
  /**
36
36
  * 逐帧任务
37
37
  */
@@ -8,7 +8,7 @@ export declare class Player extends Subscribe<VreoKeyframeEvent> {
8
8
  constructor(five: Five, configs?: Partial<PlayerConfigs>);
9
9
  load(vreoUnit: VreoUnit, currentTime?: number, preload?: boolean, force?: boolean): Promise<boolean>;
10
10
  get paused(): boolean;
11
- play(): boolean;
11
+ play(currentTime?: number): boolean;
12
12
  pause(): void;
13
13
  show(): void;
14
14
  hide(): void;
@@ -115,6 +115,8 @@ var Player = /*#__PURE__*/function (_Subscribe) {
115
115
  var _load = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(vreoUnit) {
116
116
  var _this$controller$vide,
117
117
  _this$configs$imageOp,
118
+ _this$controller$vide2,
119
+ _this$controller$vide3,
118
120
  _this2 = this;
119
121
 
120
122
  var currentTime,
@@ -123,10 +125,7 @@ var Player = /*#__PURE__*/function (_Subscribe) {
123
125
  panoIndexMap,
124
126
  panoIndexs,
125
127
  i,
126
- _this$controller$vide2,
127
- _this$controller$vide3,
128
128
  _args = arguments;
129
-
130
129
  return regeneratorRuntime.wrap(function _callee$(_context) {
131
130
  while (1) {
132
131
  switch (_context.prev = _context.next) {
@@ -216,28 +215,21 @@ var Player = /*#__PURE__*/function (_Subscribe) {
216
215
  this.emit('loaded', vreoUnit);
217
216
  this.controller.emit('loaded', vreoUnit);
218
217
 
219
- if (!vreoUnit.video.url) {
220
- _context.next = 29;
221
- break;
222
- }
223
-
224
218
  if ((_this$controller$vide2 = this.controller.videoAgentScene) !== null && _this$controller$vide2 !== void 0 && _this$controller$vide2.videoAgentMesh.videoInstance) {
225
219
  this.controller.videoAgentScene.videoAgentMesh.videoInstance.currentTime = currentTime / 1000;
226
220
  }
227
221
 
228
- _context.next = 28;
229
- return (_this$controller$vide3 = this.controller.videoAgentScene) === null || _this$controller$vide3 === void 0 ? void 0 : _this$controller$vide3.videoAgentMesh.play(vreoUnit.video.url);
222
+ _context.next = 27;
223
+ return (_this$controller$vide3 = this.controller.videoAgentScene) === null || _this$controller$vide3 === void 0 ? void 0 : _this$controller$vide3.videoAgentMesh.play(vreoUnit.video.url, currentTime / 1000, vreoUnit.video.duration);
230
224
 
231
- case 28:
225
+ case 27:
232
226
  this.play();
233
-
234
- case 29:
235
227
  this.controller.run(function (type, keyframe) {
236
228
  return _this2.emit(type, keyframe);
237
229
  });
238
230
  return _context.abrupt("return", true);
239
231
 
240
- case 31:
232
+ case 30:
241
233
  case "end":
242
234
  return _context.stop();
243
235
  }
@@ -258,8 +250,16 @@ var Player = /*#__PURE__*/function (_Subscribe) {
258
250
  }
259
251
  }, {
260
252
  key: "play",
261
- value: function play() {
253
+ value: function play(currentTime) {
262
254
  if (this.controller.playing) return true;
255
+
256
+ if (currentTime && this.controller.videoInstance) {
257
+ this.controller.videoInstance.currentTime = currentTime / 1000;
258
+ }
259
+
260
+ Object.assign(window, {
261
+ $vreoController: this.controller
262
+ });
263
263
  this.controller.setPlaying(true);
264
264
  return true;
265
265
  }
@@ -1,4 +1,5 @@
1
1
  import * as THREE from 'three';
2
+ import AudioLike from '../../../shared-utils/AduioLike';
2
3
  export interface VideoAgentMeshOptions {
3
4
  videoInstance?: HTMLVideoElement;
4
5
  audioInstance?: HTMLAudioElement;
@@ -12,8 +13,9 @@ export declare class VideoAgentMesh extends THREE.Mesh {
12
13
  freeze: boolean;
13
14
  paused: boolean;
14
15
  audioInstance: HTMLAudioElement;
16
+ audioLikeInstance: AudioLike;
15
17
  $removeEventListener: () => void;
16
- get videoInstance(): HTMLAudioElement;
18
+ get videoInstance(): HTMLAudioElement | AudioLike;
17
19
  /**
18
20
  *
19
21
  * @param width
@@ -24,7 +26,7 @@ export declare class VideoAgentMesh extends THREE.Mesh {
24
26
  */
25
27
  constructor(width: number, height: number, widthSegments: number, heightSegments: number, options?: VideoAgentMeshOptions);
26
28
  private update;
27
- play(videoUrl?: string): Promise<unknown>;
29
+ play(videoUrl?: string, currentTime?: number, duration?: number): Promise<unknown>;
28
30
  /**
29
31
  * 转成毫秒,保障精准度
30
32
  */
@@ -13,6 +13,10 @@ var _Preloader = require("../../../shared-utils/Preloader");
13
13
 
14
14
  var _mobx = require("mobx");
15
15
 
16
+ var _AduioLike = _interopRequireDefault(require("../../../shared-utils/AduioLike"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
16
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
21
 
18
22
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -66,6 +70,8 @@ var VideoAgentMesh = /*#__PURE__*/function (_THREE$Mesh) {
66
70
  * @param options
67
71
  */
68
72
  function VideoAgentMesh(width, height, widthSegments, heightSegments) {
73
+ var _this$options$videoIn, _this$options$videoIn2;
74
+
69
75
  var _this;
70
76
 
71
77
  var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
@@ -127,6 +133,7 @@ var VideoAgentMesh = /*#__PURE__*/function (_THREE$Mesh) {
127
133
  _this.audioInstance = options.audioInstance;
128
134
  }
129
135
 
136
+ _this.audioLikeInstance = new _AduioLike["default"]();
130
137
  (0, _mobx.makeObservable)(_assertThisInitialized(_this), {
131
138
  paused: _mobx.observable
132
139
  });
@@ -145,14 +152,30 @@ var VideoAgentMesh = /*#__PURE__*/function (_THREE$Mesh) {
145
152
  return updatePaused(false);
146
153
  };
147
154
 
148
- _this.videoInstance.addEventListener('pause', onPause);
155
+ _this.audioInstance.addEventListener('pause', onPause);
156
+
157
+ _this.audioInstance.addEventListener('play', onPlay);
158
+
159
+ (_this$options$videoIn = _this.options.videoInstance) === null || _this$options$videoIn === void 0 ? void 0 : _this$options$videoIn.addEventListener('pause', onPause);
160
+ (_this$options$videoIn2 = _this.options.videoInstance) === null || _this$options$videoIn2 === void 0 ? void 0 : _this$options$videoIn2.addEventListener('play', onPlay);
149
161
 
150
- _this.videoInstance.addEventListener('play', onPlay);
162
+ _this.audioLikeInstance.addEventListener('pause', onPause);
163
+
164
+ _this.audioLikeInstance.addEventListener('play', onPlay);
151
165
 
152
166
  _this.$removeEventListener = function () {
153
- _this.videoInstance.removeEventListener('pause', onPause);
167
+ var _this$options$videoIn3, _this$options$videoIn4;
168
+
169
+ _this.audioInstance.removeEventListener('pause', onPause);
170
+
171
+ _this.audioInstance.removeEventListener('play', onPlay);
172
+
173
+ (_this$options$videoIn3 = _this.options.videoInstance) === null || _this$options$videoIn3 === void 0 ? void 0 : _this$options$videoIn3.removeEventListener('pause', onPause);
174
+ (_this$options$videoIn4 = _this.options.videoInstance) === null || _this$options$videoIn4 === void 0 ? void 0 : _this$options$videoIn4.removeEventListener('play', onPlay);
154
175
 
155
- _this.videoInstance.removeEventListener('play', onPlay);
176
+ _this.audioLikeInstance.removeEventListener('pause', onPause);
177
+
178
+ _this.audioLikeInstance.removeEventListener('play', onPlay);
156
179
  };
157
180
 
158
181
  return _this;
@@ -163,6 +186,10 @@ var VideoAgentMesh = /*#__PURE__*/function (_THREE$Mesh) {
163
186
  get: function get() {
164
187
  var _this$videoUrl;
165
188
 
189
+ if (!this.videoUrl) {
190
+ return this.audioLikeInstance;
191
+ }
192
+
166
193
  if ((_this$videoUrl = this.videoUrl) !== null && _this$videoUrl !== void 0 && _this$videoUrl.endsWith('mp3')) {
167
194
  return this.audioInstance;
168
195
  }
@@ -245,64 +272,85 @@ var VideoAgentMesh = /*#__PURE__*/function (_THREE$Mesh) {
245
272
  var _this3 = this;
246
273
 
247
274
  var videoUrl,
275
+ currentTime,
276
+ duration,
248
277
  _args3 = arguments;
249
278
  return regeneratorRuntime.wrap(function _callee3$(_context3) {
250
279
  while (1) {
251
280
  switch (_context3.prev = _context3.next) {
252
281
  case 0:
253
282
  videoUrl = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : '';
283
+ currentTime = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : 0;
284
+ duration = _args3.length > 2 ? _args3[2] : undefined;
254
285
  videoUrl = videoUrl || '';
255
286
 
256
- if (videoUrl) {
287
+ if (!(duration && !videoUrl)) {
257
288
  _context3.next = 10;
258
289
  break;
259
290
  }
260
291
 
292
+ if (this.currentTime) {
293
+ this.videoInstance.currentTime = currentTime;
294
+ }
295
+
296
+ this.videoInstance.duration = duration;
297
+ this.videoUrl = '';
298
+ this.videoInstance.play();
299
+ return _context3.abrupt("return", true);
300
+
301
+ case 10:
302
+ if (videoUrl) {
303
+ _context3.next = 18;
304
+ break;
305
+ }
306
+
261
307
  if (!this.videoUrl) {
262
- _context3.next = 8;
308
+ _context3.next = 16;
263
309
  break;
264
310
  }
265
311
 
266
- _context3.next = 6;
312
+ _context3.next = 14;
267
313
  return this.videoInstance.play();
268
314
 
269
- case 6:
270
- _context3.next = 9;
315
+ case 14:
316
+ _context3.next = 17;
271
317
  break;
272
318
 
273
- case 8:
319
+ case 16:
274
320
  console.warn('警告:视频资源未初始化。');
275
321
 
276
- case 9:
322
+ case 17:
277
323
  return _context3.abrupt("return", true);
278
324
 
279
- case 10:
325
+ case 18:
326
+ console.log('play', videoUrl, this.videoUrl);
327
+
280
328
  if (!(videoUrl === this.videoUrl)) {
281
- _context3.next = 15;
329
+ _context3.next = 24;
282
330
  break;
283
331
  }
284
332
 
285
- this.videoInstance.currentTime = 0;
286
- _context3.next = 14;
333
+ this.videoInstance.currentTime = currentTime;
334
+ _context3.next = 23;
287
335
  return this.videoInstance.play();
288
336
 
289
- case 14:
337
+ case 23:
290
338
  return _context3.abrupt("return", true);
291
339
 
292
- case 15:
293
- _context3.next = 17;
340
+ case 24:
341
+ _context3.next = 26;
294
342
  return this.update(videoUrl);
295
343
 
296
- case 17:
344
+ case 26:
297
345
  this.videoInstance.pause();
298
- _context3.next = 20;
346
+ _context3.next = 29;
299
347
  return new Promise(function (resolve) {
300
348
  return setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
301
349
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
302
350
  while (1) {
303
351
  switch (_context2.prev = _context2.next) {
304
352
  case 0:
305
- _this3.videoInstance.currentTime = 0;
353
+ _this3.videoInstance.currentTime = currentTime;
306
354
  _context2.next = 3;
307
355
  return _this3.videoInstance.play();
308
356
 
@@ -318,10 +366,10 @@ var VideoAgentMesh = /*#__PURE__*/function (_THREE$Mesh) {
318
366
  })), 20);
319
367
  });
320
368
 
321
- case 20:
369
+ case 29:
322
370
  return _context3.abrupt("return", _context3.sent);
323
371
 
324
- case 21:
372
+ case 30:
325
373
  case "end":
326
374
  return _context3.stop();
327
375
  }
@@ -38,7 +38,8 @@ var VideoAgentScene = function VideoAgentScene(container) {
38
38
  _defineProperty(this, "run", function () {
39
39
  var _this$videoAgentMesh$;
40
40
 
41
- var domElement = _this.renderer.domElement; // 视频开始 1s 不渲染:规避某些设备黑屏闪烁问题。视频前 2s 是最好是静默的。
41
+ var domElement = _this.renderer.domElement; // console.log('renderder', this.videoAgentMesh.paused, this.videoAgentMesh.freeze)
42
+ // 视频开始 1s 不渲染:规避某些设备黑屏闪烁问题。视频前 2s 是最好是静默的。
42
43
 
43
44
  if (!(_this.videoAgentMesh.paused || _this.videoAgentMesh.freeze) && _this.videoAgentMesh.currentTime > 1000) {
44
45
  _this.renderer.render(_this.scene, _this.camera);
@@ -11,14 +11,14 @@ var React = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var THREE = _interopRequireWildcard(require("three"));
13
13
 
14
+ var _hooks = require("../../../hooks");
15
+
14
16
  var _ModelTVVideoPlugin = require("../../../../fivePlugins/ModelTVVideoPlugin");
15
17
 
16
18
  var _createTransMatrix = require("../../../../shared-utils/createTransMatrix");
17
19
 
18
20
  var _VreoUnit = require("../../../../typings/VreoUnit");
19
21
 
20
- var _hooks = require("../../../hooks");
21
-
22
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
23
 
24
24
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -75,7 +75,8 @@ function PanoTag() {
75
75
  vertex: vertex,
76
76
  text: panoTagData.text || _VreoUnit.PanoTagEnum.Text,
77
77
  type: panoTagData.type,
78
- imgUrl: panoTagData.imgUrl
78
+ imgUrl: panoTagData.imgUrl,
79
+ style: panoTagData.style || _VreoUnit.PanoTagStyleEnum.Growth
79
80
  });
80
81
  setPos({
81
82
  left: left,
@@ -139,6 +140,23 @@ function PanoTag() {
139
140
  return undefined;
140
141
  }();
141
142
 
143
+ if ((state === null || state === void 0 ? void 0 : state.style) === _VreoUnit.PanoTagStyleEnum.Expand) {
144
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
145
+ className: (0, _classnames["default"])('PanoTag', {
146
+ 'PanoTag--expand': true,
147
+ 'PanoTag--notHidden': state
148
+ }),
149
+ style: {
150
+ left: ((pos === null || pos === void 0 ? void 0 : pos.left) || 0) + 'px',
151
+ top: ((pos === null || pos === void 0 ? void 0 : pos.top) || 0) + 'px'
152
+ }
153
+ }, /*#__PURE__*/React.createElement("div", {
154
+ className: 'PanoTag-box PanoTag-box--' + ((state === null || state === void 0 ? void 0 : state.type) || '')
155
+ }, boxContent), /*#__PURE__*/React.createElement("div", {
156
+ className: "PanoTag-guideline"
157
+ })));
158
+ }
159
+
142
160
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
143
161
  className: (0, _classnames["default"])('PanoTag', {
144
162
  'PanoTag--notHidden': state
@@ -158,11 +176,6 @@ function PanoTag() {
158
176
  }), /*#__PURE__*/React.createElement("span", {
159
177
  className: "PanoTag-straightline"
160
178
  })), /*#__PURE__*/React.createElement("div", {
161
- onClick: function onClick() {
162
- if (state !== null && state !== void 0 && state.imgUrl) {// @TODO
163
- // setDrawerVisible(true)
164
- }
165
- },
166
179
  className: 'PanoTag-box PanoTag-box--' + ((state === null || state === void 0 ? void 0 : state.type) || '')
167
180
  }, boxContent))));
168
181
  }
@@ -67,9 +67,8 @@ function Prompter() {
67
67
 
68
68
  ref.current = setTimeout(function () {
69
69
  setHidden(true);
70
- setTimeout(function () {
71
- return setText('');
72
- }, 500);
70
+ setText(''); // setTimeout(() => setText(''), 500)
71
+
73
72
  if (ref.current) clearTimeout(ref.current);
74
73
  ref.current = null;
75
74
  }, end - start);
@@ -20,7 +20,7 @@ export interface VreoActionCallbacks {
20
20
  /**
21
21
  * 播放。
22
22
  */
23
- play: () => void;
23
+ play: (currentTime?: number) => void;
24
24
  /**
25
25
  * 暂停。
26
26
  */
@@ -42,7 +42,7 @@ export declare function useVreoAction(): {
42
42
  load: (vreoUnit: VreoUnit, currentTime?: number | undefined) => Promise<boolean>;
43
43
  pause: () => void;
44
44
  show: () => void;
45
- play: () => boolean;
45
+ play: (currentTime?: number | undefined) => boolean;
46
46
  hide: () => void;
47
47
  dispose: () => void;
48
48
  };
@@ -79,8 +79,8 @@ function useVreoAction() {
79
79
  var load = React.useCallback(function (vreoUnit, currentTime) {
80
80
  return player.load(vreoUnit, currentTime);
81
81
  }, [player]);
82
- var play = React.useCallback(function () {
83
- return player.play();
82
+ var play = React.useCallback(function (currentTime) {
83
+ return player.play(currentTime || 0);
84
84
  }, [player]);
85
85
  var pause = React.useCallback(function () {
86
86
  return player.pause();
@@ -0,0 +1,37 @@
1
+ import { Subscribe } from '@realsee/five';
2
+ /**
3
+ * 模拟 `<Audio>` 事件。
4
+ */
5
+ export declare type AudioLikeEvent = {
6
+ play: () => void;
7
+ pause: () => void;
8
+ timeupdate: () => void;
9
+ ended: () => void;
10
+ };
11
+ /**
12
+ * 模拟 `<Audio>` 功能:没有音频,但执行逻辑跟 `<Audio>` 相似。
13
+ */
14
+ export declare class AudioLike extends Subscribe<AudioLikeEvent> {
15
+ private $timestamp;
16
+ private $currentTime;
17
+ private $duration;
18
+ private stopInterval?;
19
+ muted: boolean;
20
+ src: string;
21
+ setAttribute(name: string, value: string): void;
22
+ constructor({ duration }?: {
23
+ duration?: number;
24
+ });
25
+ play(): void;
26
+ pause(): void;
27
+ requestAnimationFrameLoop(): void;
28
+ get currentTime(): number;
29
+ set currentTime(time: number);
30
+ get duration(): number;
31
+ set duration(duration: number);
32
+ get ended(): boolean;
33
+ get paused(): boolean;
34
+ addEventListener(evtName: keyof AudioLikeEvent, callback: () => void, useCapture?: boolean): void;
35
+ removeEventListener(evtName: keyof AudioLikeEvent, callback: () => void, useCapture?: boolean): void;
36
+ }
37
+ export default AudioLike;