@volcengine/veplayer 2.5.0 → 2.5.1-rc.0

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;
@@ -1452,7 +1452,7 @@ var sniffer = {
1452
1452
  }
1453
1453
  }
1454
1454
  };
1455
- var version = "3.0.21-rc.2";
1455
+ var version = "3.0.21-rc.5";
1456
1456
  var ERROR_TYPE_MAP = {
1457
1457
  1: "media",
1458
1458
  2: "media",
@@ -1908,7 +1908,7 @@ var MediaProxy = /* @__PURE__ */ function(_EventEmitter) {
1908
1908
  var _e = this.media.error || error2;
1909
1909
  var type = _e.code ? ERROR_TYPE_MAP[_e.code] : "other";
1910
1910
  var message = _e.message;
1911
- if (!this.media.currentSrc) {
1911
+ if (!(this.media.currentSrc || this.media.srcObject)) {
1912
1912
  message = "empty_src";
1913
1913
  _e = {
1914
1914
  code: 6,
@@ -4122,6 +4122,10 @@ var Controls = /* @__PURE__ */ function(_Plugin) {
4122
4122
  this.unbind("mouseenter", this.onMouseEnter);
4123
4123
  this.unbind("mouseleave", this.onMouseLeave);
4124
4124
  }
4125
+ this.left = null;
4126
+ this.center = null;
4127
+ this.right = null;
4128
+ this.innerRoot = null;
4125
4129
  }
4126
4130
  }, {
4127
4131
  key: "render",
@@ -12767,6 +12771,13 @@ const getUrlObject = (url) => {
12767
12771
  return;
12768
12772
  }
12769
12773
  };
12774
+ const H264_MIME = 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';
12775
+ const H265_MIME = [
12776
+ 'video/mp4;codecs="hev1.1.6.L120.90"',
12777
+ 'video/mp4;codecs="hev1.2.4.L120.90"',
12778
+ 'video/mp4;codecs="hev1.3.E.L120.90"',
12779
+ 'video/mp4;codecs="hev1.4.10.L120.90"'
12780
+ ];
12770
12781
  function isType(suffix) {
12771
12782
  return function(url) {
12772
12783
  return url == null ? void 0 : url.split("?")[0].toLowerCase().includes(suffix);
@@ -12799,14 +12810,28 @@ function isMseSupported(codec = Codec.H264) {
12799
12810
  if (codec === Codec.H265) {
12800
12811
  return sniffer.isHevcSupported();
12801
12812
  }
12802
- return sniffer.isMSESupport();
12813
+ if (codec === Codec.H264) {
12814
+ return sniffer.isMSESupport();
12815
+ }
12816
+ return sniffer.isMSESupport(codec);
12803
12817
  }
12804
12818
  async function isSoftDecodeSupported() {
12805
12819
  const { XGVideoPlugin } = await load(DynamicModule.PluginXgvideo);
12806
12820
  return XGVideoPlugin == null ? void 0 : XGVideoPlugin.isSupported();
12807
12821
  }
12808
- function isMMSSupported() {
12809
- return typeof ManagedMediaSource !== "undefined";
12822
+ function isMMSSupported(codec = Codec.H264) {
12823
+ if (typeof window.ManagedMediaSource === "undefined") {
12824
+ return false;
12825
+ }
12826
+ if (codec === Codec.H264) {
12827
+ return window.ManagedMediaSource.isTypeSupported(H264_MIME);
12828
+ }
12829
+ if (codec === Codec.H265) {
12830
+ return H265_MIME.some((mine) => {
12831
+ return window.ManagedMediaSource.isTypeSupported(mine);
12832
+ });
12833
+ }
12834
+ return window.ManagedMediaSource.isTypeSupported(codec);
12810
12835
  }
12811
12836
  ({
12812
12837
  ...util,
@@ -13681,7 +13706,7 @@ class VePlayerBase {
13681
13706
  * @brief Retrieve the player SDK version number.
13682
13707
  */
13683
13708
  get playerVersion() {
13684
- return "2.5.0";
13709
+ return "2.5.1-rc.0";
13685
13710
  }
13686
13711
  /** {zh}
13687
13712
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。