@realsee/vreo 0.2.0-alpha.5 → 0.2.0-alpha.8
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 +47 -3
- package/docs/assets/custom.css +2 -2
- package/docs/assets/search.js +1 -1
- package/docs/classes/Player.Controller.html +3 -3
- package/docs/classes/Player.Player-1.html +3 -3
- package/docs/classes/Player.VideoAgentMesh.html +11 -11
- package/docs/classes/Player.VideoAgentScene.html +1 -1
- package/docs/enums/Player.InfoPanelStyleEnum.html +1 -0
- 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.VreoKeyframeEnum.html +12 -12
- package/docs/enums/fivePlugins.CameraMovementEffect.html +1 -1
- package/docs/enums/fivePlugins.Rotation.html +1 -1
- package/docs/index.html +26 -2
- package/docs/interfaces/Player.CustomVreoKeyframeProps.html +1 -1
- package/docs/interfaces/Player.PlayerConfigs.html +3 -3
- 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 +13 -13
- package/docs/modules/custom.html +1 -1
- package/docs/modules/fivePlugins.html +2 -2
- package/docs/modules/react.html +1 -1
- package/lib/PlayController/createHTMLAudioElement.d.ts +1 -0
- package/lib/PlayController/createHTMLAudioElement.js +47 -0
- package/lib/PlayController/index.d.ts +38 -0
- package/lib/PlayController/index.js +300 -0
- package/lib/Player/Controller.d.ts +2 -0
- package/lib/Player/Controller.js +14 -0
- package/lib/Player/custom/SpatialScenePanel/index.d.ts +2 -2
- package/lib/Player/custom/SpatialScenePanel/index.js +96 -15
- package/lib/Player/index.d.ts +1 -1
- package/lib/Player/index.js +71 -10
- package/lib/Player/modules/PopUp/index.d.ts +2 -0
- package/lib/Player/modules/PopUp/index.js +43 -0
- package/lib/Player/modules/keyframes/CameraMovement/index.js +41 -5
- package/lib/Player/modules/keyframes/InfoPanel/index.js +73 -35
- package/lib/Player/modules/keyframes/UpdateVRPanorama/index.js +23 -15
- package/lib/Player/typings.d.ts +4 -0
- package/lib/fivePlugins/CameraMovementPlugin/index.js +101 -90
- package/lib/fivePlugins/CameraMovementPlugin/typings.d.ts +3 -2
- package/lib/typings/VreoUnit.d.ts +9 -3
- package/lib/typings/VreoUnit.js +14 -6
- package/package.json +2 -2
- package/resources/PlayController/createHTMLAudioElement.ts +53 -0
- package/resources/PlayController/index.ts +167 -0
- package/resources/Player/Controller.ts +12 -0
- package/resources/Player/custom/SpatialScenePanel/index.tsx +143 -34
- package/resources/Player/index.tsx +36 -2
- package/resources/Player/modules/PopUp/index.tsx +26 -0
- package/resources/Player/modules/keyframes/CameraMovement/index.tsx +7 -3
- package/resources/Player/modules/keyframes/InfoPanel/index.tsx +79 -34
- package/resources/Player/modules/keyframes/UpdateVRPanorama/index.tsx +20 -15
- package/resources/Player/typings.ts +2 -0
- package/resources/fivePlugins/CameraMovementPlugin/index.ts +55 -47
- package/resources/fivePlugins/CameraMovementPlugin/typings.ts +2 -1
- package/resources/typings/VreoUnit.ts +11 -4
- package/stylesheets/custom/SpatialScenePanel.css +14 -8
- package/stylesheets/default.css +66 -0
package/README.md
CHANGED
|
@@ -243,7 +243,7 @@ ReactDOM.render(<App></App>, document.getElementById('app'))
|
|
|
243
243
|
- `data`: 当前剧本帧类别数据依赖。
|
|
244
244
|
|
|
245
245
|
> **如何获取剧本数据?**
|
|
246
|
-
>
|
|
246
|
+
> 剧本服务及剧本编辑器公开版本尚在开发中,敬请期待。
|
|
247
247
|
|
|
248
248
|
### 剧本帧说明
|
|
249
249
|
|
|
@@ -353,8 +353,23 @@ type PanoEffectData = {
|
|
|
353
353
|
|
|
354
354
|
```ts
|
|
355
355
|
export type UpdateVRPanoramaData = {
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
_signature: string // 签名字段
|
|
357
|
+
allow_hosts: string[] // 域名白名单
|
|
358
|
+
certificate: string // 签名值
|
|
359
|
+
expire_at: string // 过期时间
|
|
360
|
+
// 动态场景
|
|
361
|
+
dynamic_scene?: {
|
|
362
|
+
images: { // 切换全景的图片
|
|
363
|
+
index: number // 对应的全景点位
|
|
364
|
+
right: string
|
|
365
|
+
left: string
|
|
366
|
+
up: string
|
|
367
|
+
down: string
|
|
368
|
+
front: string
|
|
369
|
+
back: string
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
[key: string]: any
|
|
358
373
|
}
|
|
359
374
|
```
|
|
360
375
|
|
|
@@ -442,6 +457,8 @@ export function YourCustomKeyframe(props: CustomVreoKeyframeProps) {
|
|
|
442
457
|
|
|
443
458
|
## 注意事项
|
|
444
459
|
|
|
460
|
+
### 兼容性
|
|
461
|
+
|
|
445
462
|
浏览器对视频自动播放有严格的限制(播放行为必须由用户触发),`@realsee/vreo` 内部已经最大限度规避了浏览器对视频自动播放的限制。
|
|
446
463
|
|
|
447
464
|
但是规避 [微信浏览器中音视频自动播放限制](https://developers.weixin.qq.com/community/develop/doc/000e640d77cfa001132a6cb8456c01) 需要调用 [微信 JS-SDK](https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html) 触发`WeixinJSBridgeReady`事件后才能实现。
|
|
@@ -485,6 +502,33 @@ const vreoplayer = new Player(five, {
|
|
|
485
502
|
|
|
486
503
|
这样,在微信浏览器或微信小程序 `WebView` 中也能正常使用自动播效果。
|
|
487
504
|
|
|
505
|
+
### 性能优化
|
|
506
|
+
|
|
507
|
+
提高播放性能目前有两个策略:降低贴图分辨率和提前预载。
|
|
508
|
+
|
|
509
|
+
#### 降低图片分辨率
|
|
510
|
+
|
|
511
|
+
可以设置 `five.imageOptions.size` 来降低渲染引擎的贴图尺寸,这样下载速度会变快且内存占用也会降低。
|
|
512
|
+
你也可以配置 **Vreo** 参数来达到类似的效果:
|
|
513
|
+
|
|
514
|
+
```ts
|
|
515
|
+
const vreoplayer = new Player(five, { imageOptions: { size: 1024 } })
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
#### 自动预载
|
|
519
|
+
|
|
520
|
+
如果网络不稳定,可以提前预载静态资源,这样播放过程中不会卡顿:
|
|
521
|
+
|
|
522
|
+
```ts
|
|
523
|
+
// 全局预载
|
|
524
|
+
const vreoplayer = new Player(five, { autoPreload: true })
|
|
525
|
+
|
|
526
|
+
// 针对某一份剧本数据预载
|
|
527
|
+
vreoplayer.load(vreoUnit, 0, true)
|
|
528
|
+
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
|
|
488
532
|
## API 文档
|
|
489
533
|
|
|
490
534
|
详细的 API 文档请参考:[Vreo API](https://realsee-developer.github.io/vreo/index.html) 。
|
package/docs/assets/custom.css
CHANGED