@opentok/client 2.35.0-alpha.29 → 2.35.0-alpha.30

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.
@@ -610,8 +610,12 @@ declare namespace OT {
610
610
  forceMuteAll(excludedStreams?: Stream[]): Promise<void>;
611
611
  getPublisherForStream(stream: Stream): Publisher | undefined;
612
612
  getSubscribersForStream(stream: Stream): [Subscriber];
613
- publish(publisher: Publisher, callback?: (error?: OTError) => void): Publisher;
614
- publish(targetElement: string | HTMLElement, properties?: PublisherProperties, callback?: (error?: OTError) => void): Publisher;
613
+ publish: {
614
+ (publisher: Publisher, callback?: (error?: OTError) => void): Publisher;
615
+ (targetElement: string | HTMLElement, properties?: PublisherProperties, callback?: (error?: OTError) => void): Publisher;
616
+ promise: (publisher: Publisher) => Promise<Publisher>;
617
+ promise: (targetElement: string | HTMLElement, properties?: PublisherProperties) => Promise<Publisher>;
618
+ }
615
619
  setEncryptionSecret(secret: string): Promise<void>;
616
620
  setIceConfig(iceConfig: IceConfig): Promise <void>;
617
621
 
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license OpenTok.js 2.35.0 3f6eae33e
2
+ * @license OpenTok.js 2.35.0 38e83a7fc
3
3
  *
4
4
  * Copyright (c) 2010-2026 TokBox, Inc.
5
5
  * Subject to the applicable Software Development Kit (SDK) License Agreement:
6
6
  * https://www.vonage.com/legal/communications-apis/terms-of-use/
7
7
  *
8
- * Date: Mon, 25 May 2026 08:12:51 GMT
8
+ * Date: Mon, 25 May 2026 09:48:21 GMT
9
9
  */
10
10
 
11
11
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -41923,7 +41923,7 @@ function staticConfigFactory(_temp) {
41923
41923
  _ref$axios = _ref.axios,
41924
41924
  axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
41925
41925
  _ref$properties = _ref.properties,
41926
- properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"3f6eae33e","minimumVersion":{"firefox":52,"chrome":49},"debug":false,"websiteURL":"http://www.tokbox.com","configURL":"https://config.opentok.com","ipWhitelistConfigURL":"","cdnURL":"","loggingURL":"https://hlg.tokbox.com/prod","apiURL":"https://anvil.opentok.com","vonageApiURL":""} : _ref$properties;
41926
+ properties = _ref$properties === void 0 ? {"version":"v2.35.0","buildHash":"38e83a7fc","minimumVersion":{"firefox":52,"chrome":49},"debug":false,"websiteURL":"http://www.tokbox.com","configURL":"https://config.opentok.com","ipWhitelistConfigURL":"","cdnURL":"","loggingURL":"https://hlg.tokbox.com/prod","apiURL":"https://anvil.opentok.com","vonageApiURL":""} : _ref$properties;
41927
41927
  /** @type builtInConfig */
41928
41928
  const builtInConfig = (0, _cloneDeep.default)(properties);
41929
41929
  /**
@@ -70916,6 +70916,25 @@ function SessionFactory(deps) {
70916
70916
  return publisher;
70917
70917
  };
70918
70918
 
70919
+ /**
70920
+ * Promisified version of {@link Session#publish}.
70921
+ * Instead of passing a completion handler, await the returned Promise.
70922
+ *
70923
+ * @example
70924
+ * const publisher = await session.publish.promise(publisher);
70925
+ * // or, passing properties when letting the SDK init the publisher:
70926
+ * const publisher = await session.publish.promise('publisherElementId', properties);
70927
+ */
70928
+ this.publish.promise = (publisher, properties) => new Promise((resolve, reject) => {
70929
+ this.publish(publisher, properties, (err, pub) => {
70930
+ if (err) {
70931
+ reject(err);
70932
+ } else {
70933
+ resolve(pub);
70934
+ }
70935
+ });
70936
+ });
70937
+
70919
70938
  /**
70920
70939
  * Ceases publishing the specified publisher's audio-video stream
70921
70940
  * to the session. By default, the local representation of the audio-video stream is