Skip to content

Commit

Permalink
1.6.2 update (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayk-zoom authored Mar 3, 2023
1 parent 86d2e9d commit 93fb2b9
Show file tree
Hide file tree
Showing 27 changed files with 263 additions and 40 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
## CHANGELOG
## v1.6.2
### Added
* Support for optimizing screen share for video clips
* With `optimizedForSharedVideo` option in `stream.startShareScreen` method, `stream.enableOptimizeForSharedVideo(true)`, and `stream.updateSharedVideoQuality(quality)` methods to optimize the experience of sharing video clips
* “Sharing” statistic data
* With `stream.subscribeShareStatisticData()` and the `share-statistic-data-change` event, you can get the statistic metrics of sharing, such as 'latency', 'resolution', 'fps', etc.
* Virtual background support for Chromium-like browsers without SharedArrayBuffer
* With `enforceVirtualBackground` option in the `client.init` method to enable the feature; note that this may result in high CPU and memory usage on low-performance devices.

### Enhanced
* `user_identity` support, which is now also returned as a `participant` attribute
* Timing of the Promise resolve call returned by the `stream.startAudio` method

### Fixed
* An issue where command channel messages could not be properly decrypted between main session and subsessions
* An edge case that could sometimes cause others’ videos to not show properly

## v1.6.0
### Added
* Pan-Tilt-Zoom (PTZ) camera control and far end camera control: With `stream.requestFarEndCameraControl()` and `stream.approveFarEndCameraControl()` and `stream.controlFarEndCamera` methods and several related events, now you can control the far end camera.
Expand Down
2 changes: 1 addition & 1 deletion dist/index.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lib/audio_simd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lib/js_audio_process.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lib/js_media.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/lib/sharing_m.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/lib/sharing_mtsimd.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib/sharing_s.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib/sharing_simd.min.js

Large diffs are not rendered by default.

Binary file modified dist/lib/video.decode.wasm
Binary file not shown.
Binary file modified dist/lib/video.mt.wasm
Binary file not shown.
Binary file modified dist/lib/video.mtsimd.wasm
Binary file not shown.
Binary file modified dist/lib/video.simd.wasm
Binary file not shown.
6 changes: 3 additions & 3 deletions dist/lib/video_m.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/lib/video_mtsimd.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib/video_s.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/lib/video_share_mtsimd.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/lib/video_simd.min.js

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions dist/types/common.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,17 @@ export type ErrorTypes =
| 'IMPROPER_MEETING_STATE'
| 'INVALID_PARAMETERS'
| 'OPRATION_LOCKED';
/**
* Failure reason for async operation
*/
interface ExecutedFailure {
/**
* type
*/
type: ErrorTypes;
/**
* reason
*/
reason: string;
}
/**
Expand Down Expand Up @@ -346,3 +355,69 @@ export enum FarEndCameraControlDeclinedReason {
*/
Stop = 5,
}
/**
* Log level
*/
type LogLevelLabel = 'debug' | 'log' | 'info' | 'print' | 'warn' | 'error';
/**
* Log level object
*/
export type LogLevelDetail = {
/**
* debug
*/
debug: boolean;
/**
* log
*/
log: boolean;
/**
* info
*/
info: boolean;
/**
* print
*/
print: boolean;
/**
* warn
*/
warn: boolean;
/**
* error
*/
error: boolean;
};
/**
* Logger init option
*/
export interface LoggerInitOption {
/**
* Whether logger is enabled
*/
enable?: boolean;
/**
* whether is enable to report log
*/
enableReport?: boolean;
/**
* Whether is in debug mode, in this mode,the log will print to console
*/
debugMode?: boolean;
/**
* The report url
*/
reportUrl?: string;
/**
* Log level
*/
logLevel?: LogLevelLabel | LogLevelDetail;
/**
* The AES encrypt key for encrypting when the logs are cached in local,the key must be 128-bits, 192-bits, or 256-bits in length.
*/
encryptKeys?: string | Array<string>;
/**
* The external tracking id
*/
trackingId?: string;
}
36 changes: 36 additions & 0 deletions dist/types/event-callback.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1175,3 +1175,39 @@ export declare function event_network_quality_change(payload: {
*/
level: number;
}): void;
/**
* Occurs when decode (recevied) or encode (sent) the share statistics data is changed
* @param payload the event detail
* - `data`
* - `encoding`: if encoding is true, means that the data is encoding video data statisitics.
* - `avg_loss`: average package loss for video
* - `jitter`: jitter for video
* - `max_loss`: max package loss for video
* - `rtt`: round trip time for video .
* - `sample_rate`: sample rate video
* - `width`: width for video
* - `height`: height for video
* - `fps`: fps for video
* - `type` : string share
*
* ```javascript
* client.on('share_statistic_data_change', (payload) => {
* console.log('emit', payload);
* });
* ```
* @event
*/
export declare function event_share_statistic_data_change(payload: {
data: {
avg_loss: number;
encoding: boolean;
jitter: number;
max_loss: number;
rtt: number;
sample_rate: number;
width: number;
height: number;
fps: number;
};
type: string;
}): void;
83 changes: 75 additions & 8 deletions dist/types/media.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ export interface AudioQosData {
max_loss: number;
}
/**
* Audio statistic option interface.
* Statistic option interface.
*/
interface AudioStatisticOption {
interface StatisticOption {
/**
* Subscribe or unsubscribe to encoding data (sending audio).
* Subscribe or unsubscribe to encoding data (sending ).
*/
encode?: boolean;
/**
* Subscribe or unsubscribe to decoding data (receiving audio).
* Subscribe or unsubscribe to decoding data (receiving).
*/
decode?: boolean;
}
Expand Down Expand Up @@ -198,6 +198,15 @@ export interface ScreenShareOption {
* The capture height of share video, only enabled when the value of `secondaryCameraId` is not undefined.
*/
captureHeight?: number;
/**
* Option to show (default, false) or hide (true) the "Share Audio" checkbox when sharing a Chrome tab
*/
hideShareAudioOption?: boolean;
/**
* optimized for video share
* If sharing a video file that is stored locally on the computer, we recommend using the video share feature, which will provide better quality due to decreased CPU usage.
*/
optimizedForSharedVideo?: boolean;
}
/**
* Share audio status interface.
Expand Down Expand Up @@ -617,7 +626,7 @@ export declare namespace Stream {
*
* @category Audio
*/
function subscribeAudioStatisticData(type?: AudioStatisticOption): ExecutedResult;
function subscribeAudioStatisticData(type?: StatisticOption): ExecutedResult;
/**
* Unsubscribes to audio statistic data based on the type parameter.
*
Expand All @@ -639,9 +648,7 @@ export declare namespace Stream {
*
* @category Audio
*/
function unsubscribeAudioStatisticData(
type?: AudioStatisticOption,
): ExecutedResult;
function unsubscribeAudioStatisticData(type?: StatisticOption): ExecutedResult;

/**
* Mutes someone's audio locally. This operation doesn't affect other participants' audio.
Expand Down Expand Up @@ -1380,6 +1387,44 @@ export declare namespace Stream {
* @category Screen Share
*/
function stopShareToSubsession(): ExecutedResult;
/**
* Enable/disable optimized for video share
* @param enable boolean
* @returns executed promise.
* @category Screen Share
*/
function enableOptimizeForSharedVideo(enable: boolean): ExecutedResult;
/**
* Update the share quality when video share enabled
* Note: high resolution will lead to low fps
* @param quality quality
* @returns executed promise.
* @category Screen Share
*/
function updateSharedVideoQuality(quality: VideoQuality): ExecutedResult;
/**
* Subscribe share statistic data base on the type parameter.
* Client will receive video quality data every second.
* @param type optional. Object { encode: Boolean, decode: Boolean }, Can specify which type of audio should be subscribe.
*
* @returns
* - `''`: Success.
* - `Error`: Failure. Details in {@link ErrorTypes}.
*
* @category Screen Share
*/
function subscribeShareStatisticData(type?: StatisticOption): ExecutedResult;
/**
* Unsubscribe video statistic data base on the type parameter.
* @param type optional. Object { encode: Boolean, decode: Boolean }, Can specify which type of audio should be unsubscribe.
*
* @returns
* - `''`: Success.
* - `Error`: Failure. Details in {@link ErrorTypes}.
*
* @category Video
*/
function unsubscribeShareStatisticData(type?: StatisticOption): ExecutedResult;
/**
* Determines whether the host locked the share.
* @returns Whether screen share is locked.
Expand Down Expand Up @@ -1416,6 +1461,27 @@ export declare namespace Stream {
* @category Screen Share
*/
function isStartShareScreenWithVideoElement(): boolean;
/**
* Whether is video share enabled
* @returns
* @category Screen Share
*/
function isOptimizeForSharedVideoEnabled(): boolean;
/**
* Whether current platform supports video share
* @returns
* @category Screen Share
*/
function isSupportOptimizedForSharedVideo(): boolean;
/**
* Get the share statistic data
* @returns data of video statistic.{@link VideoQosData}
* @category Screen Share
*/
function getShareStatisticData(): {
encode?: VideoQosData;
decode?: VideoQosData;
};

// -------------------------------------------------[camera]-----------------------------------------------------------

Expand Down Expand Up @@ -1532,6 +1598,7 @@ export declare namespace Stream {
function getCameraPTZCapability(cameraId?: string): PTZCameraCapability;
/**
* Determined whether current browser support PTZ function
* @category Camera
*/
function isBrowserSupportPTZ(): boolean;
/**
Expand Down
3 changes: 3 additions & 0 deletions dist/types/preview.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ interface TestMicrophoneOption {
*/
onStopPlayRecording?: () => void;
}
/**
* Interface for the test microphone return.
*/
interface TestMicrophoneReturn {
/**
* Stop the tester.
Expand Down
3 changes: 2 additions & 1 deletion dist/types/subsession.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ export declare namespace SubsessionClient {
*
* @param subsessions Subsession list required. Must include subsession ID and name.
* @param options Subsession option; Default options =
* ```{
* ```javascript
* {
* isAutoJoinSubsession: false,
* isBackToMainSessionEnabled: true,
* isTimerEnabled: false,
Expand Down
26 changes: 25 additions & 1 deletion dist/types/videoclient.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { ExecutedResult, Participant } from './common';
import { ExecutedResult, LoggerInitOption, Participant } from './common';
import { Stream } from './media';
import { ChatClient } from './chat';
import { CommandChannel } from './command';
import { RecordingClient } from './recording';
import { SubsessionClient } from './subsession';
import { LiveTranscriptionClient } from './live-transcription';
import { LoggerClient } from './logger';
import {
event_connection_change,
event_user_add,
Expand Down Expand Up @@ -57,6 +58,7 @@ import {
event_far_end_camera_in_control_change,
event_far_end_camera_capability_change,
event_network_quality_change,
event_share_statistic_data_change,
} from './event-callback';

/**
Expand Down Expand Up @@ -118,6 +120,14 @@ interface InitOptions {
* Note that this may result in high CPU and memory usage.
*/
enforceMultipleVideos?: boolean;
/**
* optional
* Enforce virtual background on Chromium-like browser without SharedArrayBuffer.
* Note
* - This may result in high CPU and memory usage.
* - Use CanvasElement to render the self video.
*/
enforceVirtualBackground?: boolean;
/**
* optional
* Do not load dependent assets. Used to address specific edge-cases, please do not use for almost all use-cases.
Expand Down Expand Up @@ -584,6 +594,15 @@ export declare namespace VideoClient {
event: 'network-quality-change',
listener: typeof event_network_quality_change,
): void;
/**
*
* @param event
* @param listener Details in {@link event_share_statistic_data_change}
*/
function on(
event: 'share-statistic-data-change',
listener: typeof event_share_statistic_data_change,
): void;

/**
* Remove the event handler.
Expand Down Expand Up @@ -696,6 +715,11 @@ export declare namespace VideoClient {
* Get LiveTranscription client
*/
function getLiveTranscriptionClient(): typeof LiveTranscriptionClient;
/**
* Get logger client
* @param options logger option
*/
function getLoggerClient(options?: LoggerInitOption): typeof LoggerClient;
/**
* Gets the current session’s information.
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zoom/videosdk",
"version": "1.6.0",
"version": "1.6.2",
"description": "Zoom Web Video SDK",
"main": "dist/index.js",
"module": "dist/index.esm.js",
Expand Down

0 comments on commit 93fb2b9

Please sign in to comment.