@ezuikit/player-theme 3.1.2-beta.2 → 3.1.2-beta.4

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.
@@ -342,6 +342,8 @@ declare class Control extends EventEmitter {
342
342
  protected _disabled: boolean;
343
343
  protected _active: boolean;
344
344
  private readonly _camelCaseName;
345
+ /** click 监听引用,销毁时需显式移除 */
346
+ private _onClickHandler;
345
347
  constructor(options: Partial<ControlOptions>);
346
348
  /**
347
349
  * 是否激活
@@ -1492,10 +1494,9 @@ declare class Theme extends EventEmitter {
1492
1494
  readonly audioInfo: "audioInfo";
1493
1495
  readonly videoInfo: "videoInfo";
1494
1496
  readonly firstFrameDisplay: "firstFrameDisplay";
1495
- readonly fullscreen: "fullscreen"; /** 所有私有流的模板 @since 0.0.1 */
1497
+ readonly fullscreen: "fullscreen";
1496
1498
  readonly exitFullscreen: "exitFullscreen";
1497
1499
  readonly fullscreenChange: "fullscreenChange";
1498
- /** 播放器配置项 */
1499
1500
  readonly resize: "resize";
1500
1501
  readonly orientationChange: "orientationChange";
1501
1502
  readonly audioCodecUnsupported: "audioCodecUnsupported";
@@ -1505,15 +1506,25 @@ declare class Theme extends EventEmitter {
1505
1506
  readonly speedChange: "speedChange";
1506
1507
  readonly recordingChange: "recordingChange";
1507
1508
  readonly talkingChange: "talkingChange";
1508
- readonly talkVolumeChange: "talkVolumeChange"; /** 封面控件 @since 0.0.1 @private */
1509
+ readonly talkVolumeChange: "talkVolumeChange";
1509
1510
  readonly broadcastChange: "broadcastChange";
1510
1511
  readonly aichatChange: "aichatChange";
1511
1512
  readonly liveChange: "liveChange";
1513
+ /**
1514
+ * @type { "rec" | "cloudRec" | "cloudRecord" } recType 回放类型
1515
+ * ```ts
1516
+ * theme.recType // 回放类型
1517
+ * ```
1518
+ */
1512
1519
  readonly recDropdownChange: "recDropdownChange";
1513
1520
  readonly recListChange: "recListChange";
1514
1521
  readonly alarmMessageChange: "alarmMessageChange";
1515
1522
  readonly setLoggerOptions: "setLoggerOptions";
1516
- readonly records: "records";
1523
+ readonly records: "records"; /**
1524
+ * 更多控件(footer more)
1525
+ * @since 0.0.1
1526
+ * @private
1527
+ */
1517
1528
  readonly ptzSpeedChange: "ptzSpeedChange";
1518
1529
  readonly setVideoLevelList: "setVideoLevelList";
1519
1530
  readonly currentVideoLevel: "currentVideoLevel";
@@ -1523,8 +1534,8 @@ declare class Theme extends EventEmitter {
1523
1534
  readonly control: {
1524
1535
  readonly play: "Control.play";
1525
1536
  readonly playDestroy: "Control.playDestroy";
1526
- readonly capturePicture: "Control.capturePicture";
1527
- readonly capturePictureResult: "Control.capturePictureResult"; /** @since 0.0.1 @private */
1537
+ readonly capturePicture: "Control.capturePicture"; /** @since 0.0.1 @private */
1538
+ readonly capturePictureResult: "Control.capturePictureResult";
1528
1539
  readonly capturePictureDestroy: "Control.capturePictureDestroy";
1529
1540
  readonly volumechange: "Control.volumechange";
1530
1541
  readonly volumePanelOpenChange: "Control.volumePanelOpenChange";
@@ -1534,18 +1545,15 @@ declare class Theme extends EventEmitter {
1534
1545
  readonly headerMorePanelOpenChange: "Control.headerMorePanelOpenChange";
1535
1546
  readonly footerMoreShowControlsChange: "Control.footerMoreShowControlsChange";
1536
1547
  readonly footerMorePanelOpenChange: "Control.footerMorePanelOpenChange";
1537
- /** 录制中 @private */
1538
1548
  readonly deviceDestroy: "Control.deviceDestroy";
1539
- readonly recTypeChange: "Control.recTypeChange";
1549
+ readonly recTypeChange: "Control.recTypeChange"; /** 自定清晰度 @private */
1540
1550
  readonly recDestroy: "Control.recDestroy";
1541
1551
  readonly definitionChange: "Control.definitionChange";
1542
1552
  readonly definitionList: "Control.definitionList";
1543
1553
  readonly definitionPanelOpenChange: "Control.definitionPanelOpenChange";
1544
1554
  readonly definitionDestroy: "Control.definitionDestroy";
1545
1555
  readonly speedChange: "Control.speedChange";
1546
- readonly speedPanelOpenChange: "Control.speedPanelOpenChange"; /**
1547
- * 录像回放的月份列表 @private
1548
- */
1556
+ readonly speedPanelOpenChange: "Control.speedPanelOpenChange";
1549
1557
  readonly speedDestroy: "Control.speedDestroy";
1550
1558
  readonly ptzPanelOpenChange: "Control.ptzPanelOpenChange";
1551
1559
  readonly ptzSpeedChange: "Control.ptzSpeedChange";
@@ -1704,7 +1712,6 @@ declare class Theme extends EventEmitter {
1704
1712
  397007: string;
1705
1713
  399000: string;
1706
1714
  399001: string;
1707
- /** 移动端竖屏, 全屏情况下不展示扩张,放置在 footer 中 */
1708
1715
  399002: string;
1709
1716
  399016: string;
1710
1717
  399048: string;
@@ -1759,6 +1766,7 @@ declare class Theme extends EventEmitter {
1759
1766
  MIN_SPEED_LIMIT: string;
1760
1767
  SEEK_CANNOT_CROSS_DAYS: string;
1761
1768
  SEEK_TIMEFORMAT_ERROR: string;
1769
+ /** 所有控件列表, 所有控件名称规则(`${iconId}Control`), 如音量控件 this.controls["volumeControl"] @since 0.0.1 */
1762
1770
  PAUSE: string;
1763
1771
  PAUSE_FAILED: string;
1764
1772
  RESUME: string;
@@ -1769,7 +1777,6 @@ declare class Theme extends EventEmitter {
1769
1777
  CHANGE_VIDEO_LEVEL: string;
1770
1778
  CHANGE_VIDEO_LEVEL_FAIL: string;
1771
1779
  GET_VIDEO_LEVEL_LIST: string;
1772
- /** 消息提示控件 @since 0.0.1 @private */
1773
1780
  PLEASE_INPUT_RIGHT_VIDEO_LEVEL: string;
1774
1781
  VIDEO_LEVEL_NOT_SUPPORT: string;
1775
1782
  VIDEO_LEVEL_AUTO: string;
@@ -1783,6 +1790,11 @@ declare class Theme extends EventEmitter {
1783
1790
  RESET_THEME: string;
1784
1791
  BTN_PLAY: string;
1785
1792
  BTN_PAUSE: string;
1793
+ /**
1794
+ * 更多控件(header more)
1795
+ * @since 0.0.1
1796
+ * @private
1797
+ */
1786
1798
  BTN_VOLUME: string;
1787
1799
  BTN_MUTED: string;
1788
1800
  BTN_RECORDVIDEO: string;
@@ -1792,18 +1804,14 @@ declare class Theme extends EventEmitter {
1792
1804
  BTN_AICHAT: string;
1793
1805
  BTN_LIVE: string;
1794
1806
  BTN_REC_DROPDOWN: string;
1795
- BTN_ALARM_MESSAGE: string;
1807
+ BTN_ALARM_MESSAGE: string; /** 头部控件 @since 0.0.1 @private */
1796
1808
  REC_DROPDOWN_CLOUD_REC: string;
1797
- REC_DROPDOWN_CLOUD_RECORD: string;
1809
+ REC_DROPDOWN_CLOUD_RECORD: string; /** 低部控件 @since 0.0.1 @private */
1798
1810
  REC_DROPDOWN_LOCAL_REC: string;
1799
- BTN_ZOOM: string; /** 回放底部时间轴 @since 0.0.1 @private */
1811
+ BTN_ZOOM: string;
1800
1812
  BTN_3D_ZOOM: string;
1801
1813
  BTN_PTZ: string;
1802
1814
  BTN_GLOBAL_FULLSCREEN: string;
1803
- /**
1804
- * 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
1805
- * @private
1806
- */
1807
1815
  BTN_EXIT_GLOBAL_FULLSCREEN: string;
1808
1816
  BTN_FULLSCREEN: string;
1809
1817
  BTN_EXIR_FULLSCREEN: string;
@@ -1821,14 +1829,13 @@ declare class Theme extends EventEmitter {
1821
1829
  CAPTURE_FAILED: string;
1822
1830
  START_RECORD_SUCCESS: string;
1823
1831
  START_RECORD_FAILED: string;
1824
- STOP_RECORD_SUCCESS: string; /** resizeObserver 监听销毁 */
1832
+ STOP_RECORD_SUCCESS: string;
1825
1833
  STOP_RECORD_FAILED: string;
1826
1834
  RECORD_TIPS: string;
1827
1835
  RECORDS: string;
1828
1836
  OPEN_SOUND: string;
1829
1837
  CLOSE_SOUND: string;
1830
1838
  SOUND_OPENED: string;
1831
- /** 容器的宽 */
1832
1839
  ZOOM: string;
1833
1840
  START_ZOOM: string;
1834
1841
  CLOSE_ZOOM: string;
@@ -1838,7 +1845,7 @@ declare class Theme extends EventEmitter {
1838
1845
  ZOOM_SUB_MIN: string;
1839
1846
  ZOOM_LIMIT_MAX: string;
1840
1847
  ZOOM_LIMIT_MIN: string;
1841
- ZOOM_NOT_ENABLED: string; /** 是否播放中 @private */
1848
+ ZOOM_NOT_ENABLED: string;
1842
1849
  '3D_ZOOM': string;
1843
1850
  '3D_ZOOM_DISABLE': string;
1844
1851
  '3D_ZOOM_FAILED': string;
@@ -1847,12 +1854,13 @@ declare class Theme extends EventEmitter {
1847
1854
  DEVICE_NOT_SUPPORT_3D_ZOOM: string;
1848
1855
  '3D_ZOOM_ACTIVED': string;
1849
1856
  '3D_ZOOM_NOT_ACTIVED': string;
1850
- '3D_ZOOM_CLOSED': string;
1857
+ '3D_ZOOM_CLOSED': string; /** 录制中 @private */
1851
1858
  CHANGE_ZOOM_TYPE: string;
1852
1859
  FULLSCREEN: string;
1853
1860
  FULLSCREEN_EXIT: string;
1861
+ /** 倍速 @private */
1854
1862
  GET_WEB_FULLSCREEN_STATUS: string;
1855
- WEB_FULLSCREEN: string; /** 清晰度列表 */
1863
+ WEB_FULLSCREEN: string;
1856
1864
  WEB_FULLSCREEN_EXIT: string;
1857
1865
  DESTROY: string;
1858
1866
  GET_CAPACITY: string;
@@ -1865,16 +1873,16 @@ declare class Theme extends EventEmitter {
1865
1873
  PTZ_MID: string;
1866
1874
  PTZ_SLOW: string;
1867
1875
  PTZ_SPEED: string;
1868
- /**
1869
- * 录像回放的月份列表 @private
1870
- */
1871
1876
  DEVICE_ZOOM: string;
1872
1877
  DEVICE_FOCUS: string;
1873
1878
  NOT_SUPPORT_DEVICE_ZOOM: string;
1874
1879
  NOT_SUPPORT_FOCUS: string;
1875
1880
  MIRROR: string;
1881
+ /**
1882
+ * 录像回放的月份列表 @private
1883
+ */
1876
1884
  MIRROR_TYPE_ERROR: string;
1877
- CHANGE_FEC_TYPE: string;
1885
+ CHANGE_FEC_TYPE: string; /** 清理 header/footer 动画 定时器 @private */
1878
1886
  DEVICE_NOT_SUPPORT: string;
1879
1887
  TYPE_NOT_SUPPORT: string;
1880
1888
  FEC_SUPPORT_VERSION: string;
@@ -1882,6 +1890,11 @@ declare class Theme extends EventEmitter {
1882
1890
  SET_FEC_PARAMS: string;
1883
1891
  GET_FEC_PARAMS: string;
1884
1892
  SET_FEC_PARAMS_FAILED: string;
1893
+ /**
1894
+ * 模板请求(getDetail)的中止控制器。
1895
+ * 重新渲染或销毁时中止在途请求,避免请求返回后在已销毁/已切换的 theme 上继续操作。
1896
+ * @private
1897
+ */
1885
1898
  GET_FEC_PARAMS_FAILED: string;
1886
1899
  GET_FEC_PARAMS_SUPPORT_VERSION: string;
1887
1900
  SET_WATERMARK: string;
@@ -1946,8 +1959,8 @@ declare class Theme extends EventEmitter {
1946
1959
  395601: string;
1947
1960
  395602: string;
1948
1961
  395610: string;
1949
- /** 暂停控件 @since 0.0.1 @private */
1950
1962
  395620: string;
1963
+ /** 消息提示控件 @since 0.0.1 @private */
1951
1964
  395701: string;
1952
1965
  395702: string;
1953
1966
  395703: string;
@@ -1968,15 +1981,14 @@ declare class Theme extends EventEmitter {
1968
1981
  396503: string;
1969
1982
  396504: string;
1970
1983
  396505: string;
1971
- /** 屏幕旋转角度 0 | 90 | 180 | 270 */
1972
1984
  396506: string;
1973
1985
  396508: string;
1974
1986
  396509: string;
1975
1987
  396510: string;
1976
1988
  396511: string;
1977
- 396512: string; /** 倍速 @private */
1989
+ 396512: string;
1978
1990
  396513: string;
1979
- 396514: string;
1991
+ 396514: string; /** 回放片段列表 */
1980
1992
  396515: string;
1981
1993
  396516: string;
1982
1994
  /**
@@ -2049,12 +2061,7 @@ declare class Theme extends EventEmitter {
2049
2061
  GET_SPEED: string;
2050
2062
  MAX_SPEED_LIMIT: string;
2051
2063
  MIN_SPEED_LIMIT: string;
2052
- SEEK_CANNOT_CROSS_DAYS: string; /**
2053
- * 容器的高(单位 px)
2054
- * ```ts
2055
- * theme.height // number
2056
- * ```
2057
- */
2064
+ SEEK_CANNOT_CROSS_DAYS: string;
2058
2065
  SEEK_TIMEFORMAT_ERROR: string;
2059
2066
  PAUSE: string;
2060
2067
  PAUSE_FAILED: string;
@@ -2066,17 +2073,32 @@ declare class Theme extends EventEmitter {
2066
2073
  CHANGE_VIDEO_LEVEL: string;
2067
2074
  CHANGE_VIDEO_LEVEL_FAIL: string;
2068
2075
  GET_VIDEO_LEVEL_LIST: string;
2076
+ /**
2077
+ * 视频信息
2078
+ * @version 3.1.2
2079
+ * ```ts
2080
+ * theme.videoInfo // ThemeVideoInfo
2081
+ * ```
2082
+ */
2069
2083
  PLEASE_INPUT_RIGHT_VIDEO_LEVEL: string;
2070
2084
  VIDEO_LEVEL_NOT_SUPPORT: string;
2071
2085
  VIDEO_LEVEL_AUTO: string;
2072
2086
  VIDEO_LEVEL_FLUENT: string;
2073
2087
  VIDEO_LEVEL_STANDARD: string;
2074
2088
  VIDEO_LEVEL_HEIGH: string;
2075
- VIDEO_LEVEL_SUPER: string;
2089
+ VIDEO_LEVEL_SUPER: string; /**
2090
+ * 视频分辨率 高
2091
+ * @version 3.1.2
2092
+ */
2076
2093
  VIDEO_LEVEL_EXTREME: string;
2077
2094
  VIDEO_LEVEL_3K: string;
2078
2095
  VIDEO_LEVEL_4k: string;
2079
- RESET_THEME: string;
2096
+ RESET_THEME: string; /**
2097
+ * 当前播放状态
2098
+ * ```ts
2099
+ * theme.playing // boolean
2100
+ * ```
2101
+ */
2080
2102
  BTN_PLAY: string;
2081
2103
  BTN_PAUSE: string;
2082
2104
  BTN_VOLUME: string;
@@ -2088,21 +2110,9 @@ declare class Theme extends EventEmitter {
2088
2110
  BTN_AICHAT: string;
2089
2111
  BTN_LIVE: string;
2090
2112
  BTN_REC_DROPDOWN: string;
2091
- /**
2092
- * 加载中
2093
- * ```ts
2094
- * theme.loading // boolean
2095
- * ```
2096
- */
2097
2113
  BTN_ALARM_MESSAGE: string;
2098
2114
  REC_DROPDOWN_CLOUD_REC: string;
2099
- REC_DROPDOWN_CLOUD_RECORD: string; /**
2100
- * 加载状态
2101
- * ```ts
2102
- * // 事件监听
2103
- * theme.on(Theme.EVENTS.loading, (loading: boolean) => {})
2104
- * ```
2105
- */
2115
+ REC_DROPDOWN_CLOUD_RECORD: string;
2106
2116
  REC_DROPDOWN_LOCAL_REC: string;
2107
2117
  BTN_ZOOM: string;
2108
2118
  BTN_3D_ZOOM: string;
@@ -2114,13 +2124,7 @@ declare class Theme extends EventEmitter {
2114
2124
  BTN_EXPEND: string;
2115
2125
  BTN_WEBEXPEND: string;
2116
2126
  BTN_HD: string;
2117
- BTN_SPEED: string; /**
2118
- * 音量值
2119
- * ```ts
2120
- * // 事件监听
2121
- * theme.on(Theme.EVENTS.volumechange, (volume: number, muted: boolean) => {})
2122
- * ```
2123
- */
2127
+ BTN_SPEED: string;
2124
2128
  BTN_CLOUDREC: string;
2125
2129
  BTN_CLOUDRECORD: string;
2126
2130
  BTN_REC: string;
@@ -2131,7 +2135,13 @@ declare class Theme extends EventEmitter {
2131
2135
  DEVICE_ID: string;
2132
2136
  CAPTURE_SUCCESS: string;
2133
2137
  CAPTURE_FAILED: string;
2134
- START_RECORD_SUCCESS: string;
2138
+ START_RECORD_SUCCESS: string; /**
2139
+ * 加载状态
2140
+ * ```ts
2141
+ * // 事件监听
2142
+ * theme.on(Theme.EVENTS.loading, (loading: boolean) => {})
2143
+ * ```
2144
+ */
2135
2145
  START_RECORD_FAILED: string;
2136
2146
  STOP_RECORD_SUCCESS: string;
2137
2147
  STOP_RECORD_FAILED: string;
@@ -2309,9 +2319,22 @@ declare class Theme extends EventEmitter {
2309
2319
  recMonth: string[];
2310
2320
  /** 清理 header/footer 动画 定时器 @private */
2311
2321
  _onPauseTimingFunc: ((open: boolean) => void) | null;
2322
+ /**
2323
+ * 首帧同步 Live/RecDropdown 激活态的监听器引用。
2324
+ * 每次 `_renderTheme` 重新绑定前需先移除旧引用,避免 changeTheme 累积监听。
2325
+ * @private
2326
+ */
2327
+ _onFirstFrameSync: (() => void) | null;
2328
+ /**
2329
+ * 模板请求(getDetail)的中止控制器。
2330
+ * 重新渲染或销毁时中止在途请求,避免请求返回后在已销毁/已切换的 theme 上继续操作。
2331
+ * @private
2332
+ */
2333
+ _templateAbortController: AbortController | null;
2312
2334
  /** 销毁标识 @readonly */
2313
2335
  destroyed: boolean;
2314
2336
  scaleMode: ThemeOptions['scaleMode'];
2337
+ _videoInfo: ThemeVideoInfo;
2315
2338
  constructor(options: ThemeOptions);
2316
2339
  get url(): string;
2317
2340
  set url(url: string);
@@ -2333,6 +2356,29 @@ declare class Theme extends EventEmitter {
2333
2356
  * ```
2334
2357
  */
2335
2358
  get height(): number;
2359
+ /**
2360
+ * 视频信息
2361
+ * @version 3.1.2
2362
+ * ```ts
2363
+ * theme.videoInfo // ThemeVideoInfo
2364
+ * ```
2365
+ */
2366
+ get videoInfo(): ThemeVideoInfo;
2367
+ /**
2368
+ * 视频分辨率 宽
2369
+ *
2370
+ * @version 3.1.2
2371
+ *
2372
+ * ```ts
2373
+ * theme.videoWidth // number
2374
+ * ```
2375
+ */
2376
+ get videoWidth(): number;
2377
+ /**
2378
+ * 视频分辨率 高
2379
+ * @version 3.1.2
2380
+ */
2381
+ get videoHeight(): number;
2336
2382
  /**
2337
2383
  * 当前播放状态
2338
2384
  * ```ts
@@ -2825,6 +2871,11 @@ interface ThemeOptions {
2825
2871
  disabledTimeLine?: boolean;
2826
2872
  [kye: string]: any;
2827
2873
  }
2874
+ interface ThemeVideoInfo {
2875
+ width?: number;
2876
+ height?: number;
2877
+ [key: string]: any;
2878
+ }
2828
2879
  /**
2829
2880
  * 回放控件类型
2830
2881
  * @since 0.0.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezuikit/player-theme",
3
- "version": "3.1.2-beta.2",
3
+ "version": "3.1.2-beta.4",
4
4
  "description": "player theme",
5
5
  "title": "theme",
6
6
  "main": "dist/index.cjs",