playkit-sdk 1.2.8-beta.3 → 1.2.8-beta.4

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * playkit-sdk v1.2.8-beta.3
2
+ * playkit-sdk v1.2.8-beta.4
3
3
  * PlayKit SDK for JavaScript
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  */
@@ -6152,6 +6152,7 @@ class PlayKitSDK extends EventEmitter {
6152
6152
  this.playerClient.on('balance_updated', (credits) => this.emit('balance_updated', credits));
6153
6153
  this.playerClient.on('player_info_updated', (info) => this.emit('player_info_updated', info));
6154
6154
  this.playerClient.on('daily_credits_refreshed', (result) => this.emit('daily_credits_refreshed', result));
6155
+ this.playerClient.on('nickname_changed', (nickname) => this.emit('nickname_changed', nickname));
6155
6156
  }
6156
6157
  /**
6157
6158
  * Initialize the SDK
@@ -6443,6 +6444,25 @@ class PlayKitSDK extends EventEmitter {
6443
6444
  return playerInfo.credits;
6444
6445
  }
6445
6446
  // ============================================================
6447
+ // Player Profile Methods
6448
+ // ============================================================
6449
+ /**
6450
+ * Get player's nickname (cached)
6451
+ * @returns Nickname or null if not set
6452
+ */
6453
+ getNickname() {
6454
+ return this.playerClient.getNickname();
6455
+ }
6456
+ /**
6457
+ * Set player's nickname for the current game
6458
+ * @param nickname - 1-16 characters (letters, numbers, Chinese, underscores, spaces)
6459
+ * @returns SetNicknameResponse with success status and gameId
6460
+ * @throws PlayKitError if validation fails or token type is invalid
6461
+ */
6462
+ async setNickname(nickname) {
6463
+ return await this.playerClient.setNickname(nickname);
6464
+ }
6465
+ // ============================================================
6446
6466
  // Headless Device Auth Methods (for terminal/CLI environments)
6447
6467
  // ============================================================
6448
6468
  /**