@ezuikit/player-theme 3.1.1 → 3.1.2-beta.2
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/constant.js +4 -3
- package/dist/index.cjs +160 -42
- package/dist/index.esm.js +161 -43
- package/dist/index.umd.js +160 -42
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +325 -56
- package/package.json +4 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import I18n, { I18nTranslation } from '@ezuikit/utils-i18n';
|
|
|
4
4
|
import { LoggerCls, LoggerOptions } from '@ezuikit/utils-logger';
|
|
5
5
|
import { BasePtzOptions } from '@ezuikit/control-ptz';
|
|
6
6
|
import { RecListModalOptions } from '@ezuikit/control-rec-list-modal';
|
|
7
|
+
import * as _ezuikit_utils_tools from '@ezuikit/utils-tools';
|
|
7
8
|
import Zoom from '@ezuikit/control-zoom';
|
|
8
9
|
import { TimeLineTimeSection } from '@ezuikit/control-time-line';
|
|
9
10
|
import { TimePickerOptions } from '@ezuikit/control-date-picker';
|
|
@@ -17,7 +18,7 @@ declare const THEME_SCALE_MODE_TYPE: {
|
|
|
17
18
|
/** 视频画面做等比缩放后,完全填充canvas区域,画面不被拉伸,没有黑边,但画面显示不全 */
|
|
18
19
|
readonly fullAuto: 2;
|
|
19
20
|
};
|
|
20
|
-
declare const THEME_PROPS: readonly ["width", "height", "playing", "volume", "muted", "loading", "recType", "isCurrentFullscreen", "orientationAngle", "zooming", "zoom", "recording", "recordList", "speed", "urlInfo", "videoLevelList", "videoLevel", "recMonth"];
|
|
21
|
+
declare const THEME_PROPS: readonly ["width", "height", "playing", "volume", "muted", "loading", "recType", "isCurrentFullscreen", "orientationAngle", "zooming", "zoom", "recording", "recordList", "speed", "urlInfo", "videoLevelList", "videoLevel", "recMonth", "url"];
|
|
21
22
|
/**
|
|
22
23
|
*
|
|
23
24
|
* 事件名
|
|
@@ -857,7 +858,7 @@ declare class Volume extends Control {
|
|
|
857
858
|
/**
|
|
858
859
|
* 全屏信息
|
|
859
860
|
*/
|
|
860
|
-
interface FullscreenChangeInfo {
|
|
861
|
+
interface FullscreenChangeInfo$1 {
|
|
861
862
|
/** 当前窗口是否处于全屏 */
|
|
862
863
|
isCurrentFullscreen: boolean;
|
|
863
864
|
/** 浏览器中是否有全屏 (移动端中永远是 false) */
|
|
@@ -868,7 +869,7 @@ interface FullscreenChangeInfo {
|
|
|
868
869
|
/**
|
|
869
870
|
* 全屏变化回调
|
|
870
871
|
*/
|
|
871
|
-
type FullscreenChange = (info: FullscreenChangeInfo) => void;
|
|
872
|
+
type FullscreenChange = (info: FullscreenChangeInfo$1) => void;
|
|
872
873
|
/**
|
|
873
874
|
* 全屏配置项
|
|
874
875
|
*/
|
|
@@ -952,7 +953,7 @@ interface FullscreenOptions extends Omit<ControlOptions, 'tagName'> {
|
|
|
952
953
|
* 全屏改变
|
|
953
954
|
* @param info FullscreenChangeInfo 全屏信息
|
|
954
955
|
*/
|
|
955
|
-
onChange?: (info: FullscreenChangeInfo) => void;
|
|
956
|
+
onChange?: (info: FullscreenChangeInfo$1) => void;
|
|
956
957
|
}
|
|
957
958
|
/**
|
|
958
959
|
* 全屏控件
|
|
@@ -970,7 +971,7 @@ declare class Fullscreen extends Control {
|
|
|
970
971
|
*/
|
|
971
972
|
destroy(): void;
|
|
972
973
|
protected _render(): void;
|
|
973
|
-
protected _fullscreenChange(info: FullscreenChangeInfo): void;
|
|
974
|
+
protected _fullscreenChange(info: FullscreenChangeInfo$1): void;
|
|
974
975
|
/**
|
|
975
976
|
* 点击 Control 会触发
|
|
976
977
|
*/
|
|
@@ -1491,9 +1492,10 @@ declare class Theme extends EventEmitter {
|
|
|
1491
1492
|
readonly audioInfo: "audioInfo";
|
|
1492
1493
|
readonly videoInfo: "videoInfo";
|
|
1493
1494
|
readonly firstFrameDisplay: "firstFrameDisplay";
|
|
1494
|
-
readonly fullscreen: "fullscreen";
|
|
1495
|
+
readonly fullscreen: "fullscreen"; /** 所有私有流的模板 @since 0.0.1 */
|
|
1495
1496
|
readonly exitFullscreen: "exitFullscreen";
|
|
1496
1497
|
readonly fullscreenChange: "fullscreenChange";
|
|
1498
|
+
/** 播放器配置项 */
|
|
1497
1499
|
readonly resize: "resize";
|
|
1498
1500
|
readonly orientationChange: "orientationChange";
|
|
1499
1501
|
readonly audioCodecUnsupported: "audioCodecUnsupported";
|
|
@@ -1503,7 +1505,7 @@ declare class Theme extends EventEmitter {
|
|
|
1503
1505
|
readonly speedChange: "speedChange";
|
|
1504
1506
|
readonly recordingChange: "recordingChange";
|
|
1505
1507
|
readonly talkingChange: "talkingChange";
|
|
1506
|
-
readonly talkVolumeChange: "talkVolumeChange";
|
|
1508
|
+
readonly talkVolumeChange: "talkVolumeChange"; /** 封面控件 @since 0.0.1 @private */
|
|
1507
1509
|
readonly broadcastChange: "broadcastChange";
|
|
1508
1510
|
readonly aichatChange: "aichatChange";
|
|
1509
1511
|
readonly liveChange: "liveChange";
|
|
@@ -1520,9 +1522,9 @@ declare class Theme extends EventEmitter {
|
|
|
1520
1522
|
readonly getOSDTime: "getOSDTime";
|
|
1521
1523
|
readonly control: {
|
|
1522
1524
|
readonly play: "Control.play";
|
|
1523
|
-
readonly playDestroy: "Control.playDestroy";
|
|
1525
|
+
readonly playDestroy: "Control.playDestroy";
|
|
1524
1526
|
readonly capturePicture: "Control.capturePicture";
|
|
1525
|
-
readonly capturePictureResult: "Control.capturePictureResult";
|
|
1527
|
+
readonly capturePictureResult: "Control.capturePictureResult"; /** @since 0.0.1 @private */
|
|
1526
1528
|
readonly capturePictureDestroy: "Control.capturePictureDestroy";
|
|
1527
1529
|
readonly volumechange: "Control.volumechange";
|
|
1528
1530
|
readonly volumePanelOpenChange: "Control.volumePanelOpenChange";
|
|
@@ -1531,8 +1533,8 @@ declare class Theme extends EventEmitter {
|
|
|
1531
1533
|
readonly headerMoreShowControlsChange: "Control.headerMoreShowControlsChange";
|
|
1532
1534
|
readonly headerMorePanelOpenChange: "Control.headerMorePanelOpenChange";
|
|
1533
1535
|
readonly footerMoreShowControlsChange: "Control.footerMoreShowControlsChange";
|
|
1534
|
-
/** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */
|
|
1535
1536
|
readonly footerMorePanelOpenChange: "Control.footerMorePanelOpenChange";
|
|
1537
|
+
/** 录制中 @private */
|
|
1536
1538
|
readonly deviceDestroy: "Control.deviceDestroy";
|
|
1537
1539
|
readonly recTypeChange: "Control.recTypeChange";
|
|
1538
1540
|
readonly recDestroy: "Control.recDestroy";
|
|
@@ -1541,7 +1543,9 @@ declare class Theme extends EventEmitter {
|
|
|
1541
1543
|
readonly definitionPanelOpenChange: "Control.definitionPanelOpenChange";
|
|
1542
1544
|
readonly definitionDestroy: "Control.definitionDestroy";
|
|
1543
1545
|
readonly speedChange: "Control.speedChange";
|
|
1544
|
-
readonly speedPanelOpenChange: "Control.speedPanelOpenChange";
|
|
1546
|
+
readonly speedPanelOpenChange: "Control.speedPanelOpenChange"; /**
|
|
1547
|
+
* 录像回放的月份列表 @private
|
|
1548
|
+
*/
|
|
1545
1549
|
readonly speedDestroy: "Control.speedDestroy";
|
|
1546
1550
|
readonly ptzPanelOpenChange: "Control.ptzPanelOpenChange";
|
|
1547
1551
|
readonly ptzSpeedChange: "Control.ptzSpeedChange";
|
|
@@ -1700,6 +1704,7 @@ declare class Theme extends EventEmitter {
|
|
|
1700
1704
|
397007: string;
|
|
1701
1705
|
399000: string;
|
|
1702
1706
|
399001: string;
|
|
1707
|
+
/** 移动端竖屏, 全屏情况下不展示扩张,放置在 footer 中 */
|
|
1703
1708
|
399002: string;
|
|
1704
1709
|
399016: string;
|
|
1705
1710
|
399048: string;
|
|
@@ -1764,6 +1769,7 @@ declare class Theme extends EventEmitter {
|
|
|
1764
1769
|
CHANGE_VIDEO_LEVEL: string;
|
|
1765
1770
|
CHANGE_VIDEO_LEVEL_FAIL: string;
|
|
1766
1771
|
GET_VIDEO_LEVEL_LIST: string;
|
|
1772
|
+
/** 消息提示控件 @since 0.0.1 @private */
|
|
1767
1773
|
PLEASE_INPUT_RIGHT_VIDEO_LEVEL: string;
|
|
1768
1774
|
VIDEO_LEVEL_NOT_SUPPORT: string;
|
|
1769
1775
|
VIDEO_LEVEL_AUTO: string;
|
|
@@ -1786,17 +1792,18 @@ declare class Theme extends EventEmitter {
|
|
|
1786
1792
|
BTN_AICHAT: string;
|
|
1787
1793
|
BTN_LIVE: string;
|
|
1788
1794
|
BTN_REC_DROPDOWN: string;
|
|
1789
|
-
BTN_ALARM_MESSAGE: string;
|
|
1795
|
+
BTN_ALARM_MESSAGE: string;
|
|
1790
1796
|
REC_DROPDOWN_CLOUD_REC: string;
|
|
1791
|
-
REC_DROPDOWN_CLOUD_RECORD: string;
|
|
1797
|
+
REC_DROPDOWN_CLOUD_RECORD: string;
|
|
1792
1798
|
REC_DROPDOWN_LOCAL_REC: string;
|
|
1793
|
-
BTN_ZOOM: string;
|
|
1794
|
-
BTN_3D_ZOOM: string;
|
|
1799
|
+
BTN_ZOOM: string; /** 回放底部时间轴 @since 0.0.1 @private */
|
|
1800
|
+
BTN_3D_ZOOM: string;
|
|
1801
|
+
BTN_PTZ: string;
|
|
1802
|
+
BTN_GLOBAL_FULLSCREEN: string;
|
|
1803
|
+
/**
|
|
1795
1804
|
* 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
|
|
1796
1805
|
* @private
|
|
1797
1806
|
*/
|
|
1798
|
-
BTN_PTZ: string;
|
|
1799
|
-
BTN_GLOBAL_FULLSCREEN: string;
|
|
1800
1807
|
BTN_EXIT_GLOBAL_FULLSCREEN: string;
|
|
1801
1808
|
BTN_FULLSCREEN: string;
|
|
1802
1809
|
BTN_EXIR_FULLSCREEN: string;
|
|
@@ -1814,13 +1821,14 @@ declare class Theme extends EventEmitter {
|
|
|
1814
1821
|
CAPTURE_FAILED: string;
|
|
1815
1822
|
START_RECORD_SUCCESS: string;
|
|
1816
1823
|
START_RECORD_FAILED: string;
|
|
1817
|
-
STOP_RECORD_SUCCESS: string;
|
|
1824
|
+
STOP_RECORD_SUCCESS: string; /** resizeObserver 监听销毁 */
|
|
1818
1825
|
STOP_RECORD_FAILED: string;
|
|
1819
1826
|
RECORD_TIPS: string;
|
|
1820
1827
|
RECORDS: string;
|
|
1821
1828
|
OPEN_SOUND: string;
|
|
1822
1829
|
CLOSE_SOUND: string;
|
|
1823
1830
|
SOUND_OPENED: string;
|
|
1831
|
+
/** 容器的宽 */
|
|
1824
1832
|
ZOOM: string;
|
|
1825
1833
|
START_ZOOM: string;
|
|
1826
1834
|
CLOSE_ZOOM: string;
|
|
@@ -1829,10 +1837,10 @@ declare class Theme extends EventEmitter {
|
|
|
1829
1837
|
ZOOM_ADD_MAX: string;
|
|
1830
1838
|
ZOOM_SUB_MIN: string;
|
|
1831
1839
|
ZOOM_LIMIT_MAX: string;
|
|
1832
|
-
ZOOM_LIMIT_MIN: string;
|
|
1833
|
-
ZOOM_NOT_ENABLED: string;
|
|
1834
|
-
'3D_ZOOM': string;
|
|
1835
|
-
'3D_ZOOM_DISABLE': string;
|
|
1840
|
+
ZOOM_LIMIT_MIN: string;
|
|
1841
|
+
ZOOM_NOT_ENABLED: string; /** 是否播放中 @private */
|
|
1842
|
+
'3D_ZOOM': string;
|
|
1843
|
+
'3D_ZOOM_DISABLE': string;
|
|
1836
1844
|
'3D_ZOOM_FAILED': string;
|
|
1837
1845
|
START_3D_ZOOM: string;
|
|
1838
1846
|
CLOSE_3D_ZOOM: string;
|
|
@@ -1840,29 +1848,26 @@ declare class Theme extends EventEmitter {
|
|
|
1840
1848
|
'3D_ZOOM_ACTIVED': string;
|
|
1841
1849
|
'3D_ZOOM_NOT_ACTIVED': string;
|
|
1842
1850
|
'3D_ZOOM_CLOSED': string;
|
|
1843
|
-
CHANGE_ZOOM_TYPE: string;
|
|
1851
|
+
CHANGE_ZOOM_TYPE: string;
|
|
1844
1852
|
FULLSCREEN: string;
|
|
1845
1853
|
FULLSCREEN_EXIT: string;
|
|
1846
1854
|
GET_WEB_FULLSCREEN_STATUS: string;
|
|
1847
|
-
WEB_FULLSCREEN: string;
|
|
1855
|
+
WEB_FULLSCREEN: string; /** 清晰度列表 */
|
|
1848
1856
|
WEB_FULLSCREEN_EXIT: string;
|
|
1849
1857
|
DESTROY: string;
|
|
1850
1858
|
GET_CAPACITY: string;
|
|
1851
1859
|
GET_PTZ_STATUS: string;
|
|
1852
1860
|
GET_PTZ_STATUS_FAILED: string;
|
|
1853
|
-
/**
|
|
1854
|
-
* 录像回放的月份列表 @private
|
|
1855
|
-
*/
|
|
1856
1861
|
MOBILE_HIDE_PTZ: string;
|
|
1857
1862
|
OPTION_PTZ_FAILED: string;
|
|
1858
1863
|
MOBILE_PTZ_TIPS: string;
|
|
1859
|
-
/**
|
|
1860
|
-
* 录像回放的月份列表 @private
|
|
1861
|
-
*/
|
|
1862
1864
|
PTZ_FAST: string;
|
|
1863
1865
|
PTZ_MID: string;
|
|
1864
1866
|
PTZ_SLOW: string;
|
|
1865
1867
|
PTZ_SPEED: string;
|
|
1868
|
+
/**
|
|
1869
|
+
* 录像回放的月份列表 @private
|
|
1870
|
+
*/
|
|
1866
1871
|
DEVICE_ZOOM: string;
|
|
1867
1872
|
DEVICE_FOCUS: string;
|
|
1868
1873
|
NOT_SUPPORT_DEVICE_ZOOM: string;
|
|
@@ -1871,7 +1876,7 @@ declare class Theme extends EventEmitter {
|
|
|
1871
1876
|
MIRROR_TYPE_ERROR: string;
|
|
1872
1877
|
CHANGE_FEC_TYPE: string;
|
|
1873
1878
|
DEVICE_NOT_SUPPORT: string;
|
|
1874
|
-
TYPE_NOT_SUPPORT: string;
|
|
1879
|
+
TYPE_NOT_SUPPORT: string;
|
|
1875
1880
|
FEC_SUPPORT_VERSION: string;
|
|
1876
1881
|
NO_CANVAS_ID: string;
|
|
1877
1882
|
SET_FEC_PARAMS: string;
|
|
@@ -1930,7 +1935,7 @@ declare class Theme extends EventEmitter {
|
|
|
1930
1935
|
395558: string;
|
|
1931
1936
|
395560: string;
|
|
1932
1937
|
395561: string;
|
|
1933
|
-
395562: string;
|
|
1938
|
+
395562: string;
|
|
1934
1939
|
395563: string;
|
|
1935
1940
|
395564: string;
|
|
1936
1941
|
395566: string;
|
|
@@ -1941,7 +1946,8 @@ declare class Theme extends EventEmitter {
|
|
|
1941
1946
|
395601: string;
|
|
1942
1947
|
395602: string;
|
|
1943
1948
|
395610: string;
|
|
1944
|
-
|
|
1949
|
+
/** 暂停控件 @since 0.0.1 @private */
|
|
1950
|
+
395620: string;
|
|
1945
1951
|
395701: string;
|
|
1946
1952
|
395702: string;
|
|
1947
1953
|
395703: string;
|
|
@@ -1957,25 +1963,25 @@ declare class Theme extends EventEmitter {
|
|
|
1957
1963
|
396108: string;
|
|
1958
1964
|
396109: string;
|
|
1959
1965
|
396110: string;
|
|
1960
|
-
/** resizeObserver 监听销毁 */
|
|
1961
1966
|
396501: string;
|
|
1962
1967
|
396502: string;
|
|
1963
1968
|
396503: string;
|
|
1964
1969
|
396504: string;
|
|
1965
1970
|
396505: string;
|
|
1971
|
+
/** 屏幕旋转角度 0 | 90 | 180 | 270 */
|
|
1966
1972
|
396506: string;
|
|
1967
|
-
396508: string;
|
|
1973
|
+
396508: string;
|
|
1968
1974
|
396509: string;
|
|
1969
1975
|
396510: string;
|
|
1970
1976
|
396511: string;
|
|
1971
|
-
396512: string;
|
|
1977
|
+
396512: string; /** 倍速 @private */
|
|
1972
1978
|
396513: string;
|
|
1973
1979
|
396514: string;
|
|
1974
1980
|
396515: string;
|
|
1981
|
+
396516: string;
|
|
1975
1982
|
/**
|
|
1976
1983
|
* 录像回放的月份列表 @private
|
|
1977
1984
|
*/
|
|
1978
|
-
396516: string;
|
|
1979
1985
|
396517: string;
|
|
1980
1986
|
396518: string;
|
|
1981
1987
|
396519: string;
|
|
@@ -2041,15 +2047,14 @@ declare class Theme extends EventEmitter {
|
|
|
2041
2047
|
SPEED_RATE: string;
|
|
2042
2048
|
SPEED_CANCEL: string;
|
|
2043
2049
|
GET_SPEED: string;
|
|
2044
|
-
|
|
2045
|
-
|
|
2050
|
+
MAX_SPEED_LIMIT: string;
|
|
2051
|
+
MIN_SPEED_LIMIT: string;
|
|
2052
|
+
SEEK_CANNOT_CROSS_DAYS: string; /**
|
|
2053
|
+
* 容器的高(单位 px)
|
|
2046
2054
|
* ```ts
|
|
2047
|
-
* theme.
|
|
2055
|
+
* theme.height // number
|
|
2048
2056
|
* ```
|
|
2049
2057
|
*/
|
|
2050
|
-
MAX_SPEED_LIMIT: string;
|
|
2051
|
-
MIN_SPEED_LIMIT: string;
|
|
2052
|
-
SEEK_CANNOT_CROSS_DAYS: string;
|
|
2053
2058
|
SEEK_TIMEFORMAT_ERROR: string;
|
|
2054
2059
|
PAUSE: string;
|
|
2055
2060
|
PAUSE_FAILED: string;
|
|
@@ -2076,13 +2081,6 @@ declare class Theme extends EventEmitter {
|
|
|
2076
2081
|
BTN_PAUSE: string;
|
|
2077
2082
|
BTN_VOLUME: string;
|
|
2078
2083
|
BTN_MUTED: string;
|
|
2079
|
-
/**
|
|
2080
|
-
* 加载状态
|
|
2081
|
-
* ```ts
|
|
2082
|
-
* // 事件监听
|
|
2083
|
-
* theme.on(Theme.EVENTS.loading, (loading: boolean) => {})
|
|
2084
|
-
* ```
|
|
2085
|
-
*/
|
|
2086
2084
|
BTN_RECORDVIDEO: string;
|
|
2087
2085
|
BTN_CAPTURE: string;
|
|
2088
2086
|
BTN_TALK: string;
|
|
@@ -2090,9 +2088,21 @@ declare class Theme extends EventEmitter {
|
|
|
2090
2088
|
BTN_AICHAT: string;
|
|
2091
2089
|
BTN_LIVE: string;
|
|
2092
2090
|
BTN_REC_DROPDOWN: string;
|
|
2091
|
+
/**
|
|
2092
|
+
* 加载中
|
|
2093
|
+
* ```ts
|
|
2094
|
+
* theme.loading // boolean
|
|
2095
|
+
* ```
|
|
2096
|
+
*/
|
|
2093
2097
|
BTN_ALARM_MESSAGE: string;
|
|
2094
2098
|
REC_DROPDOWN_CLOUD_REC: string;
|
|
2095
|
-
REC_DROPDOWN_CLOUD_RECORD: string;
|
|
2099
|
+
REC_DROPDOWN_CLOUD_RECORD: string; /**
|
|
2100
|
+
* 加载状态
|
|
2101
|
+
* ```ts
|
|
2102
|
+
* // 事件监听
|
|
2103
|
+
* theme.on(Theme.EVENTS.loading, (loading: boolean) => {})
|
|
2104
|
+
* ```
|
|
2105
|
+
*/
|
|
2096
2106
|
REC_DROPDOWN_LOCAL_REC: string;
|
|
2097
2107
|
BTN_ZOOM: string;
|
|
2098
2108
|
BTN_3D_ZOOM: string;
|
|
@@ -2104,7 +2114,13 @@ declare class Theme extends EventEmitter {
|
|
|
2104
2114
|
BTN_EXPEND: string;
|
|
2105
2115
|
BTN_WEBEXPEND: string;
|
|
2106
2116
|
BTN_HD: string;
|
|
2107
|
-
BTN_SPEED: string;
|
|
2117
|
+
BTN_SPEED: string; /**
|
|
2118
|
+
* 音量值
|
|
2119
|
+
* ```ts
|
|
2120
|
+
* // 事件监听
|
|
2121
|
+
* theme.on(Theme.EVENTS.volumechange, (volume: number, muted: boolean) => {})
|
|
2122
|
+
* ```
|
|
2123
|
+
*/
|
|
2108
2124
|
BTN_CLOUDREC: string;
|
|
2109
2125
|
BTN_CLOUDRECORD: string;
|
|
2110
2126
|
BTN_REC: string;
|
|
@@ -2260,6 +2276,7 @@ declare class Theme extends EventEmitter {
|
|
|
2260
2276
|
private _isCurrentFullscreen;
|
|
2261
2277
|
/** 屏幕旋转角度 0 | 90 | 180 | 270 */
|
|
2262
2278
|
private _orientationAngle;
|
|
2279
|
+
_url: string;
|
|
2263
2280
|
/** 是否播放中 @private */
|
|
2264
2281
|
_playing: boolean;
|
|
2265
2282
|
/** @private 加载中 */
|
|
@@ -2294,10 +2311,14 @@ declare class Theme extends EventEmitter {
|
|
|
2294
2311
|
_onPauseTimingFunc: ((open: boolean) => void) | null;
|
|
2295
2312
|
/** 销毁标识 @readonly */
|
|
2296
2313
|
destroyed: boolean;
|
|
2297
|
-
/** 播放地址信息 */
|
|
2298
|
-
urlInfo: any | null;
|
|
2299
2314
|
scaleMode: ThemeOptions['scaleMode'];
|
|
2300
2315
|
constructor(options: ThemeOptions);
|
|
2316
|
+
get url(): string;
|
|
2317
|
+
set url(url: string);
|
|
2318
|
+
/**
|
|
2319
|
+
* url 信息 播放地址信息
|
|
2320
|
+
*/
|
|
2321
|
+
get urlInfo(): Partial<_ezuikit_utils_tools.EzopenURL>;
|
|
2301
2322
|
/**
|
|
2302
2323
|
* 容器的宽(单位 px)
|
|
2303
2324
|
* ```ts
|
|
@@ -2635,6 +2656,12 @@ declare class Theme extends EventEmitter {
|
|
|
2635
2656
|
* 窗口全屏后旋转 90度判断, 然后设置控件已经旋转 90度, 为了解决控件交互问题
|
|
2636
2657
|
*/
|
|
2637
2658
|
private _isRotated;
|
|
2659
|
+
get isEzopen(): boolean;
|
|
2660
|
+
/**
|
|
2661
|
+
* 判断播放地址是萤石的播放地址
|
|
2662
|
+
* @since 3.1.2
|
|
2663
|
+
*/
|
|
2664
|
+
get isEzviz(): boolean;
|
|
2638
2665
|
}
|
|
2639
2666
|
|
|
2640
2667
|
/**
|
|
@@ -2755,7 +2782,7 @@ interface ThemeOptions {
|
|
|
2755
2782
|
ptzOptions?: OmitControlOptions<PtzOptions> | null;
|
|
2756
2783
|
/** 回放类型控件配置, 设置 null 不渲染控件 @since 0.0.1 */
|
|
2757
2784
|
recOptions?: OmitControlOptions<RecOptions> | null;
|
|
2758
|
-
/** 录像列表控件配置, 设置 null 不渲染控件 @since
|
|
2785
|
+
/** 录像列表控件配置, 设置 null 不渲染控件 @since 3.1.1 */
|
|
2759
2786
|
recListOptions?: OmitControlOptions<RecListOptions> | null;
|
|
2760
2787
|
/** 录制控件配置 ,设置 null 不渲染控件 @since 0.0.1 */
|
|
2761
2788
|
recordOptions?: OmitControlOptions<RecordOptions> | null;
|
|
@@ -2913,5 +2940,247 @@ declare class Utils {
|
|
|
2913
2940
|
static resizeObserver(node: Element, callback?: (entries: ResizeObserverEntry[], observer: ResizeObserver) => void): CleanUpResizeObserver;
|
|
2914
2941
|
}
|
|
2915
2942
|
|
|
2943
|
+
/**
|
|
2944
|
+
* 事件类型定义
|
|
2945
|
+
*
|
|
2946
|
+
* 本文件根据 `src/constant.ts` 的 `EVENTS` 常量生成对应的「事件名」与「事件载荷」类型,
|
|
2947
|
+
* 用于给 `theme.on / once / off / emit` 提供类型提示。
|
|
2948
|
+
*
|
|
2949
|
+
* - 事件名(`ThemeEventName` 等)直接由 `typeof EVENTS` 推导,随 `EVENTS` 自动同步。
|
|
2950
|
+
* - 事件载荷(`ThemeEventMap`)依据事件文档与实际 emit 现场(`_bindEventemitter.ts` 等)手写,
|
|
2951
|
+
* 键为事件的「字符串值」(如 `'play'`、`'Control.play'`、`'Theme.destroyed'`),
|
|
2952
|
+
* 与 `EVENTS.play` / `EVENTS.control.play` / `EVENTS.theme.destroyed` 的取值一致。
|
|
2953
|
+
* - 文件末尾有编译期断言:保证 `EVENTS` 中的每个事件都在 `ThemeEventMap` 中声明了类型,
|
|
2954
|
+
* 反之亦然(防止漏写或写错事件名)。
|
|
2955
|
+
*
|
|
2956
|
+
* @remarks 载荷见 guide/events.md。标注为 `unknown` 的表示载荷由内核/插件决定,未固定结构。
|
|
2957
|
+
*/
|
|
2958
|
+
|
|
2959
|
+
type EventsConst = typeof EVENTS;
|
|
2960
|
+
/** 对外事件名,如 `'play'`、`'volumechange'`、`'message'` */
|
|
2961
|
+
type ThemeOuterEventName = EventsConst[Exclude<keyof EventsConst, 'control' | 'theme'>];
|
|
2962
|
+
/** 控件事件名,如 `'Control.play'`、`'Control.volumechange'` */
|
|
2963
|
+
type ControlEventName = EventsConst['control'][keyof EventsConst['control']];
|
|
2964
|
+
/** 主题生命周期事件名,如 `'Theme.destroyed'` */
|
|
2965
|
+
type ThemeLifecycleEventName = EventsConst['theme'][keyof EventsConst['theme']];
|
|
2966
|
+
/** 所有事件名(对外 + 控件 + 生命周期)的并集 */
|
|
2967
|
+
type ThemeEventName = ThemeOuterEventName | ControlEventName | ThemeLifecycleEventName;
|
|
2968
|
+
/** 屏幕旋转角度 */
|
|
2969
|
+
type OrientationAngle = 0 | 90 | 180 | 270;
|
|
2970
|
+
/** 全屏状态变化载荷 */
|
|
2971
|
+
interface FullscreenChangeInfo {
|
|
2972
|
+
/** 当前容器是否处于全局全屏 */
|
|
2973
|
+
isCurrentFullscreen: boolean;
|
|
2974
|
+
/** 是否浏览器全屏 */
|
|
2975
|
+
isFullscreen: boolean;
|
|
2976
|
+
/** 是否移动端(移动端为模拟全屏) */
|
|
2977
|
+
isMobile: boolean;
|
|
2978
|
+
/** 旋转角度 */
|
|
2979
|
+
orientationAngle?: OrientationAngle;
|
|
2980
|
+
}
|
|
2981
|
+
/** 容器尺寸变化载荷 */
|
|
2982
|
+
interface ResizeInfo {
|
|
2983
|
+
width: number;
|
|
2984
|
+
height: number;
|
|
2985
|
+
isCurrentFullscreen?: boolean;
|
|
2986
|
+
orientationAngle?: OrientationAngle;
|
|
2987
|
+
}
|
|
2988
|
+
/** 音频信息(用于解禁音量控件) */
|
|
2989
|
+
interface AudioInfo {
|
|
2990
|
+
/** 标准流编码类型 */
|
|
2991
|
+
encType?: string;
|
|
2992
|
+
/** 私有流音频格式名 */
|
|
2993
|
+
audioFormatName?: string;
|
|
2994
|
+
[key: string]: unknown;
|
|
2995
|
+
}
|
|
2996
|
+
/** 视频信息(用于重渲染画面) */
|
|
2997
|
+
interface VideoInfo {
|
|
2998
|
+
width: number;
|
|
2999
|
+
height: number;
|
|
3000
|
+
[key: string]: unknown;
|
|
3001
|
+
}
|
|
3002
|
+
/** 云台错误信息 */
|
|
3003
|
+
interface PtzErrorInfo {
|
|
3004
|
+
code: string | number;
|
|
3005
|
+
localeKey?: string;
|
|
3006
|
+
msg?: string;
|
|
3007
|
+
[key: string]: unknown;
|
|
3008
|
+
}
|
|
3009
|
+
/**
|
|
3010
|
+
* 事件名 → 监听器签名 的映射表。
|
|
3011
|
+
*
|
|
3012
|
+
* 可用于给 eventemitter3 提供泛型:`class Theme extends EventEmitter<ThemeEventMap>`,
|
|
3013
|
+
* 或直接查询单个事件的处理函数类型:`ThemeEventMap['play']`。
|
|
3014
|
+
*/
|
|
3015
|
+
interface ThemeEventMap {
|
|
3016
|
+
/** 加载状态变化 */
|
|
3017
|
+
loading: (loading: boolean) => void;
|
|
3018
|
+
/** 播放/暂停状态变化 */
|
|
3019
|
+
play: (playing: boolean) => void;
|
|
3020
|
+
/** 首帧显示(内部会解禁控件) */
|
|
3021
|
+
firstFrameDisplay: () => void;
|
|
3022
|
+
/** 截图 */
|
|
3023
|
+
capturePicture: () => void;
|
|
3024
|
+
/** 音量变化 */
|
|
3025
|
+
volumechange: (volume: number, muted: boolean) => void;
|
|
3026
|
+
/** 缩放倍数变化 */
|
|
3027
|
+
zoomChange: (zoom: number) => void;
|
|
3028
|
+
/** 缩放状态变化(true 可缩放 / false 禁止) */
|
|
3029
|
+
zoomingChange: (zooming: boolean) => void;
|
|
3030
|
+
/** 缩放平移改变(载荷来自缩放插件) */
|
|
3031
|
+
zoomTranslateChange: (translate: unknown) => void;
|
|
3032
|
+
/** 音频信息 */
|
|
3033
|
+
audioInfo: (info: AudioInfo) => void;
|
|
3034
|
+
/** 视频信息 */
|
|
3035
|
+
videoInfo: (info: VideoInfo) => void;
|
|
3036
|
+
/** 音频编码不支持(仅标准流 flv) */
|
|
3037
|
+
audioCodecUnsupported: (flag: boolean) => void;
|
|
3038
|
+
/** 进入全屏 */
|
|
3039
|
+
fullscreen: () => void;
|
|
3040
|
+
/** 退出全屏 */
|
|
3041
|
+
exitFullscreen: () => void;
|
|
3042
|
+
/** 全屏状态变化 */
|
|
3043
|
+
fullscreenChange: (info: FullscreenChangeInfo) => void;
|
|
3044
|
+
/** 容器尺寸变化 */
|
|
3045
|
+
resize: (info: ResizeInfo) => void;
|
|
3046
|
+
/** 屏幕旋转方向变化 */
|
|
3047
|
+
orientationChange: (angle: OrientationAngle) => void;
|
|
3048
|
+
/** 切换主题 */
|
|
3049
|
+
changeTheme: (themeData: IThemeData | null) => void;
|
|
3050
|
+
/** 回放类型切换 */
|
|
3051
|
+
recTypeChange: (type: string) => void;
|
|
3052
|
+
/** 切换清晰度 */
|
|
3053
|
+
definitionChange: (definition: number, item?: DefinitionItem) => void;
|
|
3054
|
+
/** 播放速度切换 */
|
|
3055
|
+
speedChange: (speed: number, item?: unknown) => void;
|
|
3056
|
+
/** 录制状态变化 */
|
|
3057
|
+
recordingChange: (recording: boolean) => void;
|
|
3058
|
+
/** 对讲状态变化 */
|
|
3059
|
+
talkingChange: (talking: boolean) => void;
|
|
3060
|
+
/** 麦克风音量变化(高频) */
|
|
3061
|
+
talkVolumeChange: (value: number) => void;
|
|
3062
|
+
/** 语音广播状态变化 */
|
|
3063
|
+
broadcastChange: (active: boolean) => void;
|
|
3064
|
+
/** AI 对话框状态变化 */
|
|
3065
|
+
aichatChange: (active: boolean) => void;
|
|
3066
|
+
/** 直播模式切换 */
|
|
3067
|
+
liveChange: () => void;
|
|
3068
|
+
/** 回放下拉选择变化 */
|
|
3069
|
+
recDropdownChange: (type: string) => void;
|
|
3070
|
+
/** 录像列表面板状态变化 */
|
|
3071
|
+
recListChange: (active: boolean) => void;
|
|
3072
|
+
/** 告警消息面板状态变化 */
|
|
3073
|
+
alarmMessageChange: (active: boolean) => void;
|
|
3074
|
+
/** 动态切换日志配置 */
|
|
3075
|
+
setLoggerOptions: (options: LoggerOptions) => void;
|
|
3076
|
+
/** 回放片段 */
|
|
3077
|
+
records: (records: unknown) => void;
|
|
3078
|
+
/** 云台速度变化 */
|
|
3079
|
+
ptzSpeedChange: (speed: number) => void;
|
|
3080
|
+
/** 设置清晰度列表 */
|
|
3081
|
+
setVideoLevelList: (list: DefinitionItem[]) => void;
|
|
3082
|
+
/** 当前清晰度 */
|
|
3083
|
+
currentVideoLevel: (item: DefinitionItem | number, level: number) => void;
|
|
3084
|
+
/** 当前是否自动清晰度 */
|
|
3085
|
+
currentVideoLevelAuto: (auto: boolean) => void;
|
|
3086
|
+
/** 设置全天回放片段(高频) */
|
|
3087
|
+
setAllDayRecTimes: (data: {
|
|
3088
|
+
list: unknown[];
|
|
3089
|
+
}) => void;
|
|
3090
|
+
/** OSD 时间(高频) */
|
|
3091
|
+
getOSDTime: (time: {
|
|
3092
|
+
data: number;
|
|
3093
|
+
}) => void;
|
|
3094
|
+
/** 统一消息提示入口(duration 单位秒) */
|
|
3095
|
+
message: (message: string, type: string, duration?: number) => void;
|
|
3096
|
+
/** 控件挂载前 */
|
|
3097
|
+
'Control.beforeMountControls': () => void;
|
|
3098
|
+
/** 控件挂载完成 */
|
|
3099
|
+
'Control.mountedControls': () => void;
|
|
3100
|
+
/** 控件卸载前 */
|
|
3101
|
+
'Control.beforeUnmountControls': () => void;
|
|
3102
|
+
/** 控件卸载完成 */
|
|
3103
|
+
'Control.unmountedControls': () => void;
|
|
3104
|
+
/** Header/Footer 显隐变化 */
|
|
3105
|
+
'Control.controlsBarOpenChange': (open: boolean) => void;
|
|
3106
|
+
/** Header 更多按钮列表变化 */
|
|
3107
|
+
'Control.headerMoreShowControlsChange': (show: boolean) => void;
|
|
3108
|
+
/** Header 更多面板显隐 */
|
|
3109
|
+
'Control.headerMorePanelOpenChange': (open: boolean) => void;
|
|
3110
|
+
/** Footer 更多按钮列表变化 */
|
|
3111
|
+
'Control.footerMoreShowControlsChange': (show: boolean, controls?: unknown[]) => void;
|
|
3112
|
+
/** Footer 更多面板显隐 */
|
|
3113
|
+
'Control.footerMorePanelOpenChange': (open: boolean) => void;
|
|
3114
|
+
/** 点击播放/暂停 */
|
|
3115
|
+
'Control.play': (playing: boolean, from?: unknown) => void;
|
|
3116
|
+
'Control.playDestroy': () => void;
|
|
3117
|
+
'Control.capturePicture': (options?: unknown) => void;
|
|
3118
|
+
'Control.capturePictureResult': (result: unknown) => void;
|
|
3119
|
+
'Control.capturePictureDestroy': () => void;
|
|
3120
|
+
'Control.volumechange': (volume: number, muted: boolean) => void;
|
|
3121
|
+
'Control.volumePanelOpenChange': (open: boolean, volume: number, muted: boolean) => void;
|
|
3122
|
+
'Control.volumeDestroy': () => void;
|
|
3123
|
+
'Control.ptzPanelOpenChange': (open: boolean) => void;
|
|
3124
|
+
'Control.ptzSpeedChange': (speed: number) => void;
|
|
3125
|
+
'Control.ptzError': (info: PtzErrorInfo) => void;
|
|
3126
|
+
'Control.ptzDestroy': () => void;
|
|
3127
|
+
'Control.recordingChange': (recording: boolean) => void;
|
|
3128
|
+
'Control.recordDestroy': () => void;
|
|
3129
|
+
'Control.talkingChange': (talking: boolean) => void;
|
|
3130
|
+
'Control.talkError': (info: unknown) => void;
|
|
3131
|
+
'Control.talkDestroy': () => void;
|
|
3132
|
+
'Control.broadcastChange': (active: boolean) => void;
|
|
3133
|
+
'Control.broadcastDestroy': () => void;
|
|
3134
|
+
'Control.aichatChange': (active: boolean) => void;
|
|
3135
|
+
'Control.aichatDestroy': () => void;
|
|
3136
|
+
'Control.liveChange': () => void;
|
|
3137
|
+
'Control.liveDestroy': () => void;
|
|
3138
|
+
'Control.recDropdownChange': (type: string) => void;
|
|
3139
|
+
'Control.recDropdownDestroy': () => void;
|
|
3140
|
+
'Control.alarmMessageChange': (active: boolean) => void;
|
|
3141
|
+
'Control.alarmMessageDestroy': () => void;
|
|
3142
|
+
'Control.recTypeChange': (type: string) => void;
|
|
3143
|
+
'Control.recDestroy': () => void;
|
|
3144
|
+
'Control.recListChange': (active: boolean) => void;
|
|
3145
|
+
'Control.recListCardClick': (section: unknown, index: number, sections: unknown[]) => void;
|
|
3146
|
+
'Control.recListDestroy': () => void;
|
|
3147
|
+
'Control.definitionChange': (definition: number, item?: DefinitionItem) => void;
|
|
3148
|
+
'Control.definitionList': (list: DefinitionItem[]) => void;
|
|
3149
|
+
'Control.definitionPanelOpenChange': (open: boolean, definition: number, item?: DefinitionItem) => void;
|
|
3150
|
+
'Control.definitionDestroy': () => void;
|
|
3151
|
+
'Control.speedChange': (speed: number, item?: unknown) => void;
|
|
3152
|
+
'Control.speedPanelOpenChange': (open: boolean, speed: number, item?: unknown) => void;
|
|
3153
|
+
'Control.speedDestroy': () => void;
|
|
3154
|
+
'Control.zoomChange': (zoom: number) => void;
|
|
3155
|
+
'Control.zoomPanelOpenChange': (open: boolean) => void;
|
|
3156
|
+
'Control.zoomDestroy': () => void;
|
|
3157
|
+
'Control.fullscreenDestroy': () => void;
|
|
3158
|
+
'Control.globalFullscreenDestroy': () => void;
|
|
3159
|
+
'Control.deviceDestroy': () => void;
|
|
3160
|
+
'Control.datePanelOpenChange': (open: boolean, date: Date) => void;
|
|
3161
|
+
'Control.dateChange': (date: Date) => void;
|
|
3162
|
+
'Control.dateMonthChange': (dates: string[]) => void;
|
|
3163
|
+
/** 日历控件销毁(注意其字符串值为 `Control.datePanelDestroy`) */
|
|
3164
|
+
'Control.datePanelDestroy': () => void;
|
|
3165
|
+
'Control.timePanelOpenChange': (open: boolean, time: string) => void;
|
|
3166
|
+
'Control.timeChange': (time: string) => void;
|
|
3167
|
+
'Control.timeLineChange': (date: Date | string) => void;
|
|
3168
|
+
'Control.timeLinePanelOpenChange': (open: boolean) => void;
|
|
3169
|
+
'Control.timeLineDestroy': () => void;
|
|
3170
|
+
'Control.posterDestroy': () => void;
|
|
3171
|
+
'Control.loadingDestroy': () => void;
|
|
3172
|
+
'Control.messageDestroy': () => void;
|
|
3173
|
+
'Control.contentDestroy': () => void;
|
|
3174
|
+
'Control.contentRerender': (info: unknown) => void;
|
|
3175
|
+
'Theme.beforeDestroy': () => void;
|
|
3176
|
+
'Theme.destroyed': () => void;
|
|
3177
|
+
'Theme.mobileExtendDestroy': () => void;
|
|
3178
|
+
'Theme.recFooterDestroy': () => void;
|
|
3179
|
+
}
|
|
3180
|
+
/** 单个事件的监听器类型,如 `ThemeEventHandler<'volumechange'>` */
|
|
3181
|
+
type ThemeEventHandler<K extends ThemeEventName> = K extends keyof ThemeEventMap ? ThemeEventMap[K] : (...args: unknown[]) => void;
|
|
3182
|
+
/** 单个事件的参数元组,如 `ThemeEventArgs<'volumechange'>` = `[number, boolean]` */
|
|
3183
|
+
type ThemeEventArgs<K extends ThemeEventName> = K extends keyof ThemeEventMap ? Parameters<ThemeEventMap[K]> : unknown[];
|
|
3184
|
+
|
|
2916
3185
|
export { Control, EVENTS, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|
|
2917
|
-
export type { CleanUpResizeObserver, CleanUpScreenOrientationFun, ControlItem, ControlOptions, FooterOptions, FullscreenOptions, HeaderOptions, IThemeData, IThemeDataItem, LoadingOptions, MessageOptions, PlayOptions, PosterOptions, RecOptions, ScreenOrientation, ThemeOptions, VolumeOptions };
|
|
3186
|
+
export type { AudioInfo, CleanUpResizeObserver, CleanUpScreenOrientationFun, ControlEventName, ControlItem, ControlOptions, FooterOptions, FullscreenChangeInfo, FullscreenOptions, HeaderOptions, IThemeData, IThemeDataItem, LoadingOptions, MessageOptions, OrientationAngle, PlayOptions, PosterOptions, PtzErrorInfo, RecOptions, ResizeInfo, ScreenOrientation, ThemeEventArgs, ThemeEventHandler, ThemeEventMap, ThemeEventName, ThemeLifecycleEventName, ThemeOptions, ThemeOuterEventName, VideoInfo, VolumeOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezuikit/player-theme",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2-beta.2",
|
|
4
4
|
"description": "player theme",
|
|
5
5
|
"title": "theme",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -20,13 +20,15 @@
|
|
|
20
20
|
"./dist/constant": "./dist/constant.js"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
|
-
"dist"
|
|
23
|
+
"dist",
|
|
24
|
+
"!dist/*.map"
|
|
24
25
|
],
|
|
25
26
|
"keywords": [
|
|
26
27
|
"player",
|
|
27
28
|
"theme",
|
|
28
29
|
"ezuikit",
|
|
29
30
|
"ezviz",
|
|
31
|
+
"ezopen",
|
|
30
32
|
"ui"
|
|
31
33
|
],
|
|
32
34
|
"author": "Ezviz-OpenBiz",
|