重新构建dev产物(清理调试残留日志+本轮3处修复的编译产物)

This commit is contained in:
Your Name
2026-09-06 15:04:00 +08:00
parent 4715ea4497
commit cd092108c2
6 changed files with 118 additions and 28 deletions
+53 -10
View File
@@ -71,6 +71,7 @@ class CallPanel extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
};
this.isOutgoingCall = props.callState == _constants_js__WEBPACK_IMPORTED_MODULE_4__.CALL_STATE_OUTGOING_INITATED;
this.containerRef = react__WEBPACK_IMPORTED_MODULE_0___default().createRef();
this.selfBoxRef = react__WEBPACK_IMPORTED_MODULE_0___default().createRef();
this.localRef = react__WEBPACK_IMPORTED_MODULE_0___default().createRef();
this.remoteRef = react__WEBPACK_IMPORTED_MODULE_0___default().createRef();
this.remoteIceCandidatesCache = [];
@@ -113,6 +114,7 @@ class CallPanel extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
this.handleDataChannelOpen = this.handleDataChannelOpen.bind(this);
this.handleDataChannelClose = this.handleDataChannelClose.bind(this);
this.bounds = {};
this.dragTarget = null;
this.dragStart = event => {
if (!event.target.closest('.draggable')) {
return;
@@ -135,32 +137,72 @@ class CallPanel extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
const parent = el.offsetParent;
this.bounds.maxX = parent.offsetWidth;
this.bounds.maxY = parent.offsetHeight;
this.dragTarget = 'container';
return;
}
if (!this.props.minimized && !this.state.audioOnly && this.selfBoxRef.current && event.target.closest('.call-party.self')) {
event.stopPropagation();
const el = this.selfBoxRef.current;
this.containerRef.current.setPointerCapture(event.pointerId);
el.style.cursor = 'grabbing';
this.bounds.left = el.offsetLeft;
this.bounds.top = el.offsetTop;
this.bounds.width = el.offsetWidth;
this.bounds.height = el.offsetHeight;
el.style.right = 'auto';
el.style.bottom = 'auto';
el.style.left = `${this.bounds.left}px`;
el.style.top = `${this.bounds.top}px`;
const parent = el.offsetParent;
this.bounds.maxX = parent.offsetWidth;
this.bounds.maxY = parent.offsetHeight;
this.dragTarget = 'self';
}
};
this.drag = event => {
event.stopPropagation();
const el = this.containerRef.current;
if (this.props.minimized && this.containerRef && el.hasPointerCapture(event.pointerId)) {
this.bounds.left = Math.min(Math.max(this.bounds.left + event.movementX, 0), this.bounds.maxX - this.bounds.width);
this.bounds.top = Math.min(Math.max(this.bounds.top + event.movementY, 0), this.bounds.maxY - this.bounds.height);
el.style.left = `${this.bounds.left}px`;
el.style.top = `${this.bounds.top}px`;
const container = this.containerRef.current;
if (!this.dragTarget || !container.hasPointerCapture(event.pointerId)) {
return;
}
const el = this.dragTarget == 'self' ? this.selfBoxRef.current : container;
if (!el) {
return;
}
this.bounds.left = Math.min(Math.max(this.bounds.left + event.movementX, 0), this.bounds.maxX - this.bounds.width);
this.bounds.top = Math.min(Math.max(this.bounds.top + event.movementY, 0), this.bounds.maxY - this.bounds.height);
el.style.left = `${this.bounds.left}px`;
el.style.top = `${this.bounds.top}px`;
};
this.dragEnd = event => {
event.stopPropagation();
if (this.props.minimized && this.containerRef) {
this.containerRef.current.releasePointerCapture(event.pointerId);
this.containerRef.current.style.cursor = 'grab';
const container = this.containerRef.current;
if (!this.dragTarget) {
return;
}
const el = this.dragTarget == 'self' ? this.selfBoxRef.current : container;
if (container && container.hasPointerCapture(event.pointerId)) {
container.releasePointerCapture(event.pointerId);
}
if (el) {
el.style.cursor = 'grab';
}
this.dragTarget = null;
};
this.handleWindowResize = () => {
if (this.props.minimized && this.containerRef && this.containerRef.current && window.matchMedia('(width<=640px)').matches) {
if (this.props.minimized && this.containerRef.current && window.matchMedia('(width<=640px)').matches) {
const el = this.containerRef.current;
el.style.removeProperty('left');
el.style.removeProperty('right');
el.style.removeProperty('top');
}
if (!this.props.minimized && this.selfBoxRef.current && window.matchMedia('(width<=768px)').matches) {
const el = this.selfBoxRef.current;
el.style.removeProperty('left');
el.style.removeProperty('right');
el.style.removeProperty('top');
el.style.removeProperty('bottom');
}
};
}
componentDidMount() {
@@ -782,6 +824,7 @@ class CallPanel extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCompon
className: "draggable",
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("div", {
className: "call-party self",
ref: this.selfBoxRef,
disabled: this.state.audioOnly || this.props.minimized,
children: [(0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxDEV)("video", {
ref: this.localRef,