amazon-ivs-react-native-player 1.1.0 → 1.2.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.
@@ -27,5 +27,5 @@ Pod::Spec.new do |s|
27
27
 
28
28
 
29
29
  s.dependency "React-Core"
30
- s.dependency "AmazonIVSPlayer", "~> 1.8.0"
30
+ s.dependency "AmazonIVSPlayer", "~> 1.8.2"
31
31
  end
@@ -2,4 +2,4 @@ AmazonIvs_kotlinVersion=1.3.50
2
2
  AmazonIvs_compileSdkVersion=30
3
3
  AmazonIvs_buildToolsVersion=30.0.2
4
4
  AmazonIvs_targetSdkVersion=30
5
- AmazonIvs_ivsVersion=1.8.0
5
+ AmazonIvs_ivsVersion=1.10.0
@@ -412,11 +412,9 @@ class AmazonIvsView(private val context: ThemedReactContext) : FrameLayout(conte
412
412
  }
413
413
 
414
414
  override fun onHostResume() {
415
- play()
416
415
  }
417
416
 
418
417
  override fun onHostPause() {
419
- pause()
420
418
  }
421
419
 
422
420
  override fun onHostDestroy() {
@@ -33,4 +33,8 @@ RCT_EXPORT_VIEW_PROPERTY(onTextMetadataCue, RCTDirectEventBlock)
33
33
  RCT_EXPORT_VIEW_PROPERTY(onProgress, RCTDirectEventBlock)
34
34
  RCT_EXPORT_VIEW_PROPERTY(onError, RCTDirectEventBlock)
35
35
  RCT_EXPORT_VIEW_PROPERTY(onTimePoint, RCTDirectEventBlock)
36
+ + (BOOL)requiresMainQueueSetup
37
+ {
38
+ return YES;
39
+ }
36
40
  @end
@@ -55,7 +55,6 @@ class AmazonIvsView: UIView, IVSPlayer.Delegate {
55
55
  self.addProgressObserver()
56
56
  self.addPlayerObserver()
57
57
  self.addTimePointObserver()
58
- self.addApplicationLifecycleObservers()
59
58
 
60
59
  player.delegate = self
61
60
  self.playerView.player = player
@@ -65,7 +64,6 @@ class AmazonIvsView: UIView, IVSPlayer.Delegate {
65
64
  self.removeProgressObserver()
66
65
  self.removePlayerObserver()
67
66
  self.removeTimePointObserver()
68
- self.removeApplicationLifecycleObservers()
69
67
  }
70
68
 
71
69
  func load(urlString: String) {
@@ -263,34 +261,6 @@ class AmazonIvsView: UIView, IVSPlayer.Delegate {
263
261
  }
264
262
  }
265
263
 
266
- private var didPauseOnBackground = false
267
-
268
- @objc private func applicationDidEnterBackground(notification: Notification) {
269
- if player.state == .playing || player.state == .buffering {
270
- didPauseOnBackground = true
271
- pause()
272
- } else {
273
- didPauseOnBackground = false
274
- }
275
- }
276
-
277
- @objc private func applicationDidBecomeActive(notification: Notification) {
278
- if didPauseOnBackground && player.error == nil {
279
- play()
280
- didPauseOnBackground = false
281
- }
282
- }
283
-
284
- private func addApplicationLifecycleObservers() {
285
- NotificationCenter.default.addObserver(self, selector: #selector(applicationDidEnterBackground(notification:)), name: UIApplication.didEnterBackgroundNotification, object: nil)
286
- NotificationCenter.default.addObserver(self, selector: #selector(applicationDidBecomeActive(notification:)), name: UIApplication.didBecomeActiveNotification, object: nil)
287
- }
288
-
289
- private func removeApplicationLifecycleObservers() {
290
- NotificationCenter.default.removeObserver(self, name: UIApplication.didEnterBackgroundNotification, object: nil)
291
- NotificationCenter.default.removeObserver(self, name: UIApplication.willEnterForegroundNotification, object: nil)
292
- }
293
-
294
264
  private func mapPlayerState(state: IVSPlayer.State) -> String {
295
265
  switch state {
296
266
  case IVSPlayer.State.playing: return "Playing"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amazon-ivs-react-native-player",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "amazon-ivs-react-native-player",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
package/NOTICE DELETED
@@ -1 +0,0 @@
1
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
package/ios/.gitignore DELETED
@@ -1 +0,0 @@
1
- AmazonIvsManager+Framework.swift