@realsee/vreo 0.2.0-alpha.12 → 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.
- package/README.md +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Player.AudioLike.html +52 -0
- package/docs/classes/Player.Controller.html +3 -3
- package/docs/classes/Player.Player-1.html +3 -3
- package/docs/classes/Player.VideoAgentMesh.html +12 -12
- package/docs/classes/Player.VideoAgentScene.html +1 -1
- package/docs/demo/assets/AppReact.388465e9.js +1 -0
- package/docs/demo/assets/default.0350c336.css +1 -0
- package/docs/demo/assets/default.f03f1cdd.js +64 -0
- package/docs/demo/assets/dynamic.3f7479e4.js +1 -0
- package/docs/demo/assets/examples.02abaf01.js +25 -0
- package/docs/demo/assets/examples.dac4a6fe.css +1 -0
- package/docs/demo/assets/index.485f13f7.js +1 -0
- package/docs/demo/assets/index.a7bafdff.css +1 -0
- package/docs/demo/assets/main.0b6b41ab.js +1 -0
- package/docs/demo/assets/react.aa3cf7f7.css +1 -0
- package/docs/demo/assets/react.b14dadc7.js +25 -0
- package/docs/demo/assets/vendor.d3e0753c.js +3903 -0
- package/docs/demo/assets/znRoyv06SZQeqA7m.0057e8ae.js +1 -0
- package/docs/demo/examples.html +18 -0
- package/docs/demo/index-react-dynamic.html +21 -0
- package/docs/demo/index-react.html +21 -0
- package/docs/demo/index.html +20 -0
- package/docs/enums/Player.InfoPanelStyleEnum.html +1 -1
- package/docs/enums/Player.InfoPanelTypeEnum.html +1 -1
- package/docs/enums/Player.PanoEffectEnum.html +1 -1
- package/docs/enums/Player.PanoTagEnum.html +1 -1
- package/docs/enums/Player.PanoTagStyleEnum.html +2 -2
- package/docs/enums/Player.VreoKeyframeEnum.html +12 -12
- package/docs/enums/fivePlugins.CameraMovementEffect.html +1 -1
- package/docs/enums/fivePlugins.Rotation.html +1 -1
- package/docs/index.html +1 -1
- package/docs/interfaces/Player.CustomVreoKeyframeProps.html +1 -1
- package/docs/interfaces/Player.PlayerConfigs.html +2 -2
- package/docs/interfaces/Player.Vertex.html +1 -1
- package/docs/interfaces/Player.VideoAgentMeshOptions.html +1 -1
- package/docs/interfaces/Player.VreoKeyframe.html +1 -1
- package/docs/interfaces/Player.VreoUnit.html +1 -1
- package/docs/interfaces/Player.VreoVideo.html +1 -1
- package/docs/interfaces/fivePlugins.CameraMovementOptsCallback.html +1 -1
- package/docs/interfaces/fivePlugins.CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/react.VreoActionCallbacks.html +6 -6
- package/docs/interfaces/react.VreoProviderProps.html +1 -1
- package/docs/modules/Player.html +16 -14
- package/docs/modules/custom.html +1 -1
- package/docs/modules/fivePlugins.html +2 -2
- package/docs/modules/react.html +1 -1
- package/lib/Player/Controller.d.ts +1 -1
- package/lib/Player/index.js +9 -15
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.d.ts +4 -2
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +67 -21
- package/lib/Player/modules/VideoAgent/VideoAgentScene.js +2 -1
- package/lib/shared-utils/AduioLike.d.ts +37 -0
- package/lib/shared-utils/AduioLike.js +165 -0
- package/package.json +2 -2
- package/resources/Player/Controller.ts +2 -0
- package/resources/Player/index.tsx +38 -28
- package/resources/Player/modules/VideoAgent/VideoAgentMesh.ts +37 -7
- package/resources/Player/modules/VideoAgent/VideoAgentScene.ts +2 -0
- package/resources/shared-utils/AduioLike.ts +108 -0
package/docs/modules/react.html
CHANGED
|
@@ -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"><</span><a href="../interfaces/react.VreoProviderProps.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoProviderProps</a><span class="tsd-signature-symbol">></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/aad4c5d/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"> => </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"> => </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"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></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"> => </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"> => </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"> => </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/aad4c5d/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"> => </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"> => </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"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></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"> => </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"> => </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"> => </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"> => </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"> => </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"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></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"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></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"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></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"> => </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"> => </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"> => </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"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></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/aad4c5d/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">"loaded"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"paused"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"playing"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"unknownKeyframeType"</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/aad4c5d/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"><</span><a href="../interfaces/react.VreoProviderProps.html" class="tsd-signature-type" data-tsd-kind="Interface">VreoProviderProps</a><span class="tsd-signature-symbol">></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"> => </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"> => </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"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></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"> => </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"> => </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"> => </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"> => </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"> => </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"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></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"> => </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"> => </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"> => </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"> => </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"> => </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"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></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"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></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"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></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"> => </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"> => </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"> => </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"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></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">"loaded"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"paused"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"playing"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"unknownKeyframeType"</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
|
*/
|
package/lib/Player/index.js
CHANGED
|
@@ -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 =
|
|
229
|
-
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);
|
|
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
|
|
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
|
|
232
|
+
case 30:
|
|
241
233
|
case "end":
|
|
242
234
|
return _context.stop();
|
|
243
235
|
}
|
|
@@ -262,10 +254,12 @@ var Player = /*#__PURE__*/function (_Subscribe) {
|
|
|
262
254
|
if (this.controller.playing) return true;
|
|
263
255
|
|
|
264
256
|
if (currentTime && this.controller.videoInstance) {
|
|
265
|
-
// Object.assign(window, {$vreoController: this.controller})
|
|
266
257
|
this.controller.videoInstance.currentTime = currentTime / 1000;
|
|
267
258
|
}
|
|
268
259
|
|
|
260
|
+
Object.assign(window, {
|
|
261
|
+
$vreoController: this.controller
|
|
262
|
+
});
|
|
269
263
|
this.controller.setPlaying(true);
|
|
270
264
|
return true;
|
|
271
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, currentTime?: number): 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.
|
|
155
|
+
_this.audioInstance.addEventListener('pause', onPause);
|
|
156
|
+
|
|
157
|
+
_this.audioInstance.addEventListener('play', onPlay);
|
|
149
158
|
|
|
150
|
-
_this.videoInstance.addEventListener('
|
|
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);
|
|
161
|
+
|
|
162
|
+
_this.audioLikeInstance.addEventListener('pause', onPause);
|
|
163
|
+
|
|
164
|
+
_this.audioLikeInstance.addEventListener('play', onPlay);
|
|
151
165
|
|
|
152
166
|
_this.$removeEventListener = function () {
|
|
153
|
-
_this
|
|
167
|
+
var _this$options$videoIn3, _this$options$videoIn4;
|
|
168
|
+
|
|
169
|
+
_this.audioInstance.removeEventListener('pause', onPause);
|
|
170
|
+
|
|
171
|
+
_this.audioInstance.removeEventListener('play', onPlay);
|
|
154
172
|
|
|
155
|
-
_this.videoInstance.removeEventListener('
|
|
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);
|
|
175
|
+
|
|
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
|
}
|
|
@@ -246,6 +273,7 @@ var VideoAgentMesh = /*#__PURE__*/function (_THREE$Mesh) {
|
|
|
246
273
|
|
|
247
274
|
var videoUrl,
|
|
248
275
|
currentTime,
|
|
276
|
+
duration,
|
|
249
277
|
_args3 = arguments;
|
|
250
278
|
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
251
279
|
while (1) {
|
|
@@ -253,51 +281,69 @@ var VideoAgentMesh = /*#__PURE__*/function (_THREE$Mesh) {
|
|
|
253
281
|
case 0:
|
|
254
282
|
videoUrl = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : '';
|
|
255
283
|
currentTime = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : 0;
|
|
284
|
+
duration = _args3.length > 2 ? _args3[2] : undefined;
|
|
256
285
|
videoUrl = videoUrl || '';
|
|
257
286
|
|
|
287
|
+
if (!(duration && !videoUrl)) {
|
|
288
|
+
_context3.next = 10;
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
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:
|
|
258
302
|
if (videoUrl) {
|
|
259
|
-
_context3.next =
|
|
303
|
+
_context3.next = 18;
|
|
260
304
|
break;
|
|
261
305
|
}
|
|
262
306
|
|
|
263
307
|
if (!this.videoUrl) {
|
|
264
|
-
_context3.next =
|
|
308
|
+
_context3.next = 16;
|
|
265
309
|
break;
|
|
266
310
|
}
|
|
267
311
|
|
|
268
|
-
_context3.next =
|
|
312
|
+
_context3.next = 14;
|
|
269
313
|
return this.videoInstance.play();
|
|
270
314
|
|
|
271
|
-
case
|
|
272
|
-
_context3.next =
|
|
315
|
+
case 14:
|
|
316
|
+
_context3.next = 17;
|
|
273
317
|
break;
|
|
274
318
|
|
|
275
|
-
case
|
|
319
|
+
case 16:
|
|
276
320
|
console.warn('警告:视频资源未初始化。');
|
|
277
321
|
|
|
278
|
-
case
|
|
322
|
+
case 17:
|
|
279
323
|
return _context3.abrupt("return", true);
|
|
280
324
|
|
|
281
|
-
case
|
|
325
|
+
case 18:
|
|
326
|
+
console.log('play', videoUrl, this.videoUrl);
|
|
327
|
+
|
|
282
328
|
if (!(videoUrl === this.videoUrl)) {
|
|
283
|
-
_context3.next =
|
|
329
|
+
_context3.next = 24;
|
|
284
330
|
break;
|
|
285
331
|
}
|
|
286
332
|
|
|
287
333
|
this.videoInstance.currentTime = currentTime;
|
|
288
|
-
_context3.next =
|
|
334
|
+
_context3.next = 23;
|
|
289
335
|
return this.videoInstance.play();
|
|
290
336
|
|
|
291
|
-
case
|
|
337
|
+
case 23:
|
|
292
338
|
return _context3.abrupt("return", true);
|
|
293
339
|
|
|
294
|
-
case
|
|
295
|
-
_context3.next =
|
|
340
|
+
case 24:
|
|
341
|
+
_context3.next = 26;
|
|
296
342
|
return this.update(videoUrl);
|
|
297
343
|
|
|
298
|
-
case
|
|
344
|
+
case 26:
|
|
299
345
|
this.videoInstance.pause();
|
|
300
|
-
_context3.next =
|
|
346
|
+
_context3.next = 29;
|
|
301
347
|
return new Promise(function (resolve) {
|
|
302
348
|
return setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
303
349
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
@@ -320,10 +366,10 @@ var VideoAgentMesh = /*#__PURE__*/function (_THREE$Mesh) {
|
|
|
320
366
|
})), 20);
|
|
321
367
|
});
|
|
322
368
|
|
|
323
|
-
case
|
|
369
|
+
case 29:
|
|
324
370
|
return _context3.abrupt("return", _context3.sent);
|
|
325
371
|
|
|
326
|
-
case
|
|
372
|
+
case 30:
|
|
327
373
|
case "end":
|
|
328
374
|
return _context3.stop();
|
|
329
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; //
|
|
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);
|
|
@@ -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;
|