react-native-firework-sdk 2.18.0 → 2.18.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.
@@ -3,6 +3,5 @@ package com.fireworksdk.bridge.models
3
3
  import com.fireworksdk.bridge.models.enums.FWPlayerLaunchBehavior
4
4
 
5
5
  data class FWSDKInitOptionsModel(
6
- val userId: String? = null,
7
6
  val videoLaunchBehavior: FWPlayerLaunchBehavior? = null,
8
7
  )
@@ -5,17 +5,14 @@ import org.json.JSONObject
5
5
 
6
6
  object FWSDKInitOptionsModelDeserializer {
7
7
 
8
- private const val USER_ID_KEY = "userId"
9
8
  private const val VIDEO_LAUNCH_BEHAVIOR_KEY = "videoLaunchBehavior"
10
9
 
11
10
  fun deserialize(responseJson: JSONObject?): FWSDKInitOptionsModel? {
12
11
  responseJson?: return null
13
12
 
14
- val userId = if (responseJson.has(USER_ID_KEY)) responseJson.optString(USER_ID_KEY) else null
15
13
  val videoLaunchBehavior = if (responseJson.has(VIDEO_LAUNCH_BEHAVIOR_KEY)) responseJson.optString(VIDEO_LAUNCH_BEHAVIOR_KEY) else null
16
14
 
17
15
  return FWSDKInitOptionsModel(
18
- userId = userId,
19
16
  videoLaunchBehavior = if (!videoLaunchBehavior.isNullOrBlank()) FWPlayerLaunchBehavior.deserialize(videoLaunchBehavior) else null ,
20
17
  )
21
18
  }
@@ -5,13 +5,11 @@ import org.json.JSONObject
5
5
 
6
6
  object FWSDKInitOptionsModelSerializer {
7
7
 
8
- private const val USER_ID_KEY = "userId"
9
8
  private const val VIDEO_LAUNCH_BEHAVIOR_KEY = "videoLaunchBehavior"
10
9
 
11
10
  fun serialize(model: FWSDKInitOptionsModel?): JSONObject? {
12
11
  model ?: return null
13
12
  val jsonObject = JSONObject()
14
- jsonObject.put(USER_ID_KEY, model.userId)
15
13
  jsonObject.put(VIDEO_LAUNCH_BEHAVIOR_KEY, FWPlayerLaunchBehavior.serialize(model.videoLaunchBehavior))
16
14
  return jsonObject
17
15
  }
@@ -91,11 +91,6 @@ object FWReactNativeSDK {
91
91
  .clientId(clientId)
92
92
  .enableCache(true)
93
93
 
94
- val userId = sdkInitOptions?.userId
95
- if (!userId.isNullOrBlank()) {
96
- configBuilder.userId(userId)
97
- }
98
-
99
94
  val livestreamPlayerInitializerList = FWLiveStreamUtil.livestreamPlayerInitializers()
100
95
  for (livestreamPlayerInitializer in livestreamPlayerInitializerList) {
101
96
  configBuilder.addLivestreamPlayerInitializer(livestreamPlayerInitializer)
@@ -68,10 +68,6 @@ class FireworkSDKModule(
68
68
  * This method will always return immediately and must be called on the main thread.
69
69
  * It is recommended that you initialize FW SDK when application created. FW SDK must be initialized
70
70
  * before using any of the features.
71
- *
72
- * @param config.userId an id to uniquely identify device or user. If you don't have a unique id
73
- * We will use hashed Android_ID as it is
74
- * If id passed is not unique, it will affect the quality of content recommended to the user.
75
71
  */
76
72
  @ReactMethod
77
73
  override fun init(config: ReadableMap?, promise: Promise) {
@@ -109,7 +109,7 @@ class FireworkSDKModule: RCTEventEmitter, FireworkVideoSDKDelegate {
109
109
  let initializingSDKClosure = {
110
110
  gVideoLaunchBehavior = options?.videoLaunchBehavior
111
111
 
112
- FireworkVideoSDK.initializeSDK(delegate: self, userID: options?.userId)
112
+ FireworkVideoSDK.initializeSDK(delegate: self)
113
113
  FireworkVideoSDK.ctaDelegate = self
114
114
  FireworkVideoSDK.eventTracking.videoPlaybackDelegate = self
115
115
  FireworkVideoSDK.eventTracking.feedDelegate = self
@@ -8,10 +8,8 @@ import Foundation
8
8
  import FireworkVideo
9
9
 
10
10
  public struct SDKInitOptions: Codable {
11
- public var userId: String?
12
11
  public var videoLaunchBehavior: FWRVideoLaunchBehavior?
13
- public init(userId: String? = nil, videoLaunchBehavior: FWRVideoLaunchBehavior? = nil) {
14
- self.userId = userId
12
+ public init(videoLaunchBehavior: FWRVideoLaunchBehavior? = nil) {
15
13
  self.videoLaunchBehavior = videoLaunchBehavior
16
14
  }
17
15
  }
@@ -1,9 +1,5 @@
1
1
  export type VideoLaunchBehavior = 'default' | 'muteOnFirstLaunch';
2
2
  export default interface SDKInitOptions {
3
- /**
4
- * Custom value to identify the current user.
5
- */
6
- userId?: string;
7
3
  /**
8
4
  * Behavior occurring after video is launched.
9
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SDKInitOptions.d.ts","sourceRoot":"","sources":["../../../../../src/models/SDKInitOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,mBAAmB,CAAC;AAElE,MAAM,CAAC,OAAO,WAAW,cAAc;IACrC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C"}
1
+ {"version":3,"file":"SDKInitOptions.d.ts","sourceRoot":"","sources":["../../../../../src/models/SDKInitOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,mBAAmB,CAAC;AAElE,MAAM,CAAC,OAAO,WAAW,cAAc;IACrC;;OAEG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C"}
@@ -1,9 +1,5 @@
1
1
  export type VideoLaunchBehavior = 'default' | 'muteOnFirstLaunch';
2
2
  export default interface SDKInitOptions {
3
- /**
4
- * Custom value to identify the current user.
5
- */
6
- userId?: string;
7
3
  /**
8
4
  * Behavior occurring after video is launched.
9
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SDKInitOptions.d.ts","sourceRoot":"","sources":["../../../../../src/models/SDKInitOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,mBAAmB,CAAC;AAElE,MAAM,CAAC,OAAO,WAAW,cAAc;IACrC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C"}
1
+ {"version":3,"file":"SDKInitOptions.d.ts","sourceRoot":"","sources":["../../../../../src/models/SDKInitOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,mBAAmB,CAAC;AAElE,MAAM,CAAC,OAAO,WAAW,cAAc;IACrC;;OAEG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-firework-sdk",
3
- "version": "2.18.0",
3
+ "version": "2.18.1",
4
4
  "description": "Firework React Native SDK",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -31,5 +31,5 @@ else
31
31
  s.dependency "React-Core"
32
32
  end
33
33
  s.dependency 'FireworkVideoUI', '0.2.15'
34
- s.dependency 'FireworkVideo', '1.37.1'
34
+ s.dependency 'FireworkVideo', '1.37.5'
35
35
  end
@@ -1,10 +1,6 @@
1
1
  export type VideoLaunchBehavior = 'default' | 'muteOnFirstLaunch';
2
2
 
3
3
  export default interface SDKInitOptions {
4
- /**
5
- * Custom value to identify the current user.
6
- */
7
- userId?: string;
8
4
  /**
9
5
  * Behavior occurring after video is launched.
10
6
  */