@yang__yj/pixelstreaming-core 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib-pixelstreamingfrontend.esm.js +1 -1
- package/dist/lib-pixelstreamingfrontend.js +1 -1
- package/package.json +2 -1
- package/src/Inputs/TouchController.ts +11 -11
- package/src/WebRtcPlayer/WebRtcPlayerController.ts +256 -177
- package/types/Config/Config.d.ts +5 -4
- package/types/DataChannel/DataChannelLatencyTestController.d.ts +26 -0
- package/types/DataChannel/DataChannelLatencyTestResults.d.ts +46 -0
- package/types/Inputs/HoveringMouseEvents.d.ts +1 -1
- package/types/PeerConnectionController/PeerConnectionController.d.ts +1 -1
- package/types/PixelStreaming/PixelStreaming.d.ts +31 -6
- package/types/UeInstanceMessage/SendMessageController.d.ts +1 -1
- package/types/UeInstanceMessage/StreamMessageController.d.ts +3 -5
- package/types/Util/EventEmitter.d.ts +40 -3
- package/types/Util/RTCUtils.d.ts +8 -0
- package/types/VideoPlayer/StreamController.d.ts +3 -3
- package/types/VideoPlayer/VideoPlayer.d.ts +2 -0
- package/types/WebRtcPlayer/WebRtcPlayerController.d.ts +30 -27
- package/types/WebSockets/MessageReceive.d.ts +9 -9
- package/types/WebSockets/MessageSend.d.ts +13 -9
- package/types/WebSockets/SignallingProtocol.d.ts +3 -3
- package/types/WebSockets/WebSocketController.d.ts +16 -12
- package/types/pixelstreamingfrontend.d.ts +2 -1
- package/yang__yj-pixelstreaming-core-1.0.1.tgz +0 -0
- package/yang__yj-pixelstreaming-core-1.0.3.tgz +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yang__yj/pixelstreaming-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Frontend library for Unreal Engine 5.3 Pixel Streaming",
|
|
5
5
|
"main": "dist/lib-pixelstreamingfrontend.js",
|
|
6
6
|
"module": "dist/lib-pixelstreamingfrontend.esm.js",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"webpack-cli": "^5.0.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"element-plus": "^2.14.2",
|
|
35
36
|
"sdp": "^3.1.0"
|
|
36
37
|
},
|
|
37
38
|
"repository": {
|
|
@@ -158,25 +158,25 @@ export class TouchController implements ITouchController {
|
|
|
158
158
|
// 目前是页面强制横屏 所以触屏的x,y轴都不变,需要转换才能
|
|
159
159
|
let screen = document.querySelector(".screen");
|
|
160
160
|
// ue 宽分辨率
|
|
161
|
-
let ueWidth =
|
|
161
|
+
let ueWidth = Math.floor(
|
|
162
162
|
screen.getBoundingClientRect().width * window.devicePixelRatio
|
|
163
163
|
);
|
|
164
164
|
// ue 高分辨率
|
|
165
|
-
let ueHeight =
|
|
165
|
+
let ueHeight = Math.floor(
|
|
166
166
|
screen.getBoundingClientRect().height * window.devicePixelRatio
|
|
167
167
|
);
|
|
168
168
|
// 总宽分辨率
|
|
169
|
-
let ratioWidth =
|
|
169
|
+
let ratioWidth = Math.floor(window.screen.width * window.devicePixelRatio);
|
|
170
170
|
// 总高分辨率
|
|
171
|
-
let ratioHeight =
|
|
171
|
+
let ratioHeight = Math.floor(window.screen.height * window.devicePixelRatio);
|
|
172
172
|
// 计算导航栏的分辨率
|
|
173
173
|
let headWidth =
|
|
174
174
|
ratioWidth -
|
|
175
|
-
|
|
175
|
+
Math.floor(document.documentElement.clientWidth * window.devicePixelRatio);
|
|
176
176
|
// 计算导航栏的分辨率
|
|
177
177
|
let headHeight =
|
|
178
178
|
ratioHeight -
|
|
179
|
-
|
|
179
|
+
Math.floor(document.documentElement.clientHeight * window.devicePixelRatio);
|
|
180
180
|
// 固定宽
|
|
181
181
|
let clientWidth = document.querySelector(".screen").clientWidth / ueHeight;
|
|
182
182
|
// 固定高
|
|
@@ -199,13 +199,13 @@ export class TouchController implements ITouchController {
|
|
|
199
199
|
|
|
200
200
|
x =
|
|
201
201
|
clientHeight *
|
|
202
|
-
(
|
|
203
|
-
|
|
202
|
+
(Math.floor(touch.clientY * window.devicePixelRatio) -
|
|
203
|
+
Math.floor((ratioHeight - headHeight - ueHeight) / 2));
|
|
204
204
|
y =
|
|
205
205
|
clientWidth *
|
|
206
206
|
(ueWidth -
|
|
207
|
-
(
|
|
208
|
-
|
|
207
|
+
(Math.floor(touch.clientX * window.devicePixelRatio) -
|
|
208
|
+
Math.floor((ratioWidth - ueWidth) / 2)));
|
|
209
209
|
Logger.Log(
|
|
210
210
|
Logger.GetStackTrace(),
|
|
211
211
|
`F${this.fingerIds.get(touch.identifier)}=(${x}, ${y})`,
|
|
@@ -250,4 +250,4 @@ export class TouchController implements ITouchController {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
}
|
|
253
|
+
}
|