@byteplus/react-native-live-pull 1.5.1-rc.2 → 1.5.2-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.
@@ -44,31 +44,22 @@
44
44
  }
45
45
 
46
46
  - (void) insertSubview:(UIView *)view atIndex:(NSInteger)index {
47
- // NSLog(@"insert playview, self bounds=%f x %f", self.bounds.size.width, self.bounds.size.height);
48
- // NSLog(@"insert playview, view frame=%f x %f", view.frame.size.width, view.frame.size.height);
49
-
50
- dispatch_async(dispatch_get_main_queue(), ^{
51
- [super insertSubview:view atIndex:index];
52
- [self setSubViewLayout:view];
53
- });
47
+ [super insertSubview:view atIndex:index];
48
+ // 不需要在这里设置约束
54
49
  }
55
50
 
56
51
  - (void) addSubview:(UIView *)view {
57
- dispatch_async(dispatch_get_main_queue(), ^{
58
- [super addSubview:view];
59
- [self setSubViewLayout:view];
60
- });
52
+ [super addSubview:view];
61
53
  }
62
54
 
63
- // 设置 Auto Layout,确保 subView 始终匹配 view 尺寸
64
- - (void) setSubViewLayout:(UIView *)view {
65
- view.translatesAutoresizingMaskIntoConstraints = NO;
66
- [NSLayoutConstraint activateConstraints:@[
67
- [view.leadingAnchor constraintEqualToAnchor:self.leadingAnchor],
68
- [view.trailingAnchor constraintEqualToAnchor:self.trailingAnchor],
69
- [view.topAnchor constraintEqualToAnchor:self.topAnchor],
70
- [view.bottomAnchor constraintEqualToAnchor:self.bottomAnchor]
71
- ]];
55
+ - (void)layoutSubviews {
56
+ [super layoutSubviews];
57
+ // 遍历子视图,强制对齐 frame
58
+ for (UIView *subview in self.subviews) {
59
+ if (!CGRectEqualToRect(subview.frame, self.bounds)) {
60
+ subview.frame = self.bounds;
61
+ }
62
+ }
72
63
  }
73
64
 
74
- @end
65
+ @end
@@ -14558,7 +14558,7 @@ function initAndroidEnv(config) {
14558
14558
  .setLicenseUri(config.LicenseUri.android);
14559
14559
  androidEnv = builder.build();
14560
14560
  EnvHelper.init(androidEnv, {
14561
- hybrid_ua: "rn|pull|".concat("1.5.0"),
14561
+ hybrid_ua: "rn|pull|".concat("1.5.1"),
14562
14562
  });
14563
14563
  Env.openAppLog(config.openLog);
14564
14564
  return [2 /*return*/];
@@ -14569,7 +14569,7 @@ function initAndroidEnv(config) {
14569
14569
  function initIOSEnv(config) {
14570
14570
  return __awaiter(this, void 0, void 0, function () {
14571
14571
  return __generator(this, function (_a) {
14572
- VeLivePlayerHelper.startWithConfiguration(__assign(__assign({}, config), { LicenseUri: config.LicenseUri.ios, appLogAid: '500808' , hybrid_ua: "rn|pull|".concat("1.5.0") }));
14572
+ VeLivePlayerHelper.startWithConfiguration(__assign(__assign({}, config), { LicenseUri: config.LicenseUri.ios, appLogAid: '500808' , hybrid_ua: "rn|pull|".concat("1.5.1") }));
14573
14573
  return [2 /*return*/];
14574
14574
  });
14575
14575
  });
@@ -14556,7 +14556,7 @@ function initAndroidEnv(config) {
14556
14556
  .setLicenseUri(config.LicenseUri.android);
14557
14557
  androidEnv = builder.build();
14558
14558
  EnvHelper.init(androidEnv, {
14559
- hybrid_ua: "rn|pull|".concat("1.5.0"),
14559
+ hybrid_ua: "rn|pull|".concat("1.5.1"),
14560
14560
  });
14561
14561
  Env.openAppLog(config.openLog);
14562
14562
  return [2 /*return*/];
@@ -14567,7 +14567,7 @@ function initAndroidEnv(config) {
14567
14567
  function initIOSEnv(config) {
14568
14568
  return __awaiter(this, void 0, void 0, function () {
14569
14569
  return __generator(this, function (_a) {
14570
- VeLivePlayerHelper.startWithConfiguration(__assign(__assign({}, config), { LicenseUri: config.LicenseUri.ios, appLogAid: '500808' , hybrid_ua: "rn|pull|".concat("1.5.0") }));
14570
+ VeLivePlayerHelper.startWithConfiguration(__assign(__assign({}, config), { LicenseUri: config.LicenseUri.ios, appLogAid: '500808' , hybrid_ua: "rn|pull|".concat("1.5.1") }));
14571
14571
  return [2 /*return*/];
14572
14572
  });
14573
14573
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteplus/react-native-live-pull",
3
- "version": "1.5.1-rc.2",
3
+ "version": "1.5.2-rc.0",
4
4
  "peerDependencies": {
5
5
  "react": "*",
6
6
  "react-native": "*"