@ray-js/ipc-player-integration 0.0.11 → 0.0.13-beta-1
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/lib/ui/ui.js +16 -6
- package/package.json +2 -2
package/lib/ui/ui.js
CHANGED
|
@@ -86,15 +86,17 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
86
86
|
const timer = useRef();
|
|
87
87
|
const [scaleMultiple, setScaleMultiple] = useState(playerFit === 'contain' ? 1 : -2);
|
|
88
88
|
const [currentZoomLevel, setCurrentZoomLevel] = useState(playerFit === 'contain' ? 1 : -2);
|
|
89
|
+
const [createCtx, setCreateCtx] = useState(false);
|
|
89
90
|
const [verticalCoverZoom, setVerticalCoverZoom] = useState(-2);
|
|
90
91
|
// const [verticalCoverZoom, setVerticalCoverZoom] = useState(-2);
|
|
91
92
|
// const [verticalZoomLevel, setVerticalZoomLevel] = useState(playerFit === 'contain' ? 1 : -2);
|
|
92
93
|
|
|
93
94
|
useEffect(() => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
if (createCtx) {
|
|
96
|
+
setScaleMultiple(playerFit === 'contain' ? 1 : -2);
|
|
97
|
+
setCurrentZoomLevel(playerFit === 'contain' ? 1 : -2);
|
|
98
|
+
}
|
|
99
|
+
}, [playerFit, createCtx]);
|
|
98
100
|
useEffect(() => {
|
|
99
101
|
setBrandColor(brandColor);
|
|
100
102
|
setVerticalMic(verticalMic);
|
|
@@ -105,6 +107,10 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
105
107
|
event.current.emit(playerTap);
|
|
106
108
|
};
|
|
107
109
|
|
|
110
|
+
/**
|
|
111
|
+
* 监听播放器实例创建完成
|
|
112
|
+
*/
|
|
113
|
+
|
|
108
114
|
/**
|
|
109
115
|
* 监听屏幕布局变化
|
|
110
116
|
*/
|
|
@@ -438,8 +444,12 @@ export const IPCPlayerIntegration = /*#__PURE__*/React.memo(props => {
|
|
|
438
444
|
isShare: isShare,
|
|
439
445
|
ignoreHideStopPreview: ignoreHideStopPreview,
|
|
440
446
|
ipcPlayerContext: instance.IPCPlayerInstance,
|
|
441
|
-
onChangeStreamStatus: onChangeStreamStatus
|
|
442
|
-
|
|
447
|
+
onChangeStreamStatus: onChangeStreamStatus,
|
|
448
|
+
onCtx: res => {
|
|
449
|
+
if (res) {
|
|
450
|
+
setCreateCtx(true);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
443
453
|
// onPlayerTap={handlePlayerClick}
|
|
444
454
|
,
|
|
445
455
|
onCameraNotifyWeakNetwork: data => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/ipc-player-integration",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13-beta-1",
|
|
4
4
|
"description": "IPC 融合播放器",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@ray-js/ipc-ptz-zoom": "^0.0.2",
|
|
39
39
|
"@ray-js/panel-sdk": "^1.13.1",
|
|
40
40
|
"@ray-js/direction-control": "^0.0.8",
|
|
41
|
-
"@ray-js/ray-ipc-player": "2.0.
|
|
41
|
+
"@ray-js/ray-ipc-player": "2.0.23",
|
|
42
42
|
"@ray-js/ray-ipc-utils": "1.1.8",
|
|
43
43
|
"@ray-js/svg": "0.2.0",
|
|
44
44
|
"clsx": "^1.2.1",
|