Skip to content

Commit

Permalink
Production release PR
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 authored Dec 1, 2023
2 parents 2c178ad + b556641 commit 7221b6b
Show file tree
Hide file tree
Showing 63 changed files with 1,178 additions and 734 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '17.x'
node-version: '16'
- run: |
cd playwright
yarn install
Expand Down
4 changes: 2 additions & 2 deletions apps/100ms-custom-app/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions apps/100ms-web/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/hls-player/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/hls-stats/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/hms-noise-suppression/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/hms-video-store/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/hms-video-store/src/core/IHMSActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
HMSConfig,
HMSLogLevel,
HMSMidCallPreviewConfig,
HMSPlaylistSettings,
HMSPluginSupportResult,
HMSPreferredSimulcastLayer,
HMSPreviewConfig,
Expand Down Expand Up @@ -514,4 +515,9 @@ export interface IHMSActions<T extends HMSGenericTypes = { sessionStore: Record<
lowerRemotePeerHand(peerId: string): Promise<void>;

getPeerListIterator(options?: HMSPeerListIteratorOptions): HMSPeerListIterator;
/**
* Method to override the default settings for playlist tracks
* @param {HMSPlaylistSettings} settings
*/
setPlaylistSettings(settings: HMSPlaylistSettings): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ export class HMSSDKActions<T extends HMSGenericTypes = { sessionStore: Record<st
this.interactivityCenter = new HMSInteractivityCenter(this.sdk);
// this.actionBatcher = new ActionBatcher(store);
}
setPlaylistSettings(settings: sdkTypes.HMSPlaylistSettings): void {
this.sdk.updatePlaylistSettings(settings);
}

async refreshDevices() {
await this.sdk.refreshDevices();
Expand Down
2 changes: 2 additions & 0 deletions packages/hms-video-store/src/core/hmsSDKStore/sdkTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
HMSPlaylistItem,
HMSPlaylistManager,
HMSPlaylistProgressEvent,
HMSPlaylistSettings,
HMSPoll,
HMSPollCreateParams,
HMSPollQuestionAnswer,
Expand Down Expand Up @@ -97,6 +98,7 @@ export type {
HMSDeviceChangeEvent,
HMSPlaylistItem,
HMSPlaylistManager,
HMSPlaylistSettings,
HMSPlaylistProgressEvent,
RTMPRecordingConfig,
HMSRecording,
Expand Down
9 changes: 9 additions & 0 deletions packages/hms-video-store/src/core/selectors/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,15 @@ export const selectHMSMessages = createSelector(selectMessageIDsInOrder, selectM
return messages;
});

export const selectHMSBroadcastMessages = createSelector(selectHMSMessages, messages => {
return messages.filter(m => !m.recipientPeer && !(m.recipientRoles && m.recipientRoles?.length > 0));
});
/**
* Select the number of unread broadcast messages
*/
export const selectUnreadHMSBroadcastMessagesCount = createSelector(selectHMSBroadcastMessages, messages => {
return messages.filter(m => !m.read).length;
});
/**
* Select the current state of the room.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/hms-video-web/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/hms-video-web/src/interfaces/hms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { HLSConfig } from './hls-config';
import { HMSMessage } from './message';
import { HMSLocalPeer, HMSPeer } from './peer';
import { HMSPeerListIteratorOptions } from './peer-list-iterator';
import { HMSPlaylistManager } from './playlist';
import { HMSPlaylistManager, HMSPlaylistSettings } from './playlist';
import { HMSPreviewListener } from './preview-listener';
import { HMSRole } from './role';
import { HMSRoleChangeRequest } from './role-change-request';
Expand Down Expand Up @@ -99,4 +99,6 @@ export interface HMSInterface {
lowerRemotePeerHand(peerId: string): Promise<void>;

getPeerListIterator(options?: HMSPeerListIteratorOptions): HMSPeerListIterator;

updatePlaylistSettings(options: HMSPlaylistSettings): void;
}
9 changes: 9 additions & 0 deletions packages/hms-video-web/src/interfaces/playlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,12 @@ export interface HMSPlaylistManager {
*/
setPlaybackRate(type: HMSPlaylistType, value: number): void;
}

export interface HMSPlaylistSettings {
video: {
bitrate: number;
};
audio: {
bitrate: number;
};
}
28 changes: 25 additions & 3 deletions packages/hms-video-web/src/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
HMSDeviceChangeEvent,
HMSFrameworkInfo,
HMSMessageInput,
HMSPlaylistSettings,
HMSPlaylistType,
HMSPreviewConfig,
HMSRole,
Expand Down Expand Up @@ -65,7 +66,11 @@ import { InitConfig } from '../signal/init/models';
import HMSTransport from '../transport';
import ITransportObserver from '../transport/ITransportObserver';
import { TransportState } from '../transport/models/TransportState';
import { HAND_RAISE_GROUP_NAME } from '../utils/constants';
import {
DEFAULT_PLAYLIST_AUDIO_BITRATE,
DEFAULT_PLAYLIST_VIDEO_BITRATE,
HAND_RAISE_GROUP_NAME,
} from '../utils/constants';
import { fetchWithRetry } from '../utils/fetch';
import decodeJWT from '../utils/jwt';
import HMSLogger, { HMSLogLevel } from '../utils/logger';
Expand Down Expand Up @@ -109,6 +114,14 @@ export class HMSSdk implements HMSInterface {
private interactivityCenter!: InteractivityCenter;
private sdkState = { ...INITIAL_STATE };
private frameworkInfo?: HMSFrameworkInfo;
private playlistSettings: HMSPlaylistSettings = {
video: {
bitrate: DEFAULT_PLAYLIST_VIDEO_BITRATE,
},
audio: {
bitrate: DEFAULT_PLAYLIST_AUDIO_BITRATE,
},
};

private initNotificationManager() {
if (!this.notificationManager) {
Expand Down Expand Up @@ -224,6 +237,15 @@ export class HMSSdk implements HMSInterface {
return new HMSPeerListIterator(this.transport, this.store, options);
}

updatePlaylistSettings(options: HMSPlaylistSettings) {
if (options.video) {
Object.assign(this.playlistSettings.video, options.video);
}
if (options.audio) {
Object.assign(this.playlistSettings.audio, options.audio);
}
}

private handleAutoplayError = (error: HMSException) => {
this.errorListener?.onError?.(error);
};
Expand Down Expand Up @@ -1151,9 +1173,9 @@ export class HMSSdk implements HMSInterface {
if (source === 'videoplaylist') {
const settings: { maxBitrate?: number; width?: number; height?: number } = {};
if (track.kind === 'audio') {
settings.maxBitrate = 64;
settings.maxBitrate = this.playlistSettings.audio?.bitrate || DEFAULT_PLAYLIST_AUDIO_BITRATE;
} else {
settings.maxBitrate = 1000;
settings.maxBitrate = this.playlistSettings.video?.bitrate || DEFAULT_PLAYLIST_VIDEO_BITRATE;
const { width, height } = track.getSettings();
settings.width = width;
settings.height = height;
Expand Down
4 changes: 4 additions & 0 deletions packages/hms-video-web/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ export const PROTOCOL_VERSION = '2.5';
export const PROTOCOL_SPEC = '20231020';

export const HAND_RAISE_GROUP_NAME = '_handraise';

export const DEFAULT_PLAYLIST_VIDEO_BITRATE = 1000;

export const DEFAULT_PLAYLIST_AUDIO_BITRATE = 64;
6 changes: 3 additions & 3 deletions packages/hms-virtual-background/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/react-icons/assets/PersonIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions packages/react-icons/assets/ReplyIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions packages/react-icons/assets/UnpinIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/react-icons/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/react-icons/src/PersonIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react';
import { SVGProps } from 'react';
const SvgPersonIcon = (props: SVGProps<SVGSVGElement>) => (
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<svg width="24px" height="24px" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M12 2.813a4.687 4.687 0 1 0 0 9.374 4.687 4.687 0 0 0 0-9.374ZM9.746 5.245a3.188 3.188 0 1 1 4.508 4.508 3.188 3.188 0 0 1-4.508-4.508ZM8.012 16.45a5.64 5.64 0 0 1 9.628 3.988.75.75 0 0 0 1.5 0 7.14 7.14 0 0 0-14.28 0 .75.75 0 0 0 1.5 0 5.64 5.64 0 0 1 1.652-3.988Z"
d="M6.533 5.333a1.6 1.6 0 1 1 3.2 0 1.6 1.6 0 0 1-3.2 0Zm1.6-2.666a2.667 2.667 0 1 0 0 5.333 2.667 2.667 0 0 0 0-5.333ZM6 9.067a2.667 2.667 0 0 0-2.667 2.666V12.8a.533.533 0 1 0 1.067 0v-1.067a1.6 1.6 0 0 1 1.6-1.6h4.267a1.6 1.6 0 0 1 1.6 1.6V12.8a.533.533 0 1 0 1.066 0v-1.067a2.667 2.667 0 0 0-2.666-2.666H6Z"
fill="currentColor"
/>
</svg>
Expand Down
21 changes: 21 additions & 0 deletions packages/react-icons/src/ReplyIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react';
import { SVGProps } from 'react';
const SvgReplyIcon = (props: SVGProps<SVGSVGElement>) => (
<svg width="24px" height="24px" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
d="M8.385 11.77 5 8.386 8.385 5"
stroke="currentColor"
strokeWidth={1.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M5 8.385h7.11a3.724 3.724 0 0 1 0 7.448H9.74"
stroke="currentColor"
strokeWidth={1.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
export default SvgReplyIcon;
14 changes: 14 additions & 0 deletions packages/react-icons/src/UnpinIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as React from 'react';
import { SVGProps } from 'react';
const SvgUnpinIcon = (props: SVGProps<SVGSVGElement>) => (
<svg width="24px" height="24px" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
d="M1.333 1.333 15.5 15.5M8.417 11.958V15.5M6.292 6.292v1.246a1.417 1.417 0 0 1-.787 1.268l-1.26.638a1.417 1.417 0 0 0-.787 1.267v1.247h8.5M10.542 6.532V4.167h.708a1.416 1.416 0 1 0 0-2.834H5.505"
stroke="currentColor"
strokeWidth={1.5}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
export default SvgUnpinIcon;
2 changes: 2 additions & 0 deletions packages/react-icons/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export { default as RefreshIcon } from './RefreshIcon';
export { default as RejectIcon } from './RejectIcon';
export { default as RemoveUserIcon } from './RemoveUserIcon';
export { default as RepeatIcon } from './RepeatIcon';
export { default as ReplyIcon } from './ReplyIcon';
export { default as ReportIcon } from './ReportIcon';
export { default as RestApiIcon } from './RestApiIcon';
export { default as RocketIcon } from './RocketIcon';
Expand Down Expand Up @@ -241,6 +242,7 @@ export { default as ThumbsUpIcon } from './ThumbsUpIcon';
export { default as TranscriptIcon } from './TranscriptIcon';
export { default as TrashIcon } from './TrashIcon';
export { default as TwitterIcon } from './TwitterIcon';
export { default as UnpinIcon } from './UnpinIcon';
export { default as UploadIcon } from './UploadIcon';
export { default as VerifiedIcon } from './VerifiedIcon';
export { default as VerticalMenuIcon } from './VerticalMenuIcon';
Expand Down
Loading

2 comments on commit 7221b6b

@vercel
Copy link

@vercel vercel bot commented on 7221b6b Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 7221b6b Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

storybook-app – ./packages/roomkit-react

storybook-app-100mslive.vercel.app
storybook-app-five.vercel.app
storybook-app-git-production-100mslive.vercel.app
ui.100ms.live

Please sign in to comment.