@ray-js/ray-ipc-player 2.0.6 → 2.0.8

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/README-zh_CN.md CHANGED
@@ -110,6 +110,12 @@ export type IProps = {
110
110
  * @default "正在获取视频流..."
111
111
  */
112
112
  loadText?: string;
113
+ /**
114
+ * @description.en objectFit:contain|fillCrop
115
+ * @description.zh 填充模式设置:contain: 图像长边填满屏幕,短边区域会被填充⿊⾊, fillCrop: 图像铺满屏幕
116
+ * @default "contain"
117
+ */
118
+ objectFit?: string;
113
119
  /**
114
120
  * @description.en extend
115
121
  * @description.zh 扩展属性
package/README.md CHANGED
@@ -94,6 +94,12 @@ export type IProps = {
94
94
  * @default "Getting a video stream..."
95
95
  */
96
96
  loadText?: string;
97
+ /**
98
+ * @description.en objectFit:contain|fillCrop
99
+ * @description.zh contain: The long side of the image will fill the screen, the short side area will be filled with black, fillCrop: The image will fill the screen
100
+ * @default "contain"
101
+ */
102
+ objectFit?: string;
97
103
  /**
98
104
  * @description.en Extended Attributes
99
105
  * @default {}
package/lib/index.js CHANGED
@@ -50,6 +50,8 @@ var Player = function (props) {
50
50
  } : _props$playerStyle,
51
51
  _props$privateState = props.privateState,
52
52
  privateState = _props$privateState === void 0 ? false : _props$privateState,
53
+ _props$objectFit = props.objectFit,
54
+ objectFit = _props$objectFit === void 0 ? 'contain' : _props$objectFit,
53
55
  _props$extend = props.extend,
54
56
  extend = _props$extend === void 0 ? {} : _props$extend;
55
57
  var borderRadius = playerStyle.borderRadius,
@@ -383,7 +385,8 @@ var Player = function (props) {
383
385
 
384
386
  return /*#__PURE__*/React.createElement(View, {
385
387
  className: Styles.ipc_player
386
- }, /*#__PURE__*/React.createElement(IpcPlayer, _extends({
388
+ }, /*#__PURE__*/React.createElement(IpcPlayer // @ts-ignore
389
+ , _extends({
387
390
  className: "".concat(Styles.player, " ").concat(playState.updateLy),
388
391
  onVideotap: function handlePlayerClick() {
389
392
  // console.log("videoTap:", devId);
@@ -425,7 +428,7 @@ var Player = function (props) {
425
428
  autoPauseIfNavigate: false,
426
429
  autoPauseIfOpenNative: false,
427
430
  muted: defaultMute,
428
- objectFit: "contain",
431
+ objectFit: objectFit,
429
432
  clarity: clarity,
430
433
  rotateZ: rotateZ,
431
434
  scalable: scalable,
@@ -108,6 +108,12 @@ export type IProps = {
108
108
  * @default "正在获取视频流..."
109
109
  */
110
110
  loadText?: string;
111
+ /**
112
+ * @description.en objectFit:contain|fillCrop
113
+ * @description.zh 填充模式设置:contain: 图像长边填满屏幕,短边区域会被填充⿊⾊, fillCrop: 图像铺满屏幕
114
+ * @default "contain"
115
+ */
116
+ objectFit?: string;
111
117
  /**
112
118
  * @description.en extend
113
119
  * @description.zh 扩展属性
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ray-ipc-player",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "ray小程序播放器",
5
5
  "keywords": [
6
6
  "tuya-miniapp",
@@ -58,8 +58,7 @@
58
58
  },
59
59
  "husky": {
60
60
  "hooks": {
61
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS --config commitlint.config.js",
62
- "pre-commit": "lint-staged"
61
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS --config commitlint.config.js"
63
62
  }
64
63
  },
65
64
  "lint-staged": {