@volcengine/veplayer 2.5.0 → 2.5.1-rc.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.
@@ -1399,13 +1399,13 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
1399
1399
  */
1400
1400
  interface Fullscreen {
1401
1401
  /** {zh}
1402
- * @brief 切换全屏时,是否旋转为横屏播放,通常在移动端使用。如果开启横屏播放,切换全屏时,将在竖屏状态下把播放器旋转 90 度,实现横屏效果。该配置优先级高于 useCssFullscreen。
1403
- * - `true`:使用旋转横屏;
1404
- * - `false`:不使用旋转横屏。
1402
+ * @brief 切换全屏时,是否旋转为横屏播放,通常在移动端使用。如果开启横屏播放,切换全屏时,将在竖屏状态下把播放器旋转 90 度,实现横屏效果。该配置优先级低于 useCssFullscreen。
1403
+ * - `true`:使用旋转横屏;
1404
+ * - `false`:不使用旋转横屏。
1405
1405
  * @default false
1406
1406
  */
1407
1407
  /** {en}
1408
- * @brief Whether to play the video in landscape mode when the video enters full-screen mode. This feature is usually used on mobile devices. Once enabled, when the video enters fullscreen mode, the player will be rotated from portrait mode by 90 degrees to landscape mode. This property has a higher priority over `useCssFullscreen`.
1408
+ * @brief Whether to play the video in landscape mode when the video enters full-screen mode. This feature is usually used on mobile devices. Once enabled, when the video enters fullscreen mode, the player will be rotated from portrait mode by 90 degrees to landscape mode. This property has a lower priority than `useCssFullscreen`.
1409
1409
  * - `true`: Enable.
1410
1410
  * - `false`: Disable.
1411
1411
  * @default false
@@ -3722,13 +3722,13 @@ declare namespace strategy {
3722
3722
  */
3723
3723
  interface Fullscreen {
3724
3724
  /** {zh}
3725
- * @brief 切换全屏时,是否旋转为横屏播放,通常在移动端使用。如果开启横屏播放,切换全屏时,将在竖屏状态下把播放器旋转 90 度,实现横屏效果。该配置优先级高于 useCssFullscreen。
3726
- * - `true`:使用旋转横屏;
3727
- * - `false`:不使用旋转横屏。
3725
+ * @brief 切换全屏时,是否旋转为横屏播放,通常在移动端使用。如果开启横屏播放,切换全屏时,将在竖屏状态下把播放器旋转 90 度,实现横屏效果。该配置优先级低于 useCssFullscreen。
3726
+ * - `true`:使用旋转横屏;
3727
+ * - `false`:不使用旋转横屏。
3728
3728
  * @default false
3729
3729
  */
3730
3730
  /** {en}
3731
- * @brief Whether to play the video in landscape mode when the video enters full-screen mode. This feature is usually used on mobile devices. Once enabled, when the video enters fullscreen mode, the player will be rotated from portrait mode by 90 degrees to landscape mode. This property has a higher priority over `useCssFullscreen`.
3731
+ * @brief Whether to play the video in landscape mode when the video enters full-screen mode. This feature is usually used on mobile devices. Once enabled, when the video enters fullscreen mode, the player will be rotated from portrait mode by 90 degrees to landscape mode. This property has a lower priority than `useCssFullscreen`.
3732
3732
  * - `true`: Enable.
3733
3733
  * - `false`: Disable.
3734
3734
  * @default false
@@ -4002,13 +4002,6 @@ declare namespace strategy {
4002
4002
  function detectCodec(url: string): Promise<"unknown" | Codec>;
4003
4003
  function isSoftDecode(options: VePlayerBaseOptions, currentCodec?: Codec | "unknown"): Promise<boolean>;
4004
4004
  function combineOptions<T = VePlayerBaseOptions>(strategyList: (Strategy<T> | undefined)[]): Partial<T>;
4005
- const getFlvStrategy: (options: VePlayerBaseOptions) => Promise<{
4006
- options?: undefined;
4007
- plugins?: undefined;
4008
- } | {
4009
- options: Partial<VePlayerBaseOptions>;
4010
- plugins: any[];
4011
- }>;
4012
4005
  const getHlsStrategy: (options: VePlayerBaseOptions) => Promise<{
4013
4006
  options?: undefined;
4014
4007
  plugins?: undefined;
@@ -1456,7 +1456,7 @@ var __publicField = (obj, key, value) => {
1456
1456
  }
1457
1457
  }
1458
1458
  };
1459
- var version = "3.0.21-rc.2";
1459
+ var version = "3.0.21-rc.5";
1460
1460
  var ERROR_TYPE_MAP = {
1461
1461
  1: "media",
1462
1462
  2: "media",
@@ -1912,7 +1912,7 @@ var __publicField = (obj, key, value) => {
1912
1912
  var _e = this.media.error || error2;
1913
1913
  var type = _e.code ? ERROR_TYPE_MAP[_e.code] : "other";
1914
1914
  var message = _e.message;
1915
- if (!this.media.currentSrc) {
1915
+ if (!(this.media.currentSrc || this.media.srcObject)) {
1916
1916
  message = "empty_src";
1917
1917
  _e = {
1918
1918
  code: 6,
@@ -4126,6 +4126,10 @@ var __publicField = (obj, key, value) => {
4126
4126
  this.unbind("mouseenter", this.onMouseEnter);
4127
4127
  this.unbind("mouseleave", this.onMouseLeave);
4128
4128
  }
4129
+ this.left = null;
4130
+ this.center = null;
4131
+ this.right = null;
4132
+ this.innerRoot = null;
4129
4133
  }
4130
4134
  }, {
4131
4135
  key: "render",
@@ -12771,6 +12775,13 @@ var __publicField = (obj, key, value) => {
12771
12775
  return;
12772
12776
  }
12773
12777
  };
12778
+ const H264_MIME = 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';
12779
+ const H265_MIME = [
12780
+ 'video/mp4;codecs="hev1.1.6.L120.90"',
12781
+ 'video/mp4;codecs="hev1.2.4.L120.90"',
12782
+ 'video/mp4;codecs="hev1.3.E.L120.90"',
12783
+ 'video/mp4;codecs="hev1.4.10.L120.90"'
12784
+ ];
12774
12785
  function isType(suffix) {
12775
12786
  return function(url) {
12776
12787
  return url == null ? void 0 : url.split("?")[0].toLowerCase().includes(suffix);
@@ -12803,14 +12814,28 @@ var __publicField = (obj, key, value) => {
12803
12814
  if (codec === Codec.H265) {
12804
12815
  return sniffer.isHevcSupported();
12805
12816
  }
12806
- return sniffer.isMSESupport();
12817
+ if (codec === Codec.H264) {
12818
+ return sniffer.isMSESupport();
12819
+ }
12820
+ return sniffer.isMSESupport(codec);
12807
12821
  }
12808
12822
  async function isSoftDecodeSupported() {
12809
12823
  const { XGVideoPlugin } = await load(DynamicModule.PluginXgvideo);
12810
12824
  return XGVideoPlugin == null ? void 0 : XGVideoPlugin.isSupported();
12811
12825
  }
12812
- function isMMSSupported() {
12813
- return typeof ManagedMediaSource !== "undefined";
12826
+ function isMMSSupported(codec = Codec.H264) {
12827
+ if (typeof window.ManagedMediaSource === "undefined") {
12828
+ return false;
12829
+ }
12830
+ if (codec === Codec.H264) {
12831
+ return window.ManagedMediaSource.isTypeSupported(H264_MIME);
12832
+ }
12833
+ if (codec === Codec.H265) {
12834
+ return H265_MIME.some((mine) => {
12835
+ return window.ManagedMediaSource.isTypeSupported(mine);
12836
+ });
12837
+ }
12838
+ return window.ManagedMediaSource.isTypeSupported(codec);
12814
12839
  }
12815
12840
  ({
12816
12841
  ...util,
@@ -13685,7 +13710,7 @@ var __publicField = (obj, key, value) => {
13685
13710
  * @brief Retrieve the player SDK version number.
13686
13711
  */
13687
13712
  get playerVersion() {
13688
- return "2.5.0";
13713
+ return "2.5.1-rc.1";
13689
13714
  }
13690
13715
  /** {zh}
13691
13716
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。