├── .base-branch ├── .changelog-watchlist ├── .eslintignore ├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.yaml │ ├── community-request-template.md │ └── documentation-request.md ├── PULL_REQUEST_TEMPLATE.md ├── actions │ └── setup-integration-test │ │ ├── README.md │ │ └── action.yml ├── script │ ├── backward-compatibility-run-check.js │ ├── call-canary-deploy-demo-prod │ ├── get-current-version │ ├── get-demo-browser-current-version │ ├── get-npm-tag.js │ ├── get-pre-release-name.js │ ├── get-prev-version │ ├── send-prerun-script-pr-reminder.js │ └── send-test-report.js ├── stale.yml └── workflows │ ├── browser-compatibility-test-previous-major-version.yml │ ├── browser-compatibility-test.yml │ ├── continuous-integration.yml │ ├── dependabot.yaml │ ├── deploy.yml │ ├── prev-version-integration.yaml │ ├── publish.yml │ ├── release-backwards-compatiblity.yml │ └── webview-ui-test.yml ├── .gitignore ├── .integration-watchlist ├── CHANGELOG.md ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── NOTICE ├── README.md ├── config ├── eslintrc.json ├── imports.test.ts ├── tsconfig.base.json ├── tsconfig.import.json └── tsconfig.json ├── demos ├── browser │ ├── .gitignore │ ├── README.md │ ├── app │ │ ├── meetingReadinessChecker │ │ │ ├── meetingReadinessChecker.html │ │ │ └── meetingReadinessChecker.ts │ │ ├── meetingV2 │ │ │ ├── audio │ │ │ │ └── TestSound.ts │ │ │ ├── component │ │ │ │ ├── ContentShareManager.ts │ │ │ │ └── Roster.ts │ │ │ ├── meetingV2.html │ │ │ ├── meetingV2.ts │ │ │ ├── styleV2.scss │ │ │ ├── util │ │ │ │ ├── BackgroundImage.ts │ │ │ │ ├── MeetingLogger.ts │ │ │ │ ├── MeetingToast.ts │ │ │ │ └── mediastreamprovider │ │ │ │ │ ├── DemoMediaStreamProviders.ts │ │ │ │ │ └── MediaStreamProvider.ts │ │ │ └── video │ │ │ │ ├── PaginationManager.ts │ │ │ │ ├── RemoteVideoManager.ts │ │ │ │ ├── SyntheticVideoDeviceFactory.ts │ │ │ │ ├── VideoTile.ts │ │ │ │ ├── VideoTileCollection.ts │ │ │ │ └── filters │ │ │ │ ├── CircularCut.ts │ │ │ │ ├── EmojifyVideoFrameProcessor.ts │ │ │ │ ├── MediaPipeBodySegmentationProcessor.ts │ │ │ │ └── ResizeProcessor.ts │ │ └── messagingSession │ │ │ ├── messagingSession.html │ │ │ └── messagingSession.ts │ ├── audio │ │ ├── REFERENCES.md │ │ ├── speech.mp3 │ │ └── speech_stereo.mp3 │ ├── image │ │ ├── beach.jpg │ │ └── license.html │ ├── package-lock.json │ ├── package.json │ ├── script │ │ ├── copy-assets.js │ │ └── webpack-wrapper.js │ ├── serve.js │ ├── server.js │ ├── style.scss │ ├── tsconfig.json │ ├── webpack.config.hot.js │ └── webpack.config.js └── serverless │ ├── .gitignore │ ├── README.md │ ├── deploy.js │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── handlers.js │ ├── package-lock.json │ └── package.json │ └── template.yaml ├── docs ├── assets │ ├── css │ │ └── main.css │ ├── images │ │ ├── icons.png │ │ ├── icons@2x.png │ │ ├── widgets.png │ │ └── widgets@2x.png │ └── js │ │ ├── main.js │ │ └── search.js ├── classes │ ├── allhighestvideobandwidthpolicy.html │ ├── applicationmetadata.html │ ├── asyncscheduler.html │ ├── attachmediainputtask.html │ ├── attendee.html │ ├── audioprofile.html │ ├── audiovideocontrollerstate.html │ ├── backgroundblurvideoframeprocessor.html │ ├── backgroundfiltervideoframeprocessor.html │ ├── backgroundreplacementvideoframeprocessor.html │ ├── baseconnectionhealthpolicy.html │ ├── basetask.html │ ├── bitrateparameters.html │ ├── canvasvideoframebuffer.html │ ├── cleanrestartedsessiontask.html │ ├── cleanstoppedsessiontask.html │ ├── clientmetricreport.html │ ├── clientvideostreamreceivingreport.html │ ├── connectionhealthdata.html │ ├── connectionhealthpolicyconfiguration.html │ ├── consolelogger.html │ ├── contentsharemediastreambroker.html │ ├── createpeerconnectiontask.html │ ├── createsdptask.html │ ├── cspmonitor.html │ ├── datamessage.html │ ├── defaultactivespeakerdetector.html │ ├── defaultactivespeakerpolicy.html │ ├── defaultaudiomixcontroller.html │ ├── defaultaudiovideocontroller.html │ ├── defaultaudiovideofacade.html │ ├── defaultbrowserbehavior.html │ ├── defaultcontentsharecontroller.html │ ├── defaultdevicecontroller.html │ ├── defaultdevicepixelratiomonitor.html │ ├── defaulteventcontroller.html │ ├── defaultmediadevicefactory.html │ ├── defaultmeetingeventreporter.html │ ├── defaultmeetingreadinesschecker.html │ ├── defaultmeetingsession.html │ ├── defaultmessagingsession.html │ ├── defaultmodality.html │ ├── defaultpingpong.html │ ├── defaultrealtimecontroller.html │ ├── defaultreconnectcontroller.html │ ├── defaultsessionstatecontroller.html │ ├── defaultsignalingclient.html │ ├── defaultsigv4.html │ ├── defaultsimulcastuplinkpolicy.html │ ├── defaultsimulcastuplinkpolicyforcontentshare.html │ ├── defaulttransceivercontroller.html │ ├── defaulttranscriptioncontroller.html │ ├── defaultuseragentparser.html │ ├── defaultvideocaptureandencodeparameter.html │ ├── defaultvideoelementresolutionmonitor.html │ ├── defaultvideoframeprocessorpipeline.html │ ├── defaultvideoframeprocessortimer.html │ ├── defaultvideostreamidset.html │ ├── defaultvideostreamindex.html │ ├── defaultvideotile.html │ ├── defaultvideotilecontroller.html │ ├── defaultvideotilefactory.html │ ├── defaultvideotransformdevice.html │ ├── defaultvolumeindicatoradapter.html │ ├── defaultwebsocketadapter.html │ ├── devicepixelratiowindowsource.html │ ├── deviceselection.html │ ├── eventbufferconfiguration.html │ ├── eventingestionconfiguration.html │ ├── finishgatheringicecandidatestask.html │ ├── fulljitterbackoff.html │ ├── fulljitterbackofffactory.html │ ├── fulljitterlimitedbackoff.html │ ├── getusermediaerror.html │ ├── globalmetricreport.html │ ├── inmemoryjsoneventbuffer.html │ ├── intervalscheduler.html │ ├── joinandreceiveindextask.html │ ├── leaveandreceiveleaveacktask.html │ ├── listenforvolumeindicatorstask.html │ ├── log.html │ ├── maybe.html │ ├── mediadeviceproxyhandler.html │ ├── meetingeventsclientconfiguration.html │ ├── meetingfeatures.html │ ├── meetingreadinesscheckerconfiguration.html │ ├── meetingsessionconfiguration.html │ ├── meetingsessioncredentials.html │ ├── meetingsessionstatus.html │ ├── meetingsessionturncredentials.html │ ├── meetingsessionurls.html │ ├── meetingsessionvideoavailability.html │ ├── message.html │ ├── messagingsessionconfiguration.html │ ├── modelspecbuilder.html │ ├── monitortask.html │ ├── multilogger.html │ ├── mutablevideopreferences.html │ ├── none.html │ ├── noopaudiovideocontroller.html │ ├── noopdebuglogger.html │ ├── noopdevicecontroller.html │ ├── noopeventreporter.html │ ├── nooplogger.html │ ├── noopmediastreambroker.html │ ├── nooptask.html │ ├── noopvideoelementfactory.html │ ├── noopvideoframeprocessor.html │ ├── notfounderror.html │ ├── notreadableerror.html │ ├── novideodownlinkbandwidthpolicy.html │ ├── novideouplinkbandwidthpolicy.html │ ├── nscalevideouplinkbandwidthpolicy.html │ ├── oncetask.html │ ├── opensignalingconnectiontask.html │ ├── overconstrainederror.html │ ├── parallelgrouptask.html │ ├── permissiondeniederror.html │ ├── postlogger.html │ ├── promisequeue.html │ ├── promotetoprimarymeetingtask.html │ ├── realtimeattendeepositioninframe.html │ ├── realtimestate.html │ ├── realtimevolumeindicator.html │ ├── receiveaudioinputtask.html │ ├── receiveremotevideopauseresumetask.html │ ├── receivevideoinputtask.html │ ├── receivevideostreamindextask.html │ ├── reconnectionhealthpolicy.html │ ├── redundantaudioencoder.html │ ├── redundantaudiorecoverymetricreport.html │ ├── runnabletask.html │ ├── sdp.html │ ├── sdpmediasection.html │ ├── sendandreceivedatamessagestask.html │ ├── sendingaudiofailureconnectionhealthpolicy.html │ ├── serialgrouptask.html │ ├── setlocaldescriptiontask.html │ ├── setremotedescriptiontask.html │ ├── signalingandmetricsconnectionmonitor.html │ ├── signalingclientconnectionrequest.html │ ├── signalingclientevent.html │ ├── signalingclientjoin.html │ ├── signalingclientsubscribe.html │ ├── signalingclientvideosubscriptionconfiguration.html │ ├── simulcastcontentsharetransceivercontroller.html │ ├── simulcasttransceivercontroller.html │ ├── simulcastvideostreamindex.html │ ├── singlenodeaudiotransformdevice.html │ ├── some.html │ ├── streammetricreport.html │ ├── subscribeandreceivesubscribeacktask.html │ ├── timeoutscheduler.html │ ├── timeouttask.html │ ├── transcript.html │ ├── transcriptalternative.html │ ├── transcriptentity.html │ ├── transcriptionstatus.html │ ├── transcriptitem.html │ ├── transcriptlanguagewithscore.html │ ├── transcriptresult.html │ ├── typeerror.html │ ├── unusableaudiowarningconnectionhealthpolicy.html │ ├── versioning.html │ ├── videoadaptiveprobepolicy.html │ ├── videocodeccapability.html │ ├── videoencodingconcurrentsendershealthpolicy.html │ ├── videoencodingcpuconnectionhealthpolicy.html │ ├── videoencodingframerateconnectionhealthpolicy.html │ ├── videofxprocessor.html │ ├── videoonlytransceivercontroller.html │ ├── videopreference.html │ ├── videopreferences.html │ ├── videoprioritybasedpolicy.html │ ├── videoprioritybasedpolicyconfig.html │ ├── videoqualitysettings.html │ ├── videosource.html │ ├── videostreamdescription.html │ ├── videotilestate.html │ ├── voicefocusdevicetransformer.html │ ├── voicefocustransformdevice.html │ ├── waitforattendeepresencetask.html │ └── zlibtextcompressor.html ├── enums │ ├── audiologevent.html │ ├── checkaudioconnectivityfeedback.html │ ├── checkaudioinputfeedback.html │ ├── checkaudiooutputfeedback.html │ ├── checkcameraresolutionfeedback.html │ ├── checkcontentshareconnectivityfeedback.html │ ├── checknetworktcpconnectivityfeedback.html │ ├── checknetworkudpconnectivityfeedback.html │ ├── checkvideoconnectivityfeedback.html │ ├── checkvideoinputfeedback.html │ ├── clientmetricreportdirection.html │ ├── clientmetricreportmediatype.html │ ├── contentshareconstants.html │ ├── loglevel.html │ ├── meetingsessionlifecycleevent.html │ ├── meetingsessionlifecycleeventcondition.html │ ├── meetingsessionstatuscode.html │ ├── prefetchon.html │ ├── prefetchsortby.html │ ├── sdpcandidatetype.html │ ├── serversidenetworkadaption.html │ ├── sessionstatecontrolleraction.html │ ├── sessionstatecontrollerdeferpriority.html │ ├── sessionstatecontrollerstate.html │ ├── sessionstatecontrollertransitionresult.html │ ├── signalingclienteventtype.html │ ├── simulcastlayers.html │ ├── targetdisplaysize.html │ ├── taskstatus.html │ ├── transcriptionstatustype.html │ ├── transcriptitemtype.html │ ├── videoencodingconnectionhealthpolicyname.html │ ├── videologevent.html │ ├── videoqualityadaptationpreference.html │ └── websocketreadystate.html ├── globals.html ├── index.html ├── interfaces │ ├── activespeakerdetector.html │ ├── activespeakerdetectorfacade.html │ ├── activespeakerpolicy.html │ ├── assetspec.html │ ├── audiomixcontroller.html │ ├── audiomixcontrollerfacade.html │ ├── audiomixobserver.html │ ├── audionodesubgraph.html │ ├── audiotransformdevice.html │ ├── audiovideocontroller.html │ ├── audiovideocontrollerfacade.html │ ├── audiovideoeventattributes.html │ ├── audiovideofacade.html │ ├── audiovideoobserver.html │ ├── backgroundbluroptions.html │ ├── backgroundblurprocessor.html │ ├── backgroundblurvideoframeprocessorobserver.html │ ├── backgroundfilteroptions.html │ ├── backgroundfilterpaths.html │ ├── backgroundfilterspec.html │ ├── backgroundfiltervideoframeprocessorobserver.html │ ├── backgroundreplacementoptions.html │ ├── backgroundreplacementprocessor.html │ ├── backgroundreplacementvideoframeprocessorobserver.html │ ├── backoff.html │ ├── backofffactory.html │ ├── browserbehavior.html │ ├── connectionhealthpolicy.html │ ├── connectionmetrics.html │ ├── connectionmonitor.html │ ├── contentsharecontroller.html │ ├── contentsharecontrollerfacade.html │ ├── contentshareobserver.html │ ├── defaultvideotransformdeviceobserver.html │ ├── destroyable.html │ ├── devicechangeobserver.html │ ├── devicecontroller.html │ ├── devicecontrollerbasedmediastreambroker.html │ ├── devicecontrollerfacade.html │ ├── deviceeventattributes.html │ ├── devicepixelratiomonitor.html │ ├── devicepixelratioobserver.html │ ├── devicepixelratiosource.html │ ├── eq.html │ ├── eventattributes.html │ ├── eventbuffer.html │ ├── eventcontroller.html │ ├── eventdata.html │ ├── eventobserver.html │ ├── eventreporter.html │ ├── eventsclientconfiguration.html │ ├── eventsingestionmetadata.html │ ├── extendedbrowserbehavior.html │ ├── logger.html │ ├── maybeprovider.html │ ├── mediadevicefactory.html │ ├── mediastreambroker.html │ ├── mediastreambrokerobserver.html │ ├── meetingeventsclientconfigurationattributes.html │ ├── meetingreadinesschecker.html │ ├── meetingsession.html │ ├── messagingsession.html │ ├── messagingsessionobserver.html │ ├── modality.html │ ├── modelshape.html │ ├── modelspec.html │ ├── partialord.html │ ├── pingpong.html │ ├── pingpongobserver.html │ ├── postloggeroptions.html │ ├── realtimecontroller.html │ ├── realtimecontrollerfacade.html │ ├── reconnectcontroller.html │ ├── redundantaudiorecoverymetricsobserver.html │ ├── removableanalysernode.html │ ├── removableobserver.html │ ├── scheduler.html │ ├── sessionstatecontroller.html │ ├── signalingclient.html │ ├── signalingclientobserver.html │ ├── sigv4.html │ ├── simulcastuplinkobserver.html │ ├── simulcastuplinkpolicy.html │ ├── task.html │ ├── taskcanceler.html │ ├── transceivercontroller.html │ ├── transcriptioncontroller.html │ ├── useragentparser.html │ ├── videocaptureandencodeparameter.html │ ├── videodownlinkbandwidthpolicy.html │ ├── videodownlinkobserver.html │ ├── videoelementfactory.html │ ├── videoelementresolutionmonitor.html │ ├── videoframebuffer.html │ ├── videoframeprocessor.html │ ├── videoframeprocessorpipeline.html │ ├── videoframeprocessorpipelineobserver.html │ ├── videoframeprocessortimer.html │ ├── videofxconfig.html │ ├── videofxeventattributes.html │ ├── videofxpaths.html │ ├── videofxspec.html │ ├── videostreamidset.html │ ├── videostreamindex.html │ ├── videotile.html │ ├── videotilecontroller.html │ ├── videotilecontrollerfacade.html │ ├── videotilefactory.html │ ├── videotransformdevice.html │ ├── videouplinkbandwidthpolicy.html │ ├── voicefocusdeviceoptions.html │ ├── voicefocuspaths.html │ ├── voicefocusspec.html │ ├── voicefocustransformdeviceobserver.html │ ├── volumeindicatoradapter.html │ └── websocketadapter.html ├── media │ ├── featured_layout_example.png │ ├── gallery_layout_example.png │ └── video_lifecycle.png ├── modules.html └── modules │ ├── amazonvoice_focus.html │ ├── apioverview.html │ ├── backgroundfilter_video_processor.html │ ├── backgroundfilter_videofx_processor.html │ ├── buildersjourney.html │ ├── clientevent_ingestion.html │ ├── contentsecurity_policy.html │ ├── contentshare.html │ ├── faqs.html │ ├── gettingstarted.html │ ├── meetingevents.html │ ├── migrationto_2_0.html │ ├── migrationto_3_0.html │ ├── prioritybased_downlink_policy.html │ ├── projectboard.html │ ├── qualitybandwidth_connectivity.html │ ├── replicatedmeetings.html │ ├── simulcast.html │ ├── videocodecs.html │ ├── videolayout.html │ └── videoprocessor.html ├── guides ├── .gitignore ├── 01_Getting_Started.md ├── 02_Content_Share.md ├── 03_API_Overview.md ├── 04_Quality_Bandwidth_Connectivity.md ├── 05_Simulcast.md ├── 06_Meeting_Events.md ├── 07_FAQs.md ├── 08_Migration_to_2_0.md ├── 09_Amazon_Voice_Focus.md ├── 10_Video_Processor.md ├── 11_Priority_Based_Downlink_Policy.md ├── 12_Client_Event_Ingestion.md ├── 13_Project_Board.md ├── 14_Content_Security_Policy.md ├── 15_Background_Filter_Video_Processor.md ├── 16_Video_Layout.md ├── 17_Migration_to_3_0.md ├── 18_Replicated_Meetings.md ├── 19_Video_Codecs.md ├── 20_Builders_Journey.md ├── 21_Background_Filter_VideoFX_Processor.md ├── media │ ├── featured_layout_example.png │ ├── gallery_layout_example.png │ └── video_lifecycle.png └── tsconfig.json ├── integration ├── configs │ ├── browserCompatibilityTest │ │ └── desktop │ │ │ ├── app_quit_video_test.config.json │ │ │ ├── audio_test.config.json │ │ │ ├── background_blur_test.config.json │ │ │ ├── content_share_screen_capture_test.config.json │ │ │ ├── content_share_video_test.config.json │ │ │ ├── data_message_test.config.json │ │ │ ├── linux │ │ │ ├── audio_test.config.json │ │ │ ├── content_share_screen_capture_test.config.json │ │ │ ├── content_share_video_test.config.json │ │ │ ├── data_message_test.config.json │ │ │ ├── meeting_end_test.config.json │ │ │ └── video_test.config.json │ │ │ ├── meeting_leave_video_test.config.json │ │ │ ├── meeting_readiness_checker_test.config.json │ │ │ ├── reconnection_test.config.json │ │ │ ├── video_test.config.json │ │ │ ├── videofx_background_effects_test.config.json │ │ │ └── voice_focus_test.config.json │ └── integrationTest │ │ ├── app_quit_audio_test.config.json │ │ ├── app_quit_content_share_test.config.json │ │ ├── app_quit_video_test.config.json │ │ ├── audio_test.config.json │ │ ├── background_blur_test.config.json │ │ ├── content_share_join_later_test.config.json │ │ ├── content_share_only_allow_two_test.config.json │ │ ├── content_share_screen_capture_test.config.json │ │ ├── content_share_video_test.config.json │ │ ├── data_message_test.config.json │ │ ├── echo_reduction_test.config.json │ │ ├── media_capture_test.config.json │ │ ├── meeting_end_test.config.json │ │ ├── meeting_leave_audio_test.config.json │ │ ├── meeting_leave_content_share_test.config.json │ │ ├── meeting_leave_video_test.config.json │ │ ├── meeting_readiness_checker_test.config.json │ │ ├── messaging_session_test.config.json │ │ ├── reconnection_test.config.json │ │ ├── sending_audio_events_test.config.json │ │ ├── test_app_video_end2end_test.config.json │ │ ├── test_app_video_pin_test.config.json │ │ ├── test_app_video_test.config.json │ │ ├── transcription_test.config.json │ │ ├── video_test.config.json │ │ ├── video_test_processor.config.json │ │ ├── video_test_simulcast.config.json │ │ ├── videofx_background_effects_test.config.json │ │ └── voice_focus_test.config.json ├── js │ ├── AppQuitAudioTest.js │ ├── AppQuitContentShareTest.js │ ├── AppQuitVideoTest.js │ ├── AudioTest.js │ ├── BackgroundBlurTest.js │ ├── BackgroundReplacementTest.js │ ├── ContentShareJoinLaterTest.js │ ├── ContentShareOnlyAllowTwoTest.js │ ├── ContentShareScreenCapture.js │ ├── ContentShareVideoTest.js │ ├── DataMessageTest.js │ ├── EchoReductionDisabledTest.js │ ├── EchoReductionEnabledTest.js │ ├── MediaCaptureTest.js │ ├── MeetingEndTest.js │ ├── MeetingLeaveAudioTest.js │ ├── MeetingLeaveContentShareTest.js │ ├── MeetingLeaveVideoTest.js │ ├── MeetingReadinessCheckerRunAllTest.js │ ├── MessagingSessionTest.js │ ├── README.md │ ├── ReconnectionTest.js │ ├── SendingAudioFailureAndRecoveryTest.js │ ├── SipCallTest.js │ ├── TranscriptionTest.js │ ├── VideoBindingTest.js │ ├── VideoEnd2EndTest.js │ ├── VideoFxBackgroundBlurTest.js │ ├── VideoFxBackgroundReplacementTest.js │ ├── VideoPinTest.js │ ├── VideoTest.js │ ├── VoiceFocusEnabledTest.js │ ├── VoiceFocusOfferedTest.js │ ├── app │ │ ├── .gitignore │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── server.js │ │ ├── tsconfig.json │ │ ├── video_test │ │ │ ├── video_test.html │ │ │ └── video_test.ts │ │ └── webpack.config.js │ ├── checks │ │ ├── AddVideoTileCheck.js │ │ ├── ContentShareVideoCheck.js │ │ ├── DataMessageCheck.js │ │ ├── EchoAudioCheck.js │ │ ├── GetAllRemoteVideoTilesCheck.js │ │ ├── GetAllVideoTilesCheck.js │ │ ├── GetLocalVideoTileCheck.js │ │ ├── HasStartedLocalVideoTileCheck.js │ │ ├── HaveVideoTileForAttendeeIdCheck.js │ │ ├── HaveVideoTilesWithStreamsCheck.js │ │ ├── LocalVideoCheck.js │ │ ├── MeetingJoinFailedCheck.js │ │ ├── MeetingReadinessCheckerAudioConnectivityCheck.js │ │ ├── MeetingReadinessCheckerAudioOutputCheck.js │ │ ├── MeetingReadinessCheckerContentShareConnectivityCheck.js │ │ ├── MeetingReadinessCheckerNetworkTcpCheck.js │ │ ├── MeetingReadinessCheckerNetworkUdpCheck.js │ │ ├── MeetingReadinessCheckerVideoConnectivityCheck.js │ │ ├── RemoteAudioCheck.js │ │ ├── RemoteVideoCheck.js │ │ ├── RosterCheck.js │ │ ├── RosterCheckConfig.js │ │ ├── SendingAudioFailureAndRecoveryCheck.js │ │ ├── SessionEstablishedMessageCheck.js │ │ ├── TileStateCheck.js │ │ ├── TranscriptionStartedCheck.js │ │ ├── TranscriptionStoppedCheck.js │ │ ├── TranscriptsReceivedCheck.js │ │ ├── UserAuthenticationCheck.js │ │ ├── UserJoinedMeetingCheck.js │ │ ├── VideoBackgroundBlurCheck.js │ │ ├── VideoFxBackgroundCheck.js │ │ ├── VideoPreferenceCheck.js │ │ ├── VoiceFocusOfferedCheck.js │ │ └── index.js │ ├── package-lock.json │ ├── package.json │ ├── pages │ │ ├── AppPage.js │ │ ├── MeetingReadinessCheckerPage.js │ │ ├── MessagingSessionPage.js │ │ ├── TestAppPage.js │ │ └── index.js │ ├── script │ │ ├── failure-check │ │ ├── install-kite │ │ ├── need-integ-test │ │ ├── run-test │ │ └── test-setup │ ├── server.js │ ├── steps │ │ ├── AuthenticateUserStep.js │ │ ├── ClickAddVideoTileButton.js │ │ ├── ClickBackgroundBlurButton.js │ │ ├── ClickBackgroundReplacementButton.js │ │ ├── ClickBindVideoElementButton.js │ │ ├── ClickContentShareButton.js │ │ ├── ClickContentSharePauseButton.js │ │ ├── ClickContentShareVideoTestButton.js │ │ ├── ClickGetAllRemoteVideoTilesButton.js │ │ ├── ClickGetAllVideoTilesButton.js │ │ ├── ClickGetLocalVideoTileButton.js │ │ ├── ClickHasStartedLocalVideoTileButton.js │ │ ├── ClickHaveVideoTileForAttendeeIdButton.js │ │ ├── ClickHaveVideoTilesWithStreamsButton.js │ │ ├── ClickMediaCaptureButton.js │ │ ├── ClickMicrophoneButton.js │ │ ├── ClickPinVideoTileButton.js │ │ ├── ClickRemoveAllVideoTilesButton.js │ │ ├── ClickStartLocalVideoButton.js │ │ ├── ClickStopLocalVideoButton.js │ │ ├── ClickUnbindVideoElementButton.js │ │ ├── ClickUnpinVideoTileButton.js │ │ ├── ClickVideoButton.js │ │ ├── ClickVideoFilterButton.js │ │ ├── ClickVideoFxBackgroundBlurButton.js │ │ ├── ClickVideoFxBackgroundReplacementButton.js │ │ ├── CloseAppStep.js │ │ ├── ComputeRawVideoSum.js │ │ ├── ConnectMessagingSessionStep.js │ │ ├── DisconnectMessagingSessionStep.js │ │ ├── EndMeetingStep.js │ │ ├── GetBoundAttendeeIdStep.js │ │ ├── GetSipUriForCallStep.js │ │ ├── JoinMeetingStep.js │ │ ├── JoinVideoTestMeetingStep.js │ │ ├── LeaveMeetingStep.js │ │ ├── OpenAppStep.js │ │ ├── OpenMeetingReadinessCheckerAppStep.js │ │ ├── OpenMessagingSessionAppStep.js │ │ ├── PlayEchoStep.js │ │ ├── PlayPrerecordedSpeechStep.js │ │ ├── PlayRandomToneStep.js │ │ ├── Reconnect.js │ │ ├── SelectNoAudioInputStep.js │ │ ├── SelectNoneAudioInputStep.js │ │ ├── SendDataMessage.js │ │ ├── SetTestBrokenStep.js │ │ ├── StartAmazonVoiceFocusStep.js │ │ ├── StartContentShareConnectivityCheckStep.js │ │ ├── StartMeetingReadinessCheckerStep.js │ │ ├── StartMeetingTranscriptionStep.js │ │ ├── StopMeetingTranscriptionStep.js │ │ ├── WaitForContentShareTestToBeReady.js │ │ ├── WaitForMeetingCreationAndMeetingReadinessCheckerInitializationStep.js │ │ ├── WaitForMeetingToBeCreated.js │ │ ├── WaitForRemoteAudioCheckToComplete.js │ │ ├── WaitForRemoteParticipantsToJoinMeeting.js │ │ ├── WaitForRemoteParticipantsToTurnAudioOff.js │ │ ├── WaitForRemoteParticipantsToTurnAudioOn.js │ │ ├── WaitForRemoteParticipantsToTurnVideoOff.js │ │ ├── WaitForRemoteParticipantsToTurnVideoOn.js │ │ ├── WaitForRemoteVideoCheckToComplete.js │ │ ├── WaitForStartMeetingReadinessCheckerButtonToBeEnabled.js │ │ └── index.js │ └── utils │ │ ├── AppTestStep.js │ │ ├── AppWaitTestStep.js │ │ ├── AsyncAppWaitTestStep.js │ │ ├── BackgroundFilterBaseTest.js │ │ ├── BrowserStackLogs.js │ │ ├── CloudWatch.js │ │ ├── PageUtil.js │ │ ├── SdkBaseTest.js │ │ ├── SdkTestUtils.js │ │ ├── SipCallClient.js │ │ ├── VideoFxBackgroundFilterBaseTest.js │ │ ├── WebdriverBrowserStack.js │ │ ├── WebdriverLocal.js │ │ ├── WebdriverSauceLabs.js │ │ └── Window.js └── mocha-tests │ ├── README.md │ ├── configs │ ├── BaseConfig.js │ └── browserCompatibilityTest │ │ └── desktop │ │ └── sample_test.config.json │ ├── eslintrc.json │ ├── jsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── pages │ └── MeetingPage.js │ ├── script │ ├── install_mac.sh │ └── run-test.js │ ├── tests │ ├── AudioTest.js │ ├── TestSetup.js │ └── VideoTest.js │ ├── tsconfig.json │ └── utils │ ├── ClientHelper.js │ ├── HelperFunctions.js │ ├── Logger.js │ ├── SdkBaseTest.js │ ├── WebDriverFactory.js │ └── Window.js ├── libs └── voicefocus │ ├── decider.d.ts │ ├── decider.js │ ├── fetch.d.ts │ ├── fetch.js │ ├── loader.d.ts │ ├── loader.js │ ├── support.d.ts │ ├── support.js │ ├── types.d.ts │ ├── types.js │ ├── voicefocus.d.ts │ ├── voicefocus.js │ ├── worklet-inline-node.d.ts │ ├── worklet-inline-node.js │ ├── worklet-worker-postMessage-node.d.ts │ ├── worklet-worker-postMessage-node.js │ ├── worklet-worker-sab-node.d.ts │ └── worklet-worker-sab-node.js ├── package-lock.json ├── package.json ├── protocol └── SignalingProtocol.proto ├── script ├── audit-deps ├── backward-compatibility-demo-setup.js ├── barrelize.js ├── build-guides.js ├── check-code-style.js ├── check-lockfile-version.js ├── check-voice-focus-version.js ├── cli-utils.js ├── conditional-install ├── copy-protocol.js ├── deploy-canary-demo ├── generate-docs ├── generate-red-worker-code.js ├── generate-signaling-protocol ├── generate-testing-doc ├── generate-version.js ├── github-action-awscli-installation ├── login.js ├── logout.js ├── postbuild ├── prebuild ├── release.js ├── update-typedoc-link.js └── version-utils.js ├── src ├── activespeakerdetector │ ├── ActiveSpeakerDetector.ts │ ├── ActiveSpeakerDetectorFacade.ts │ └── DefaultActiveSpeakerDetector.ts ├── activespeakerpolicy │ ├── ActiveSpeakerPolicy.ts │ └── DefaultActiveSpeakerPolicy.ts ├── applicationmetadata │ └── ApplicationMetadata.ts ├── attendee │ └── Attendee.ts ├── audiomixcontroller │ ├── AudioMixController.ts │ ├── AudioMixControllerFacade.ts │ └── DefaultAudioMixController.ts ├── audiomixobserver │ └── AudioMixObserver.ts ├── audioprofile │ └── AudioProfile.ts ├── audiovideocontroller │ ├── AudioVideoController.ts │ ├── AudioVideoControllerFacade.ts │ ├── AudioVideoControllerState.ts │ ├── DefaultAudioVideoController.ts │ └── NoOpAudioVideoController.ts ├── audiovideofacade │ ├── AudioVideoFacade.ts │ └── DefaultAudioVideoFacade.ts ├── audiovideoobserver │ └── AudioVideoObserver.ts ├── backgroundblurprocessor │ ├── BackgroundBlurOptions.ts │ ├── BackgroundBlurProcessor.ts │ ├── BackgroundBlurProcessorBuiltIn.ts │ ├── BackgroundBlurProcessorProvided.ts │ ├── BackgroundBlurStrength.ts │ ├── BackgroundBlurVideoFrameProcessor.ts │ ├── BackgroundBlurVideoFrameProcessorDelegate.ts │ ├── BackgroundBlurVideoFrameProcessorObserver.ts │ └── ModelSpecBuilder.ts ├── backgroundfilter │ ├── BackgroundFilterFrameCounter.ts │ ├── BackgroundFilterOptions.ts │ ├── BackgroundFilterPaths.ts │ ├── BackgroundFilterProcessor.ts │ ├── BackgroundFilterSpec.ts │ ├── BackgroundFilterVideoFrameProcessor.ts │ ├── BackgroundFilterVideoFrameProcessorDelegate.ts │ └── BackgroundFilterVideoFrameProcessorObserver.ts ├── backgroundreplacementprocessor │ ├── BackgroundReplacementFilter.ts │ ├── BackgroundReplacementOptions.ts │ ├── BackgroundReplacementProcessor.ts │ ├── BackgroundReplacementVideoFrameProcessor.ts │ ├── BackgroundReplacementVideoFrameProcessorDelegate.ts │ └── BackgroundReplacementVideoFrameProcessorObserver.ts ├── backoff │ ├── Backoff.ts │ ├── BackoffFactory.ts │ ├── FullJitterBackoff.ts │ ├── FullJitterBackoffFactory.ts │ └── FullJitterLimitedBackoff.ts ├── browserbehavior │ ├── BrowserBehavior.ts │ ├── DefaultBrowserBehavior.ts │ └── ExtendedBrowserBehavior.ts ├── clientmetricreport │ ├── ClientMetricReport.ts │ ├── ClientMetricReportDirection.ts │ ├── ClientMetricReportMediaType.ts │ ├── ClientVideoStreamReceivingReport.ts │ ├── GlobalMetricReport.ts │ ├── RedundantAudioRecoveryMetricReport.ts │ └── StreamMetricReport.ts ├── connectionhealthpolicy │ ├── BaseConnectionHealthPolicy.ts │ ├── ConnectionHealthData.ts │ ├── ConnectionHealthPolicy.ts │ ├── ConnectionHealthPolicyConfiguration.ts │ ├── ReconnectionHealthPolicy.ts │ ├── SendingAudioFailureConnectionHealthPolicy.ts │ ├── UnusableAudioWarningConnectionHealthPolicy.ts │ ├── VideoEncodingConcurrentSendersHealthPolicy.ts │ ├── VideoEncodingConnectionHealthPolicyName.ts │ ├── VideoEncodingCpuConnectionHealthPolicy.ts │ └── VideoEncodingFramerateConnectionHealthPolicy.ts ├── connectionmonitor │ ├── ConnectionMonitor.ts │ └── SignalingAndMetricsConnectionMonitor.ts ├── contentsharecontroller │ ├── ContentShareConstants.ts │ ├── ContentShareController.ts │ ├── ContentShareControllerFacade.ts │ ├── ContentShareMediaStreamBroker.ts │ └── DefaultContentShareController.ts ├── contentshareobserver │ └── ContentShareObserver.ts ├── cspmonitor │ └── CSPMonitor.ts ├── datamessage │ └── DataMessage.ts ├── destroyable │ └── Destroyable.ts ├── devicechangeobserver │ └── DeviceChangeObserver.ts ├── devicecontroller │ ├── AudioInputDevice.ts │ ├── AudioNodeSubgraph.ts │ ├── AudioTransformDevice.ts │ ├── DefaultDeviceController.ts │ ├── Device.ts │ ├── DeviceController.ts │ ├── DeviceControllerFacade.ts │ ├── DeviceSelection.ts │ ├── GetUserMediaError.ts │ ├── NoOpDeviceController.ts │ ├── NotFoundError.ts │ ├── NotReadableError.ts │ ├── OverconstrainedError.ts │ ├── PermissionDeniedError.ts │ ├── RemovableAnalyserNode.ts │ ├── SingleNodeAudioTransformDevice.ts │ ├── TypeError.ts │ ├── VideoInputDevice.ts │ ├── VideoQualitySettings.ts │ └── VideoTransformDevice.ts ├── devicepixelratiomonitor │ ├── DefaultDevicePixelRatioMonitor.ts │ └── DevicePixelRatioMonitor.ts ├── devicepixelratioobserver │ └── DevicePixelRatioObserver.ts ├── devicepixelratiosource │ ├── DevicePixelRatioSource.ts │ └── DevicePixelRatioWindowSource.ts ├── eventbuffer │ ├── EventBuffer.ts │ ├── InMemoryJSONEventBuffer.ts │ ├── JSONIngestionEvent.ts │ ├── JSONIngestionPayloadItem.ts │ └── JSONIngestionRecord.ts ├── eventbufferconfiguration │ └── EventBufferConfiguration.ts ├── eventcontroller │ ├── AudioVideoEventAttributes.ts │ ├── DefaultEventController.ts │ ├── DeviceEventAttributes.ts │ ├── EventAttributes.ts │ ├── EventController.ts │ ├── EventName.ts │ ├── MeetingHistoryState.ts │ ├── VideoFXEventAttributes.ts │ └── flattenEventAttributes.ts ├── eventingestionconfiguration │ └── EventIngestionConfiguration.ts ├── eventobserver │ └── EventObserver.ts ├── eventreporter │ ├── DefaultMeetingEventReporter.ts │ ├── EventData.ts │ ├── EventReporter.ts │ ├── EventsIngestionMetadata.ts │ └── NoOpEventReporter.ts ├── eventsclientconfiguration │ ├── EventsClientConfiguration.ts │ ├── MeetingEventsClientConfiguration.ts │ └── MeetingEventsClientConfigurationAttributes.ts ├── index.ts ├── logger │ ├── ConsoleLogger.ts │ ├── Log.ts │ ├── LogLevel.ts │ ├── Logger.ts │ ├── MultiLogger.ts │ ├── NoOpDebugLogger.ts │ ├── NoOpLogger.ts │ ├── POSTLogger.ts │ └── POSTLoggerOptions.ts ├── mediadevicefactory │ ├── DefaultMediaDeviceFactory.ts │ ├── MediaDeviceFactory.ts │ └── MediaDeviceProxyHandler.ts ├── mediastreambroker │ ├── DeviceControllerBasedMediaStreamBroker.ts │ ├── MediaStreamBroker.ts │ └── NoOpMediaStreamBroker.ts ├── mediastreambrokerobserver │ └── MediaStreamBrokerObserver.ts ├── meetingreadinesschecker │ ├── CheckAudioConnectivityFeedback.ts │ ├── CheckAudioInputFeedback.ts │ ├── CheckAudioOutputFeedback.ts │ ├── CheckCameraResolutionFeedback.ts │ ├── CheckContentShareConnectivityFeedback.ts │ ├── CheckNetworkTCPConnectivityFeedback.ts │ ├── CheckNetworkUDPConnectivityFeedback.ts │ ├── CheckVideoConnectivityFeedback.ts │ ├── CheckVideoInputFeedback.ts │ ├── DefaultMeetingReadinessChecker.ts │ ├── MeetingReadinessChecker.ts │ └── MeetingReadinessCheckerConfiguration.ts ├── meetingsession │ ├── DefaultMeetingSession.ts │ ├── MeetingFeatures.ts │ ├── MeetingSession.ts │ ├── MeetingSessionConfiguration.ts │ ├── MeetingSessionCredentials.ts │ ├── MeetingSessionLifecycleEvent.ts │ ├── MeetingSessionLifecycleEventCondition.ts │ ├── MeetingSessionStatus.ts │ ├── MeetingSessionStatusCode.ts │ ├── MeetingSessionTURNCredentials.ts │ ├── MeetingSessionURLs.ts │ └── MeetingSessionVideoAvailability.ts ├── message │ └── Message.ts ├── messagingsession │ ├── DefaultMessagingSession.ts │ ├── MessagingSession.ts │ ├── MessagingSessionConfiguration.ts │ ├── PrefetchOn.ts │ └── PrefetchSortBy.ts ├── messagingsessionobserver │ └── MessagingSessionObserver.ts ├── modality │ ├── DefaultModality.ts │ └── Modality.ts ├── modelspec │ ├── ModelShape.ts │ └── ModelSpec.ts ├── pingpong │ ├── DefaultPingPong.ts │ └── PingPong.ts ├── pingpongobserver │ └── PingPongObserver.ts ├── realtimecontroller │ ├── DefaultRealtimeController.ts │ ├── RealtimeAttendeePositionInFrame.ts │ ├── RealtimeController.ts │ ├── RealtimeControllerFacade.ts │ ├── RealtimeState.ts │ ├── RealtimeSubscribeToAttendeeIdPresenceCallback.ts │ ├── RealtimeVolumeIndicator.ts │ └── VolumeIndicatorCallback.ts ├── reconnectcontroller │ ├── DefaultReconnectController.ts │ └── ReconnectController.ts ├── redundantaudioencoder │ └── RedundantAudioEncoder.ts ├── redundantaudioencoderworkercode │ └── RedundantAudioEncoderWorkerCode.ts ├── redundantaudiorecoverymetricsobserver │ └── RedundantAudioRecoveryMetricsObserver.ts ├── removableobserver │ └── RemovableObserver.ts ├── scheduler │ ├── AsyncScheduler.ts │ ├── IntervalScheduler.ts │ ├── Scheduler.ts │ └── TimeoutScheduler.ts ├── sdp │ ├── SDP.ts │ ├── SDPCandidateType.ts │ ├── SDPMediaSection.ts │ ├── VideoCodecCapability.ts │ └── ZLIBTextCompressor.ts ├── sessionstatecontroller │ ├── DefaultSessionStateController.ts │ ├── SessionStateController.ts │ ├── SessionStateControllerAction.ts │ ├── SessionStateControllerDeferPriority.ts │ ├── SessionStateControllerState.ts │ └── SessionStateControllerTransitionResult.ts ├── signalingclient │ ├── DefaultSignalingClient.ts │ ├── ServerSideNetworkAdaption.ts │ ├── SignalingClient.ts │ ├── SignalingClientConnectionRequest.ts │ ├── SignalingClientEvent.ts │ ├── SignalingClientEventType.ts │ ├── SignalingClientJoin.ts │ ├── SignalingClientSubscribe.ts │ └── SignalingClientVideoSubscriptionConfiguration.ts ├── signalingclientobserver │ └── SignalingClientObserver.ts ├── signalingprotocol │ ├── SignalingProtocol.d.ts │ └── SignalingProtocol.js ├── sigv4 │ ├── DefaultSigV4.ts │ └── SigV4.ts ├── simulcastlayers │ └── SimulcastLayers.ts ├── statscollector │ ├── AudioLogEvent.ts │ ├── StatsCollector.ts │ └── VideoLogEvent.ts ├── task │ ├── AttachMediaInputTask.ts │ ├── BaseTask.ts │ ├── CleanRestartedSessionTask.ts │ ├── CleanStoppedSessionTask.ts │ ├── CreatePeerConnectionTask.ts │ ├── CreateSDPTask.ts │ ├── FinishGatheringICECandidatesTask.ts │ ├── JoinAndReceiveIndexTask.ts │ ├── LeaveAndReceiveLeaveAckTask.ts │ ├── ListenForVolumeIndicatorsTask.ts │ ├── MonitorTask.ts │ ├── NoOpTask.ts │ ├── OnceTask.ts │ ├── OpenSignalingConnectionTask.ts │ ├── ParallelGroupTask.ts │ ├── PromoteToPrimaryMeetingTask.ts │ ├── ReceiveAudioInputTask.ts │ ├── ReceiveRemoteVideoPauseResumeTask.ts │ ├── ReceiveVideoInputTask.ts │ ├── ReceiveVideoStreamIndexTask.ts │ ├── RunnableTask.ts │ ├── SendAndReceiveDataMessagesTask.ts │ ├── SerialGroupTask.ts │ ├── SetLocalDescriptionTask.ts │ ├── SetRemoteDescriptionTask.ts │ ├── SubscribeAndReceiveSubscribeAckTask.ts │ ├── Task.ts │ ├── TaskStatus.ts │ ├── TimeoutTask.ts │ └── WaitForAttendeePresenceTask.ts ├── taskcanceler │ └── TaskCanceler.ts ├── transceivercontroller │ ├── DefaultTransceiverController.ts │ ├── SimulcastContentShareTransceiverController.ts │ ├── SimulcastTransceiverController.ts │ ├── TransceiverController.ts │ └── VideoOnlyTransceiverController.ts ├── transcript │ ├── DefaultTranscriptionController.ts │ ├── Transcript.ts │ ├── TranscriptAlternative.ts │ ├── TranscriptEntity.ts │ ├── TranscriptEvent.ts │ ├── TranscriptItem.ts │ ├── TranscriptItemType.ts │ ├── TranscriptLanguageWithScore.ts │ ├── TranscriptResult.ts │ ├── TranscriptionController.ts │ ├── TranscriptionStatus.ts │ └── TranscriptionStatusType.ts ├── tsconfig.json ├── useragentparser │ ├── DefaultUserAgentParser.ts │ └── UserAgentParser.ts ├── utils │ ├── PromiseQueue.ts │ ├── Types.ts │ └── Utils.ts ├── versioning │ └── Versioning.ts ├── videocaptureandencodeparameter │ ├── DefaultVideoCaptureAndEncodeParameter.ts │ └── VideoCaptureAndEncodeParameter.ts ├── videodownlinkbandwidthpolicy │ ├── AllHighestVideoBandwidthPolicy.ts │ ├── NoVideoDownlinkBandwidthPolicy.ts │ ├── TargetDisplaySize.ts │ ├── VideoAdaptiveProbePolicy.ts │ ├── VideoDownlinkBandwidthPolicy.ts │ ├── VideoDownlinkObserver.ts │ ├── VideoPreference.ts │ ├── VideoPreferences.ts │ ├── VideoPriorityBasedPolicy.ts │ ├── VideoPriorityBasedPolicyConfig.ts │ └── VideoQualityAdaptationPreference.ts ├── videoelementfactory │ ├── NoOpVideoElementFactory.ts │ └── VideoElementFactory.ts ├── videoframeprocessor │ ├── CanvasVideoFrameBuffer.ts │ ├── DefaultVideoFrameProcessorPipeline.ts │ ├── DefaultVideoFrameProcessorTimer.ts │ ├── DefaultVideoTransformDevice.ts │ ├── DefaultVideoTransformDeviceObserver.ts │ ├── NoOpVideoFrameProcessor.ts │ ├── VideoFrameBuffer.ts │ ├── VideoFrameProcessor.ts │ ├── VideoFrameProcessorPipeline.ts │ ├── VideoFrameProcessorPipelineObserver.ts │ └── VideoFrameProcessorTimer.ts ├── videofx │ ├── DeferredPromise.ts │ ├── VideoFxAssetParams.ts │ ├── VideoFxBlurStrength.ts │ ├── VideoFxCanvasOpsManager.ts │ ├── VideoFxConfig.ts │ ├── VideoFxConstants.ts │ ├── VideoFxPaths.ts │ ├── VideoFxProcessor.ts │ ├── VideoFxRenderer.ts │ ├── VideoFxSegmentationRateManager.ts │ ├── VideoFxSpec.ts │ └── VideoFxStreamParameters.ts ├── videosource │ └── VideoSource.ts ├── videostreamidset │ ├── DefaultVideoStreamIdSet.ts │ └── VideoStreamIdSet.ts ├── videostreamindex │ ├── DefaultVideoStreamIndex.ts │ ├── SimulcastVideoStreamIndex.ts │ ├── VideoStreamDescription.ts │ └── VideoStreamIndex.ts ├── videotile │ ├── DefaultVideoElementResolutionMonitor.ts │ ├── DefaultVideoTile.ts │ ├── VideoElementResolutionMonitor.ts │ ├── VideoTile.ts │ └── VideoTileState.ts ├── videotilecontroller │ ├── DefaultVideoTileController.ts │ ├── VideoTileController.ts │ └── VideoTileControllerFacade.ts ├── videotilefactory │ ├── DefaultVideoTileFactory.ts │ └── VideoTileFactory.ts ├── videouplinkbandwidthpolicy │ ├── BitrateParameters.ts │ ├── ConnectionMetrics.ts │ ├── ContentShareSimulcastEncodingParameters.ts │ ├── DefaultSimulcastUplinkPolicy.ts │ ├── DefaultSimulcastUplinkPolicyForContentShare.ts │ ├── NScaleVideoUplinkBandwidthPolicy.ts │ ├── NoVideoUplinkBandwidthPolicy.ts │ ├── SimulcastUplinkObserver.ts │ ├── SimulcastUplinkPolicy.ts │ ├── VideoEncodingParameters.ts │ └── VideoUplinkBandwidthPolicy.ts ├── voicefocus │ ├── AGCOptions.ts │ ├── AssetSpec.ts │ ├── LoggerAdapter.ts │ ├── VoiceFocusConfig.ts │ ├── VoiceFocusDeviceOptions.ts │ ├── VoiceFocusDeviceTransformer.ts │ ├── VoiceFocusModelComplexity.ts │ ├── VoiceFocusModelName.ts │ ├── VoiceFocusPaths.ts │ ├── VoiceFocusSpec.ts │ ├── VoiceFocusTransformDevice.ts │ ├── VoiceFocusTransformDeviceDelegate.ts │ └── VoiceFocusTransformDeviceObserver.ts ├── volumeindicatoradapter │ ├── DefaultVolumeIndicatorAdapter.ts │ └── VolumeIndicatorAdapter.ts └── websocketadapter │ ├── DefaultWebSocketAdapter.ts │ ├── WebSocketAdapter.ts │ └── WebSocketReadyState.ts └── test ├── activespeakerdetector └── DefaultActiveSpeakerDetector.test.ts ├── activespeakerpolicy └── DefaultActiveSpeakerPolicy.test.ts ├── applicationmetadata └── ApplicationMetadata.test.ts ├── audiomixcontroller └── DefaultAudioMixController.test.ts ├── audioprofile └── AudioProfile.test.ts ├── audiovideocontroller ├── DefaultAudioVideoController.test.ts └── NoOpAudioVideoController.test.ts ├── audiovideofacade └── DefaultAudioVideoFacade.test.ts ├── backgroundprocessor ├── BackgroundBlurProcessor.test.ts ├── BackgroundBlurStrength.test.ts ├── BackgroundFilterCommon.ts └── ModelSpecBuilder.test.ts ├── backgroundreplacementprocessor └── BackgroundReplacementProcessor.test.ts ├── backoff ├── FullJitterBackoff.test.ts ├── FullJitterBackoffFactory.test.ts └── FullJitterLimitedBackoff.test.ts ├── browserbehavior └── DefaultBrowserBehavior.test.ts ├── clientmetricreport └── ClientMetricReport.test.ts ├── connectionhealthpolicy ├── BaseConnectionHealthPolicy.test.ts ├── ConnectionHealthData.test.ts ├── ReconnectionHealthPolicy.test.ts ├── SendingAudioFailureConnectionHealthPolicy.test.ts └── UnusableAudioWarningConnectionHealthPolicy.test.ts ├── connectionmonitor └── SignalingAndMetricsConnectionMonitor.test.ts ├── contentsharecontroller ├── ContentShareMediaStreamBroker.test.ts └── DefaultContentShareController.test.ts ├── cspmonitor └── CSPMonitor.test.ts ├── customeventmock ├── CustomEventMock.ts └── CustomEventMockInit.ts ├── datamessage └── DataMessage.test.ts ├── destroyable └── Destroyable.test.ts ├── devicecontroller ├── AudioTransformDevice.test.ts ├── DefaultDeviceController.test.ts ├── NoOpDeviceController.test.ts ├── SingleNodeAudioTransformDevice.test.ts ├── VideoTransformDevice.test.ts └── WatchingLogger.ts ├── devicepixelratiomonitor └── DefaultDevicePixelRatioMonitor.test.ts ├── devicepixelratiosource └── DevicePixelRatioWindowSource.test.ts ├── domblobmock └── DOMBlobMock.ts ├── dommock ├── DOMMockBehavior.ts ├── DOMMockBuilder.ts ├── DisplayMediaState.ts ├── MockError.ts └── UserMediaState.ts ├── domwebsocketmock └── DOMWebSocketMock.ts ├── eventbuffer └── InMemoryJSONEventBuffer.test.ts ├── eventbufferconfiguration └── EventBufferConfiguration.test.ts ├── eventcontroller ├── DefaultEventController.test.ts └── flattenEventAttributes.test.ts ├── eventingestionconfiguration └── EventIngestionConfiguration.test.ts ├── eventreporter ├── DefaultMeetingEventReporter.test.ts └── NoOpEventReporter.test.ts ├── eventsclientconfiguration └── MeetingEventsClientConfiguration.test.ts ├── global └── Global.test.ts ├── logger ├── ConsoleLogger.test.ts ├── MultiLogger.test.ts ├── NoOpLogger.test.ts └── POSTLogger.test.ts ├── mediadevicefactory ├── DefaultMediaDeviceFactory.test.ts └── MediaDeviceProxyHandler.test.ts ├── mediastreambroker └── NoOpMediaStreamBroker.test.ts ├── meetingreadinesschecker └── DefaultMeetingReadinessChecker.test.ts ├── meetingsession ├── CreateMeetingResponseMock.ts ├── DefaultMeetingSession.test.ts ├── MeetingSessionConfiguration.test.ts ├── MeetingSessionCredentials.test.ts ├── MeetingSessionStatus.test.ts └── MeetingSessionURLs.test.ts ├── messagingsession ├── DefaultMessagingSession.test.ts └── MessagingSessionConfiguration.test.ts ├── modality └── DefaultModality.test.ts ├── pingpong └── DefaultPingPong.test.ts ├── realtimecontroller ├── DefaultRealtimeController.test.ts ├── RealtimeAttendeePositionInFrame.test.ts └── RealtimeState.test.ts ├── reconnectcontroller └── DefaultReconnectController.test.ts ├── redundantaudioencoder ├── OpusTestPackets.ts └── RedundantAudioEncoder.test.ts ├── responsemock └── ResponseMock.ts ├── scheduler ├── AsyncScheduler.test.ts ├── IntervalScheduler.test.ts └── TimeoutScheduler.test.ts ├── sdp ├── ChromeSDPMock.ts ├── FirefoxSDPMock.ts ├── SDP.test.ts ├── SDPMock.ts ├── SafariSDPMock.ts └── VideoCodecCapability.test.ts ├── sessionstatecontroller └── DefaultSessionStateController.test.ts ├── signalingclient ├── DefaultSignalingClient.test.ts ├── SignalingClientConnectionRequest.test.ts └── ZLIBTextCompressor.test.ts ├── sigv4 └── DefaultSigV4.test.ts ├── statscollector └── StatsCollector.test.ts ├── task ├── AttachMediaInputTask.test.ts ├── BaseTask.test.ts ├── CleanRestartedSessionTask.test.ts ├── CleanStoppedSessionTask.test.ts ├── CreatePeerConnectionTask.test.ts ├── CreateSDPTask.test.ts ├── FinishGatheringICECandidatesTask.test.ts ├── JoinAndReceiveIndexTask.test.ts ├── LeaveAndReceiveLeaveAckTask.test.ts ├── ListenForVolumeIndicatorsTask.test.ts ├── MonitorTask.test.ts ├── NoOpTask.test.ts ├── OnceTask.test.ts ├── OpenSignalingConnectionTask.test.ts ├── ParallelGroupTask.test.ts ├── PromoteToPrimaryMeetingTask.test.ts ├── ReceiveAudioInputTask.test.ts ├── ReceiveRemoteVideoPauseResumeTask.test.ts ├── ReceiveVideoInputTask.test.ts ├── ReceiveVideoStreamIndexTask.test.ts ├── RunnableTask.test.ts ├── SendAndReceiveDataMessagesTask.test.ts ├── SerialGroupTask.test.ts ├── SetLocalDescriptionTask.test.ts ├── SetRemoteDescriptionTask.test.ts ├── SubscribeAndReceiveSubscribeAckTask.test.ts ├── TimeoutTask.test.ts └── WaitForAttendeePresenceTask.test.ts ├── transceivercontroller ├── DefaultTransceiverController.test.ts ├── SimulcastContentShareTransceiverController.test.ts ├── SimulcastTransceiverController.test.ts └── VideoOnlyTransceiverController.test.ts ├── transcript ├── DefaultTranscriptionController.test.ts ├── TranscriptEvent.test.ts └── TranscriptEventTestDataHelper.ts ├── transformdevicemock └── MockTransformDevice.ts ├── tsconfig.json ├── useragentparser └── DefaultUserAgentParser.test.ts ├── utils.ts ├── utils ├── Maybe.test.ts ├── None.test.ts ├── PromiseQueue.test.ts ├── Some.test.ts ├── Types.test.ts └── Utils.test.ts ├── versioning └── Versioning.test.ts ├── videocaptureandencodeparameter └── DefaultVideoCaptureAndEncodeParameter.test.ts ├── videodownlinkbandwidthpolicy ├── AllHighestVideoBandwidthPolicy.test.ts ├── NoVideoDownlinkBandwidthPolicy.test.ts ├── VideoAdaptiveProbePolicy.test.ts ├── VideoPreferences.test.ts ├── VideoPriorityBasedPolicy.test.ts └── VideoPriorityBasedPolicyConfig.test.ts ├── videoelementfactory └── NoOpVideoElementFactory.test.ts ├── videoframeprocessor ├── CanvasVideoFrameBuffer.test.ts ├── DefaultVideoFrameProcessorPipeline.test.ts ├── DefaultVideoFrameProcessorTimer.test.ts ├── DefaultVideoTransformDevice.test.ts └── NoOpVideoFrameProcessor.test.ts ├── videofx ├── MockEngineWorker.ts ├── MockFxLib.ts └── VideoFxProcessor.test.ts ├── videostreamidset └── DefaultVideoStreamIdSet.test.ts ├── videostreamindex ├── DefaultVideoStreamIndex.test.ts └── SimulcastVideoStreamIndex.test.ts ├── videotile ├── DefaultVideoElementResolutionMonitor.test.ts ├── DefaultVideoTile.test.ts └── VideoTileState.test.ts ├── videotilecontroller └── DefaultVideoTileController.test.ts ├── videouplinkbandwidthpolicy ├── DefaultSimulcastUplinkPolicy.test.ts ├── DefaultSimulcastUplinkPolicyForContentShare.test.ts ├── NScaleVideoUplinkBandwidthPolicy.test.ts └── NoVideoUplinkBandwidthPolicy.test.ts ├── voicefocus ├── LoggerAdapter.test.ts ├── MockLogger.ts ├── VoiceFocusDeviceTransformer.test.ts └── VoiceFocusTransformDeviceDelegate.test.ts ├── volumeindicatoradapter └── DefaultVolumeIndicatorAdapter.test.ts └── websocketadapter └── DefaultWebSocketAdapter.test.ts /.base-branch: -------------------------------------------------------------------------------- 1 | origin/main 2 | -------------------------------------------------------------------------------- /.changelog-watchlist: -------------------------------------------------------------------------------- 1 | # Require changelog if files in these directories change 2 | src/ 3 | libs/voicefocus 4 | 5 | # Exceptions (Add an exception by adding a path and prepend with a '!' ) 6 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build 2 | config 3 | coverage 4 | demos/aws-sdk 5 | demos/electron/* 6 | demos/browser/*.* 7 | demos/serverless/* 8 | demos/components/* 9 | demos/react/* 10 | demos/device/* 11 | docs 12 | guides 13 | index.ts 14 | integration 15 | modules 16 | rust 17 | screensignalingprotocol 18 | signalingprotocol 19 | test/redundantaudioencoder/OpusTestPackets.ts 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation request 3 | about: Need help using the SDK? Spot an error? Let us know how our documentation can be improved. 4 | title: '' 5 | labels: 'documentation' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### What are you trying to do? 11 | 12 | *For example: I'm trying to start a meeting session with audio.* 13 | 14 | ### How can the documentation be improved to help your use case? 15 | 16 | *For example: Include a section on how to configure the meeting session.* 17 | 18 | ### What documentation have you looked at so far? 19 | 20 | *For example: README.md, Amazon Chime SDK Developer Guide, etc. 21 | 22 | *Note: GitHub issues are not a substitute for customer support. Please open a support case if the issue is important to you.* 23 | https://docs.aws.amazon.com/awssupport/latest/user/case-management.html 24 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Issue #:** 2 | 3 | **Description of changes:** 4 | 5 | **Testing:** 6 | 7 | *Can these tested using a demo application? Please provide reproducible step-by-step instructions.* 8 | 9 | 10 | **Checklist:** 11 | 12 | 1. Have you successfully run `npm run build:release` locally? 13 | 14 | 15 | 2. Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved? 16 | 17 | 18 | 3. Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved? 19 | 20 | 21 | By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. 22 | 23 | -------------------------------------------------------------------------------- /.github/script/get-current-version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const pjson = require('../../package.json'); 4 | console.log(pjson.version); -------------------------------------------------------------------------------- /.github/script/get-demo-browser-current-version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const pjson = require('../../demos/browser/package.json'); 4 | var currentVersion = pjson['dependencies']['amazon-chime-sdk-js']; 5 | // The package.json may contain special characters like ~, * or ^ etc and these special characters can cause issuess with the publih workflow. 6 | // Hence, cleaning the version number. For example, ^2.27.0 to 2.27.0 7 | currentVersion = currentVersion.replace(/([~^*><=])/g, ""); 8 | console.log(currentVersion); 9 | -------------------------------------------------------------------------------- /.github/script/get-npm-tag.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { spawnOrFail } = require('../../script/cli-utils'); 4 | const version = require('../../package.json').version; 5 | const release = version.split('-'); 6 | if (release[1]) { 7 | // For example, 3.0.0-beta.0 8 | console.log(release[1].split('.')[0]); 9 | } else { 10 | // For example, '3.1.0' 11 | const npmLatestVersion = spawnOrFail('npm',['view', 'amazon-chime-sdk-js@latest', 'version'], { skipOutput: true }).trim(); 12 | const npmLatestMajorVersion = npmLatestVersion.split('.')[0]; 13 | const majorVersionToRelease = version.split('.')[0]; 14 | if (majorVersionToRelease < npmLatestMajorVersion) { 15 | console.log(`stable-v${majorVersionToRelease}`); 16 | } else { 17 | console.log('latest'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.github/script/get-pre-release-name.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const version = require('../../package.json').version; 4 | const preRelease = version.split('-'); 5 | if (preRelease[1]) { 6 | console.log(preRelease[1].split('.')[0]); 7 | } else { 8 | console.log(''); 9 | } -------------------------------------------------------------------------------- /.github/script/get-prev-version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // eslint-disable-next-line @typescript-eslint/no-var-requires 4 | const exec = require('child_process').execSync; 5 | 6 | const versions = exec('npm view amazon-chime-sdk-js versions --json').toString().trim().split("\n"); 7 | // The output would be something like 8 | // [ 9 | // "1.0.0", 10 | // ... 11 | // "2.8.0", <- previous version 12 | // "2.9.0" <- latest version 13 | // ] 14 | 15 | const prev_version = versions[versions.length-3]; 16 | console.log(prev_version.substring(3,prev_version.length-2)) 17 | -------------------------------------------------------------------------------- /.github/script/send-prerun-script-pr-reminder.js: -------------------------------------------------------------------------------- 1 | // Send prerun script PR reminder is a minimal script that makes a HTTP POST call to a webhook to send a slack message. 2 | // For example, this script passes PR URLs to the webhook so that the amazon-chime-js-sdk team can be notified. 3 | 4 | const axios = require('axios'); 5 | 6 | var myArgs = process.argv.slice(2); 7 | 8 | axios.post(myArgs[0], { 9 | 'major-version-pr': myArgs[1], 10 | 'pmv-pr': myArgs[2] 11 | }); 12 | -------------------------------------------------------------------------------- /.github/script/send-test-report.js: -------------------------------------------------------------------------------- 1 | // Send test report is a minimal script that makes a HTTP POST call to a webhook to send a slack message. 2 | // For example, this script passes results of the browser compatibility report to the webhook so that the amazon-chime-js-sdk team can be notified of the results. 3 | 4 | // Disabled until a kind soul fixes these tests 5 | 6 | // const axios = require('axios'); 7 | 8 | // var myArgs = process.argv.slice(2); 9 | 10 | // if (myArgs[2].toUpperCase() !== 'SUCCESS') { 11 | // axios.post(myArgs[0], { 12 | // 'github_workflow_url': myArgs[1], 13 | // 'browser_compatibility_tests_status': myArgs[2].toUpperCase() 14 | // }).then(res => { 15 | // console.log(res.data); 16 | // }).catch(err => { 17 | // console.log(err); 18 | // }); 19 | // } 20 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | daysUntilStale: 7 2 | daysUntilClose: 14 3 | exemptLabels: 4 | - Triaged 5 | staleLabel: Needs More Information 6 | markComment: false 7 | closeComment: false 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | .*sw* 3 | *.iml 4 | .DS_Store 5 | .idea 6 | .nyc_output 7 | .npmrc 8 | __data* 9 | build 10 | config/tsconfig.red.json 11 | coverage 12 | demos/browser/logs/ 13 | demos/components/node_modules 14 | demos/react/node_modules 15 | demos/react/lib 16 | demos/react/public/app.js 17 | dist 18 | doc 19 | integration-test-results/ 20 | integration/js/logs/ 21 | integration/js/node_modules 22 | integration/js/temp 23 | integration/kite-allure-reports 24 | integration/logs 25 | node_modules 26 | src/versioning/version.ts 27 | -------------------------------------------------------------------------------- /.integration-watchlist: -------------------------------------------------------------------------------- 1 | # run integration tests if files in these directories change 2 | demos/browser 3 | src/ 4 | integration/ 5 | .github/ 6 | 7 | # exceptions 8 | !.eslintignore 9 | !src/versioning/Versioning.ts 10 | !README.md 11 | !integration/js/README.md 12 | !demos/browser/README.md 13 | !demos/device/README.md 14 | !guides/ 15 | !docs/ 16 | !.integration-watchlist -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # These owners will be the default owners for everything in 2 | # amazon-chime-sdk-js repo. 3 | # Check below link for more information: 4 | # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners 5 | * @aws/amazon-chime-sdk-js-dev 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | amazon-chime-sdk-js 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | -------------------------------------------------------------------------------- /config/imports.test.ts: -------------------------------------------------------------------------------- 1 | import * as Foo from 'amazon-chime-sdk-js'; 2 | 3 | console.log('Imported:', Foo); 4 | 5 | -------------------------------------------------------------------------------- /config/tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "downlevelIteration": true, 5 | "experimentalDecorators": true, 6 | "lib": [ 7 | "DOM", 8 | "ES2015", 9 | "ES2016.Array.Include", 10 | "ES2017.SharedMemory" 11 | ], 12 | "module": "commonjs", 13 | "noImplicitAny": true, 14 | "noUnusedLocals": true, 15 | "sourceMap": true, 16 | "inlineSources": true, 17 | "stripInternal": true, 18 | "target": "ES2015", 19 | "esModuleInterop": true 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /config/tsconfig.import.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "noEmit": true, 5 | "rootDir": "../build", 6 | "paths": { 7 | "amazon-chime-sdk-js": ["../build"] 8 | } 9 | }, 10 | "include": [ 11 | "./imports.test.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../build", 5 | "rootDir": "../src" 6 | }, 7 | "include": [ 8 | "../src/**/*", 9 | "../libs/**/*" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /demos/browser/.gitignore: -------------------------------------------------------------------------------- 1 | /debug.js 2 | -------------------------------------------------------------------------------- /demos/browser/app/meetingV2/util/MeetingLogger.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import { 5 | LogLevel, 6 | MeetingSessionConfiguration, 7 | POSTLogger, 8 | POSTLoggerOptions, 9 | } from 'amazon-chime-sdk-js'; 10 | 11 | export function getPOSTLogger( 12 | meetingSessionConfiguration: MeetingSessionConfiguration, 13 | appName: string, 14 | url: string, 15 | logLevel: LogLevel 16 | ) { 17 | const options: POSTLoggerOptions = { 18 | url, 19 | logLevel, 20 | metadata: { 21 | appName, 22 | meetingId: meetingSessionConfiguration.meetingId, 23 | attendeeId: meetingSessionConfiguration.credentials.attendeeId, 24 | }, 25 | }; 26 | return new POSTLogger(options); 27 | } 28 | -------------------------------------------------------------------------------- /demos/browser/app/meetingV2/util/mediastreamprovider/MediaStreamProvider.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[MediaStreamProvider]] is a simple wrapper around a `MediaStream` that exposes additional API 6 | * to manage any underlying resources. Implementations may wrap or transform internal [[MediaStreamProvider]] 7 | */ 8 | export default interface MediaStreamProvider { 9 | /** 10 | * Return a media stream. 11 | */ 12 | getMediaStream(): Promise; 13 | 14 | /** 15 | * Pause underlying media, e.g. a file playing back. 16 | */ 17 | pause(): void; 18 | 19 | /** 20 | * Resume paused underlying media. 21 | */ 22 | resume(): void; 23 | } -------------------------------------------------------------------------------- /demos/browser/audio/REFERENCES.md: -------------------------------------------------------------------------------- 1 | File | Source 2 | ---- | ------ 3 | speech.mp3 | Excerpt from speech by Barack Obama
November 20, 2014
Source: The White House
President Obama delivers an address to the nation on immigration.
https://millercenter.org/the-presidency/presidential-speeches/november-20-2014-address-nation-immigration 4 | speech_stereo.mp3 | Audio test file for stereo verification 5 | 6 | 7 | -------------------------------------------------------------------------------- /demos/browser/audio/speech.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/demos/browser/audio/speech.mp3 -------------------------------------------------------------------------------- /demos/browser/audio/speech_stereo.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/demos/browser/audio/speech_stereo.mp3 -------------------------------------------------------------------------------- /demos/browser/image/beach.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/demos/browser/image/beach.jpg -------------------------------------------------------------------------------- /demos/browser/image/license.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | This file is licensed under the Creative Commons Attribution 2.0 Generic license. Author Familydestinationsguide.com Images 6 | 7 | -------------------------------------------------------------------------------- /demos/browser/script/copy-assets.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | 4 | const assetDefinitions = [{ 5 | path: 'audio/', 6 | outputPath: 'dist/', 7 | ext: ['mp3'], 8 | }, 9 | { 10 | path: 'image/', 11 | outputPath: 'dist/', 12 | ext: ['jpg'], 13 | }]; 14 | 15 | assetDefinitions.forEach(assetDef => { 16 | const files = fs.readdirSync(assetDef.path); 17 | 18 | if (!fs.existsSync(assetDef.outputPath)) { 19 | fs.mkdirSync(assetDef.outputPath, { recursive: true }); 20 | } 21 | 22 | files.filter(f => assetDef.ext.includes(f.split('.').pop())).forEach(f => { 23 | fs.copyFileSync(path.join(assetDef.path, f), path.join(assetDef.outputPath, f)); 24 | }); 25 | }); -------------------------------------------------------------------------------- /demos/browser/serve.js: -------------------------------------------------------------------------------- 1 | const { serve } = require('./server.js'); 2 | 3 | serve(); -------------------------------------------------------------------------------- /demos/browser/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../config/tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./build", 5 | "rootDir": "../..", 6 | "skipLibCheck": true 7 | }, 8 | "include": [ 9 | "./app/**/*" 10 | ], 11 | } 12 | -------------------------------------------------------------------------------- /demos/serverless/.gitignore: -------------------------------------------------------------------------------- 1 | src/aws-sdk 2 | src/uuid 3 | src/index.html 4 | src/indexV2.html 5 | src/aws-embedded-metrics 6 | src/speech.mp3 7 | src/speech_stereo.mp3 8 | -------------------------------------------------------------------------------- /demos/serverless/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "amazon-chime-sdk-js-serverless-demos", 3 | "version": "0.1.0", 4 | "description": "Amazon Chime SDK JavaScript Serverless Demos", 5 | "scripts": { 6 | "deploy": "node ./deploy.js" 7 | }, 8 | "dependencies": { 9 | "fs-extra": "^9.1.0" 10 | }, 11 | "license": "Apache-2.0", 12 | "repository": { 13 | "type": "git", 14 | "url": "git://github.com/aws/amazon-chime-sdk-js" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demos/serverless/src/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "amazon-chime-sdk-js-serverless-demos-lambda", 3 | "version": "0.1.0", 4 | "description": "Amazon Chime SDK JavaScript Serverless Demos Lambda Handler", 5 | "dependencies": { 6 | "aws-embedded-metrics": "^2.0.4", 7 | "@aws-sdk/client-chime-sdk-media-pipelines": "^3.632.0", 8 | "@aws-sdk/client-chime-sdk-meetings": "^3.632.0", 9 | "@aws-sdk/client-chime-sdk-messaging": "^3.632.0", 10 | "@aws-sdk/client-cloudwatch-logs": "^3.632.0", 11 | "@aws-sdk/client-dynamodb": "^3.632.0", 12 | "@aws-sdk/client-ivs": "^3.632.0", 13 | "@aws-sdk/client-sts": "^3.632.0", 14 | "uuid": "^8.3.2" 15 | }, 16 | "license": "Apache-2.0", 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/aws/amazon-chime-sdk-js" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /docs/assets/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/docs/assets/images/icons.png -------------------------------------------------------------------------------- /docs/assets/images/icons@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/docs/assets/images/icons@2x.png -------------------------------------------------------------------------------- /docs/assets/images/widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/docs/assets/images/widgets.png -------------------------------------------------------------------------------- /docs/assets/images/widgets@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/docs/assets/images/widgets@2x.png -------------------------------------------------------------------------------- /docs/media/featured_layout_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/docs/media/featured_layout_example.png -------------------------------------------------------------------------------- /docs/media/gallery_layout_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/docs/media/gallery_layout_example.png -------------------------------------------------------------------------------- /docs/media/video_lifecycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/docs/media/video_lifecycle.png -------------------------------------------------------------------------------- /guides/.gitignore: -------------------------------------------------------------------------------- 1 | /docs.ts 2 | -------------------------------------------------------------------------------- /guides/01_Getting_Started.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | For guidance and examples on how to use the Amazon Chime SDK for JavaScript in your application, see [API overview](https://aws.github.io/amazon-chime-sdk-js/modules/apioverview.html) for more information. 4 | -------------------------------------------------------------------------------- /guides/media/featured_layout_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/guides/media/featured_layout_example.png -------------------------------------------------------------------------------- /guides/media/gallery_layout_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/guides/media/gallery_layout_example.png -------------------------------------------------------------------------------- /guides/media/video_lifecycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/amazon-chime-sdk-js/27ca85a77ff17fdf6c4092d47980ef155fb9431b/guides/media/video_lifecycle.png -------------------------------------------------------------------------------- /guides/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../config/tsconfig.base.json", 3 | "compilerOptions": { 4 | "noEmit": true 5 | }, 6 | "include": [ 7 | "../src/**/*", 8 | "./docs.ts" 9 | ], 10 | "typedocOptions": { 11 | "out": "../docs", 12 | "readme": "README.md", 13 | "entryPoints": [ 14 | "../src/index.ts", 15 | "./docs.ts" 16 | ], 17 | "exclude": [ 18 | "src/signalingprotocol/SignalingProtocol.js", 19 | "src/signalingprotocol/SignalingProtocol.d.ts", 20 | "src/signalingprotocol/ScreenSignalingProtocol.js", 21 | "src/signalingprotocol/ScreenSignalingProtocol.d.ts" 22 | ], 23 | "excludePrivate": true, 24 | "media": "./media", 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /integration/configs/browserCompatibilityTest/desktop/app_quit_video_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "meeting_end_video_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "App Quit Video Test %ts", 8 | "description": "App Quit Video Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "AppQuitVideoTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/?earlyConnect=1", 14 | "retry": 2, 15 | "seleniumSessions": { 16 | "safari": 2, 17 | "ANDROID": 2 18 | } 19 | } 20 | } 21 | ], 22 | "clients": [ 23 | { 24 | "browserName": "chrome", 25 | "version": "latest", 26 | "platform": "MAC" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /integration/configs/browserCompatibilityTest/desktop/linux/audio_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "linux_audio_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Chime Audio Test on Linux %ts", 8 | "description": "Test audio on demo meeting app on Linux", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "AudioTest.js", 12 | "payload": { 13 | "url": "http://testsite:8080/?earlyConnect=1", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "platform": "LINUX" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /integration/configs/browserCompatibilityTest/desktop/linux/content_share_screen_capture_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "linux_content_share_screen_capture_test.json", 4 | "grids": [ 5 | ], 6 | "tests": [ 7 | { 8 | "name": "Content Share Screen Capture Test on Linux %ts", 9 | "description": "Content Share Screen Capture Test on Linux", 10 | "tupleSize": 1, 11 | "noOfThreads": 1, 12 | "testImpl": "ContentShareScreenCapture.js", 13 | "payload":{ 14 | "url": "http://testsite:8080/?earlyConnect=1", 15 | "retry": 2 16 | } 17 | } 18 | ], 19 | "clients": [ 20 | { 21 | "browserName": "chrome", 22 | "platform": "LINUX" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/browserCompatibilityTest/desktop/linux/content_share_video_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "content_share_video_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Content Share Video Test %ts", 8 | "description": "Video sharing using content share", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "ContentShareVideoTest.js", 12 | "payload": { 13 | "url": "http://testsite:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "platform": "LINUX" 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /integration/configs/browserCompatibilityTest/desktop/linux/data_message_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "linux_data_message_test.json", 4 | "grids": [ 5 | ], 6 | "tests": [ 7 | { 8 | "name": "Data Message on Linux %ts", 9 | "description": "Data Message Test on Linux", 10 | "tupleSize": 1, 11 | "noOfThreads": 1, 12 | "testImpl": "DataMessageTest.js", 13 | "payload":{ 14 | "url": "http://testsite:8080/?earlyConnect=1", 15 | "retry": 2 16 | } 17 | } 18 | ], 19 | "clients": [ 20 | { 21 | "browserName": "chrome", 22 | "platform": "LINUX" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/browserCompatibilityTest/desktop/linux/meeting_end_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "linux_meeting_end.json", 4 | "grids": [ 5 | ], 6 | "tests": [ 7 | { 8 | "name": "Chime Meeting End Test on Linux %ts", 9 | "description": "Chime Meeting End Test on Linux", 10 | "tupleSize": 1, 11 | "noOfThreads": 1, 12 | "testImpl": "MeetingEndTest.js", 13 | "payload":{ 14 | "url": "http://testsite:8080/?earlyConnect=1", 15 | "retry": 2 16 | } 17 | } 18 | ], 19 | "clients": [ 20 | { 21 | "browserName": "chrome", 22 | "platform": "LINUX" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/browserCompatibilityTest/desktop/linux/video_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "linux_video.json", 4 | "grids": [ 5 | ], 6 | "tests": [ 7 | { 8 | "name": "Chime Video Test on Linux", 9 | "description":"Test video on demo meeting app on Linux", 10 | "tupleSize": 1, 11 | "noOfThreads": 1, 12 | "testImpl": "VideoTest.js", 13 | "payload":{ 14 | "url": "http://testsite:8080/?earlyConnect=1", 15 | "retry": 2 16 | } 17 | } 18 | ], 19 | "clients": [ 20 | { 21 | "browserName": "chrome", 22 | "platform": "LINUX" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/browserCompatibilityTest/desktop/meeting_leave_video_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "meeting_end_video_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Meeting Leave Video Test %ts", 8 | "description": "Meeting Leave Video Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "MeetingLeaveVideoTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2, 15 | "seleniumSessions": { 16 | "safari": 2, 17 | "ANDROID": 2 18 | } 19 | } 20 | } 21 | ], 22 | "clients": [ 23 | { 24 | "browserName": "chrome", 25 | "version": "latest", 26 | "platform": "MAC" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /integration/configs/browserCompatibilityTest/desktop/reconnection_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "reconnection_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Reconnection Test %ts", 8 | "description": "Testing app when reconnection happens ", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "ReconnectionTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/?earlyConnect=1", 14 | "retry": 2, 15 | "seleniumSessions": { 16 | "safari": 2, 17 | "ANDROID": 2 18 | } 19 | } 20 | } 21 | ], 22 | "clients": [ 23 | { 24 | "browserName": "chrome", 25 | "version": "latest", 26 | "platform": "MAC" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/app_quit_audio_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "app_quit_audio_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "App Quit Audio Test %ts", 8 | "description": "App Quit Audio Test ", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "AppQuitAudioTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2, 15 | "seleniumSessions": { 16 | "safari": 2, 17 | "ANDROID": 2 18 | } 19 | } 20 | } 21 | ], 22 | "clients": [ 23 | { 24 | "browserName": "chrome", 25 | "version": "latest", 26 | "platform": "MAC" 27 | }, 28 | { 29 | "browserName": "firefox", 30 | "version": "latest", 31 | "platform": "MAC" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/app_quit_content_share_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "app_quit_content_share_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "App Quit Content Share Test %ts", 8 | "description": "App Quit Content Share Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "AppQuitContentShareTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/app_quit_video_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "meeting_end_video_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "App Quit Video Test %ts", 8 | "description": "App Quit Video Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "AppQuitVideoTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/?earlyConnect=1", 14 | "retry": 2, 15 | "seleniumSessions": { 16 | "safari": 2, 17 | "ANDROID": 2 18 | } 19 | } 20 | } 21 | ], 22 | "clients": [ 23 | { 24 | "browserName": "chrome", 25 | "version": "latest", 26 | "platform": "MAC" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/content_share_join_later_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "content_share_join_later_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Content Share Join Later Test %ts", 8 | "description": "Test that content share can be viewed when an attendee joins after", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "ContentShareJoinLaterTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/content_share_only_allow_two_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "content_share_only_allow_two_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Content Share Only Allow Two Test %ts", 8 | "description": "Only allow two content share at the same time", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "ContentShareOnlyAllowTwoTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/content_share_screen_capture_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "content_share_screen_capture_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Content Share Screen Capture %ts", 8 | "description": "Screen sharing using content share", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "ContentShareScreenCapture.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/content_share_video_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "content_share_video_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Content Share Video Test %ts", 8 | "description": "Video sharing using content share", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "ContentShareVideoTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/data_message_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "data_message_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Data Message %ts", 8 | "description": "Data Message Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "DataMessageTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2, 15 | "seleniumSessions": { 16 | "safari": 2, 17 | "ANDROID": 2 18 | } 19 | } 20 | } 21 | ], 22 | "clients": [ 23 | { 24 | "browserName": "chrome", 25 | "version": "latest", 26 | "platform": "MAC" 27 | }, 28 | { 29 | "browserName": "firefox", 30 | "version": "latest", 31 | "platform": "MAC" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/media_capture_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "media_capture_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Media Capture Test %ts", 8 | "description": "Media Capture Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "MediaCaptureTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2, 15 | "region": "us-east-1" 16 | } 17 | } 18 | ], 19 | "clients": [ 20 | { 21 | "browserName": "chrome", 22 | "version": "latest", 23 | "platform": "MAC" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/meeting_end_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "meeting_end_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Meeting End Test %ts", 8 | "description": "Meeting End Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "MeetingEndTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | }, 24 | { 25 | "browserName": "firefox", 26 | "version": "latest", 27 | "platform": "MAC" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/meeting_leave_audio_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "meeting_leave_audio_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Meeting Leave Audio Test %ts", 8 | "description": "Meeting Leave Audio Test ", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "MeetingLeaveAudioTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2, 15 | "seleniumSessions": { 16 | "safari": 2, 17 | "ANDROID": 2 18 | } 19 | } 20 | } 21 | ], 22 | "clients": [ 23 | { 24 | "browserName": "chrome", 25 | "version": "latest", 26 | "platform": "MAC" 27 | }, 28 | { 29 | "browserName": "firefox", 30 | "version": "latest", 31 | "platform": "MAC" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/meeting_leave_content_share_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "meeting_leave_content_share_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Meeting Leave Content Share Test %ts", 8 | "description": "Meeting leave Content Share Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "MeetingLeaveContentShareTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/meeting_leave_video_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "meeting_end_video_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Meeting Leave Video Test %ts", 8 | "description": "Meeting Leave Video Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "MeetingLeaveVideoTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2, 15 | "seleniumSessions": { 16 | "safari": 2, 17 | "ANDROID": 2 18 | } 19 | } 20 | } 21 | ], 22 | "clients": [ 23 | { 24 | "browserName": "chrome", 25 | "version": "latest", 26 | "platform": "MAC" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/meeting_readiness_checker_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "meeting_readiness_checker_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Meeting readiness checker all checks pass test %ts", 8 | "description": "Meeting readiness checker all checks pass test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "MeetingReadinessCheckerRunAllTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | }, 24 | { 25 | "browserName": "firefox", 26 | "version": "latest", 27 | "platform": "MAC" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/messaging_session_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "messaging_session_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Messaging Session Test %ts", 8 | "description": "Messaging Session Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "MessagingSessionTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2, 15 | "userArn": "" 16 | } 17 | } 18 | ], 19 | "clients": [ 20 | { 21 | "browserName": "chrome", 22 | "version": "latest", 23 | "platform": "MAC" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/reconnection_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "reconnection_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Reconnection Test %ts", 8 | "description": "Testing app when reconnection happens ", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "ReconnectionTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/?earlyConnect=1", 14 | "retry": 2, 15 | "seleniumSessions": { 16 | "safari": 2, 17 | "ANDROID": 2 18 | } 19 | } 20 | } 21 | ], 22 | "clients": [ 23 | { 24 | "browserName": "chrome", 25 | "version": "latest", 26 | "platform": "MAC" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/sending_audio_events_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "sending_audio_events_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Sending Audio Failure And Recovery Test %ts", 8 | "description": "Test that sending audio failure and recovery events are published", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "SendingAudioFailureAndRecoveryTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/test_app_video_end2end_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "test_app_video_end2end_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Test App End2End Video Test %ts", 8 | "description": "Test App End2End Video Test", 9 | "tupleSize": 2, 10 | "noOfThreads": 1, 11 | "testImpl": "VideoEnd2EndTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/test_app_video_pin_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "test_app_video_pin_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Test App Video Pin Test %ts", 8 | "description": "Test App Video Pin Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "VideoPinTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/test_app_video_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "test_app_video_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Test App Video Test %ts", 8 | "description": "Test App Video Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "VideoBindingTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2 15 | } 16 | } 17 | ], 18 | "clients": [ 19 | { 20 | "browserName": "chrome", 21 | "version": "latest", 22 | "platform": "MAC" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/transcription_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "transcription_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Transcription Test %ts", 8 | "description": "Transcription Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "TranscriptionTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "region": "us-east-1", 15 | "retry": 2 16 | } 17 | } 18 | ], 19 | "clients": [ 20 | { 21 | "browserName": "chrome", 22 | "version": "latest", 23 | "platform": "MAC" 24 | }, 25 | { 26 | "browserName": "firefox", 27 | "version": "latest", 28 | "platform": "MAC" 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/video_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "video_test.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Video Test %ts", 8 | "description": "Video Test", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "VideoTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/?earlyConnect=1", 14 | "retry": 2, 15 | "seleniumSessions": { 16 | "safari": 2, 17 | "ANDROID": 2 18 | } 19 | } 20 | } 21 | ], 22 | "clients": [ 23 | { 24 | "browserName": "chrome", 25 | "version": "latest", 26 | "platform": "MAC" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/video_test_processor.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "video_test_processor.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Video Test Processor %ts", 8 | "description": "Video Test Processor", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "VideoTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2, 15 | "useVideoProcessor": true, 16 | "seleniumSessions": { 17 | "safari": 2, 18 | "ANDROID": 2 19 | } 20 | } 21 | } 22 | ], 23 | "clients": [ 24 | { 25 | "browserName": "chrome", 26 | "version": "latest", 27 | "platform": "MAC" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /integration/configs/integrationTest/video_test_simulcast.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "`": 1, 3 | "name": "video_test_simulcast.config.json %ts", 4 | "grids": [], 5 | "tests": [ 6 | { 7 | "name": "Video Test Simulcast %ts", 8 | "description": "Video Test Simulcast", 9 | "tupleSize": 1, 10 | "noOfThreads": 1, 11 | "testImpl": "VideoTest.js", 12 | "payload": { 13 | "url": "http://localhost:8080/", 14 | "retry": 2, 15 | "useSimulcast": true, 16 | "seleniumSessions": { 17 | "safari": 2, 18 | "ANDROID": 2 19 | } 20 | } 21 | } 22 | ], 23 | "clients": [ 24 | { 25 | "browserName": "chrome", 26 | "version": "latest", 27 | "platform": "MAC" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /integration/js/app/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /integration/js/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "video_test", 3 | "version": "1.0.0", 4 | "description": "Mini Test App for running video Api integ tests", 5 | "scripts": { 6 | "deps": "cd ../../.. && npm run build", 7 | "build:fast": "tsc && webpack --config ./webpack.config.js", 8 | "build": "npm run deps && npm install && npm run build:fast", 9 | "start:fast": "npm run build:fast && node server.js", 10 | "start": "npm run deps && npm install && npm run start:fast" 11 | }, 12 | "devDependencies": { 13 | "html-webpack-plugin": "^5.3.2", 14 | "ts-loader": "^9.1.1", 15 | "typescript": "^4.2.4", 16 | "webpack": "^5.96.1", 17 | "webpack-cli": "^4.8.0" 18 | }, 19 | "dependencies": { 20 | "@aws-sdk/client-chime-sdk-meetings": "^3.687.0", 21 | "amazon-chime-sdk-js": "file:../../.." 22 | }, 23 | "license": "Apache-2.0", 24 | "repository": { 25 | "type": "git", 26 | "url": "git://github.com/aws/amazon-chime-sdk-js" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /integration/js/app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../config/tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./build", 5 | "rootDir": "../../.." 6 | }, 7 | "include": [ 8 | "./**/*" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /integration/js/checks/AddVideoTileCheck.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | const {KiteTestError, Status} = require('kite-common'); 3 | 4 | class AddVideoTileCheck extends AppTestStep { 5 | 6 | constructor(kiteBaseTest, sessionInfo, tileId) { 7 | super(kiteBaseTest, sessionInfo); 8 | this.tileId = tileId; 9 | } 10 | 11 | static async executeStep(KiteBaseTest, sessionInfo, tileId) { 12 | const step = new AddVideoTileCheck(KiteBaseTest, sessionInfo, tileId); 13 | await step.execute(KiteBaseTest); 14 | } 15 | 16 | stepDescription() { 17 | return 'Check tileId returned by AddVideoTile'; 18 | } 19 | 20 | async run() { 21 | const addVideoTileCheckPassed = await this.page.addVideoTileCheck(this.tileId); 22 | if (!addVideoTileCheckPassed) { 23 | throw new KiteTestError(Status.FAILED, `TileId ${this.tileId} was not correct`); 24 | } 25 | } 26 | } 27 | 28 | module.exports = AddVideoTileCheck; 29 | -------------------------------------------------------------------------------- /integration/js/checks/RosterCheckConfig.js: -------------------------------------------------------------------------------- 1 | 2 | class RosterCheckConfig { 3 | constructor(checkCount = 10, waitTimeMs = 2000){ 4 | this.checkCount = checkCount; 5 | this.waitTimeMs = waitTimeMs; 6 | } 7 | } 8 | 9 | module.exports = RosterCheckConfig; 10 | -------------------------------------------------------------------------------- /integration/js/checks/UserAuthenticationCheck.js: -------------------------------------------------------------------------------- 1 | const { KiteTestError, Status } = require('kite-common'); 2 | const AppTestStep = require('../utils/AppTestStep'); 3 | 4 | class UserAuthenticationCheck extends AppTestStep { 5 | constructor(kiteBaseTest, sessionInfo) { 6 | super(kiteBaseTest, sessionInfo); 7 | } 8 | 9 | static async executeStep(KiteBaseTest, sessionInfo) { 10 | const step = new UserAuthenticationCheck(KiteBaseTest, sessionInfo); 11 | await step.execute(KiteBaseTest); 12 | } 13 | 14 | stepDescription() { 15 | return 'Check if the user has authenticated'; 16 | } 17 | 18 | metricName() { 19 | return 'UserAuthenticationCheck' 20 | } 21 | 22 | async run() { 23 | let authenticated = await this.page.checkIfMeetingAuthenticated(); 24 | if (authenticated === false) { 25 | throw new KiteTestError(Status.FAILED, 'Authentication failed'); 26 | } 27 | } 28 | } 29 | 30 | module.exports = UserAuthenticationCheck; 31 | -------------------------------------------------------------------------------- /integration/js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sdk-integration-tests", 3 | "version": "1.0.0", 4 | "description": "", 5 | "scripts": { 6 | "clean": "rm -rf temp && rm -rf ../kite-allure-reports && rm -rf logs", 7 | "test": "npm install && ./script/run-test" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "aws-sdk": "^2.1152.0", 13 | "axios": "^0.28.1", 14 | "express": "^4.17.1", 15 | "js-base64": "^2.5.1", 16 | "kite-common": "^0.1.8", 17 | "selenium-webdriver": "^4.0.0-alpha.5", 18 | "socket.io": "^4.8.1", 19 | "uuid": "^8.2.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /integration/js/pages/index.js: -------------------------------------------------------------------------------- 1 | exports.AppPage = require('./AppPage'); 2 | exports.MeetingReadinessCheckerPage = require('./MeetingReadinessCheckerPage'); 3 | exports.MessagingSessionPage = require('./MessagingSessionPage'); 4 | exports.TestAppPage = require('./TestAppPage'); 5 | -------------------------------------------------------------------------------- /integration/js/script/install-kite: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -o xtrace 3 | 4 | mkdir GitHub 5 | cd GitHub 6 | git clone https://github.com/webrtc/KITE.git 7 | cd KITE 8 | git checkout e9296165cd24bea92cddb59f2bf211c99f764d58 9 | 10 | wget https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip 11 | unzip apache-maven-3.6.3-bin.zip 12 | mv apache-maven-3.6.3 ~ 13 | rm -f apache-maven-3.6.3-bin.zip 14 | #This is a temporary hack since maven 3.8.1 which is the default for GitHub Action VM does not work with kite 15 | export PATH=~/apache-maven-3.6.3/bin:$PATH 16 | source ~/.bashrc 17 | echo `mvn --version` 18 | 19 | chmod +x configureLinux.sh 20 | yes n | ./configureLinux.sh 21 | 22 | cd KITE-AppRTC-Test 23 | ../scripts/linux/path/c all -------------------------------------------------------------------------------- /integration/js/steps/ClickAddVideoTileButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickAddVideotileButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickAddVideotileButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click addVideoTile button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickAddVideoTileButton(); 19 | this.finished('add_video_tile'); 20 | } 21 | } 22 | 23 | module.exports = ClickAddVideotileButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/ClickBackgroundBlurButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickBackgroundBlurButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickBackgroundBlurButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click Background blur button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickVideoFilterDropButton(); 19 | await this.page.clickBackgroundBlurFilterFromDropDownMenu(); 20 | } 21 | } 22 | 23 | module.exports = ClickBackgroundBlurButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/ClickBackgroundReplacementButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickBackgroundReplacementButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickBackgroundReplacementButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click Background replacement button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickVideoFilterDropButton(); 19 | await this.page.clickBackgroundReplacementFilterFromDropDownMenu(); 20 | } 21 | } 22 | 23 | module.exports = ClickBackgroundReplacementButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/ClickBindVideoElementButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickBindVideoElementButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo, tile_id, video_element_id) { 5 | super(kiteBaseTest, sessionInfo); 6 | this.tile_id = tile_id; 7 | this.video_element_id = video_element_id; 8 | } 9 | 10 | static async executeStep(KiteBaseTest, sessionInfo, tile_id, video_element_id) { 11 | const step = new ClickBindVideoElementButton(KiteBaseTest, sessionInfo, tile_id, video_element_id); 12 | await step.execute(KiteBaseTest); 13 | } 14 | 15 | stepDescription() { 16 | return 'Click BindVideoElement button'; 17 | } 18 | 19 | async run() { 20 | await this.page.clickBindVideoElementButton(this.tile_id, this.video_element_id); 21 | this.finished('bind_video_element') 22 | } 23 | } 24 | 25 | module.exports = ClickBindVideoElementButton; 26 | -------------------------------------------------------------------------------- /integration/js/steps/ClickGetAllRemoteVideoTilesButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickGetAllRemoteVideoTilesButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickGetAllRemoteVideoTilesButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click getAllRemoteVideoTiles button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickGetAllRemoteVideoTilesButton(); 19 | this.finished('get_all_remote_video_tiles'); 20 | } 21 | } 22 | 23 | module.exports = ClickGetAllRemoteVideoTilesButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/ClickGetAllVideoTilesButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickGetAllVideoTilesButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickGetAllVideoTilesButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click getAllVideoTiles button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickGetAllVideoTilesButton(); 19 | this.finished('get_all_video_tiles'); 20 | } 21 | } 22 | 23 | module.exports = ClickGetAllVideoTilesButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/ClickGetLocalVideoTileButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickGetLocalVideoTileButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickGetLocalVideoTileButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click getLocalVideoTile button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickGetLocalVideoTileButton(); 19 | this.finished('get_local_video_tile'); 20 | } 21 | } 22 | 23 | module.exports = ClickGetLocalVideoTileButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/ClickHasStartedLocalVideoTileButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickHasStartedLocalVideoTileButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickHasStartedLocalVideoTileButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click hasStartedLocalVideoTile button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickHasStartedLocalVideoTileButton(); 19 | this.finished('has_started_local_video_tile'); 20 | } 21 | } 22 | 23 | module.exports = ClickHasStartedLocalVideoTileButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/ClickHaveVideoTileForAttendeeIdButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickHaveVideoTileForAttendeeIdButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo, attendeeId) { 5 | super(kiteBaseTest, sessionInfo, attendeeId); 6 | this.attendeeId = attendeeId; 7 | } 8 | 9 | static async executeStep(KiteBaseTest, sessionInfo, attendeeId) { 10 | const step = new ClickHaveVideoTileForAttendeeIdButton(KiteBaseTest, sessionInfo, attendeeId); 11 | await step.execute(KiteBaseTest); 12 | } 13 | 14 | stepDescription() { 15 | return 'Click haveVideoTileForAttendeeId button'; 16 | } 17 | 18 | async run() { 19 | await this.page.clickHaveVideoTileForAttendeeIdButton(this.attendeeId); 20 | this.finished('have_video_tile_for_attendeeId'); 21 | } 22 | } 23 | 24 | module.exports = ClickHaveVideoTileForAttendeeIdButton; 25 | -------------------------------------------------------------------------------- /integration/js/steps/ClickHaveVideoTilesWithStreamsButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickHaveVideoTilesWithStreamsButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickHaveVideoTilesWithStreamsButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click HaveVideoTilesWithStreams button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickHaveVideoTilesWithStreamsButton(); 19 | this.finished('have_video_tiles_with_streams'); 20 | } 21 | } 22 | 23 | module.exports = ClickHaveVideoTilesWithStreamsButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/ClickMediaCaptureButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickMediaCaptureButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickMediaCaptureButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click media capture button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickMediaCaptureButton(); 19 | } 20 | } 21 | 22 | module.exports = ClickMediaCaptureButton; 23 | -------------------------------------------------------------------------------- /integration/js/steps/ClickMicrophoneButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickMicrophoneButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo, testType) { 5 | super(kiteBaseTest, sessionInfo); 6 | this.testType = testType; 7 | } 8 | 9 | static async executeStep(KiteBaseTest, sessionInfo, testType) { 10 | const step = new ClickMicrophoneButton(KiteBaseTest, sessionInfo, testType); 11 | await step.execute(KiteBaseTest); 12 | } 13 | 14 | stepDescription() { 15 | return 'Click microphone button'; 16 | } 17 | 18 | async run() { 19 | await this.page.clickMicrophoneButton(); 20 | const message = this.testType === "ON" ? 'audio_start' : 'audio_stop'; 21 | this.finished(message) 22 | } 23 | } 24 | 25 | module.exports = ClickMicrophoneButton; 26 | -------------------------------------------------------------------------------- /integration/js/steps/ClickPinVideoTileButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickPinVideoTileButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo, attendee_id) { 5 | super(kiteBaseTest, sessionInfo); 6 | this.attendee_id = attendee_id; 7 | } 8 | 9 | static async executeStep(KiteBaseTest, sessionInfo, attendee_id) { 10 | const step = new ClickPinVideoTileButton(KiteBaseTest, sessionInfo, attendee_id); 11 | await step.execute(KiteBaseTest); 12 | } 13 | 14 | stepDescription() { 15 | return 'Click PinVideoTile button'; 16 | } 17 | 18 | async run() { 19 | await this.page.clickPinVideoTileButton(this.attendee_id); 20 | this.finished('pin_video_tile') 21 | } 22 | } 23 | 24 | module.exports = ClickPinVideoTileButton; -------------------------------------------------------------------------------- /integration/js/steps/ClickRemoveAllVideoTilesButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickRemoveAllVideoTilesButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickRemoveAllVideoTilesButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click removeAllVideoTiles button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickRemoveAllVideoTilesButton(); 19 | this.finished('remove_all_video_tiles'); 20 | } 21 | } 22 | 23 | module.exports = ClickRemoveAllVideoTilesButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/ClickStartLocalVideoButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickStartLocalVideoButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickStartLocalVideoButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click start local video tile button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickStartLocalVideoButton(); 19 | this.test.numVideoRemoteOn++; 20 | this.finished('start_local_video_tile'); 21 | } 22 | } 23 | 24 | module.exports = ClickStartLocalVideoButton; 25 | -------------------------------------------------------------------------------- /integration/js/steps/ClickStopLocalVideoButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickStopLocalVideoButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickStopLocalVideoButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click stop local video tile button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickStopLocalVideoButton(); 19 | this.test.numVideoRemoteOff++; 20 | this.finished('stop_local_video_tile'); 21 | } 22 | } 23 | 24 | module.exports = ClickStopLocalVideoButton; 25 | -------------------------------------------------------------------------------- /integration/js/steps/ClickUnbindVideoElementButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickUnbindVideoElementButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo, tile_id) { 5 | super(kiteBaseTest, sessionInfo); 6 | this.tile_id = tile_id; 7 | } 8 | 9 | static async executeStep(KiteBaseTest, sessionInfo, tile_id) { 10 | const step = new ClickUnbindVideoElementButton(KiteBaseTest, sessionInfo, tile_id); 11 | await step.execute(KiteBaseTest); 12 | } 13 | 14 | stepDescription() { 15 | return 'Click unbindVideoElement button'; 16 | } 17 | 18 | async run() { 19 | await this.page.clickUnbindVideoElementButton(this.tile_id); 20 | this.finished('unbind_video_element') 21 | } 22 | } 23 | 24 | module.exports = ClickUnbindVideoElementButton; 25 | -------------------------------------------------------------------------------- /integration/js/steps/ClickUnpinVideoTileButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickUnpinVideoTileButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo, attendee_id) { 5 | super(kiteBaseTest, sessionInfo); 6 | this.attendee_id = attendee_id; 7 | } 8 | 9 | static async executeStep(KiteBaseTest, sessionInfo, attendee_id) { 10 | const step = new ClickUnpinVideoTileButton(KiteBaseTest, sessionInfo, attendee_id); 11 | await step.execute(KiteBaseTest); 12 | } 13 | 14 | stepDescription() { 15 | return 'Click UnpinVideoTile button'; 16 | } 17 | 18 | async run() { 19 | await this.page.clickUnpinVideoTileButton(this.attendee_id); 20 | this.finished('unpin_video_tile') 21 | } 22 | } 23 | 24 | module.exports = ClickUnpinVideoTileButton; 25 | -------------------------------------------------------------------------------- /integration/js/steps/ClickVideoButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickVideoButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickVideoButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click video button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickCameraButton(); 19 | } 20 | } 21 | 22 | module.exports = ClickVideoButton; 23 | -------------------------------------------------------------------------------- /integration/js/steps/ClickVideoFilterButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickVideoFilterButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickVideoFilterButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click VideoProcessor button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickVideoFilterDropButton(); 19 | await this.page.clickVideoFilterFromDropDownMenu(); 20 | } 21 | } 22 | 23 | module.exports = ClickVideoFilterButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/ClickVideoFxBackgroundBlurButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickVideoFxBackgroundBlurButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickVideoFxBackgroundBlurButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click Video Fx Background Blur button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickVideoFilterDropButton(); 19 | await this.page.clickVideoFxBackgroundBlurFilterFromDropDownMenu(); 20 | } 21 | } 22 | 23 | module.exports = ClickVideoFxBackgroundBlurButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/ClickVideoFxBackgroundReplacementButton.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class ClickVideoFxBackgroundReplacementButton extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new ClickVideoFxBackgroundReplacementButton(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Click Video Fx Background Replacement button'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickVideoFilterDropButton(); 19 | await this.page.clickVideoFxBackgroundReplacementFilterFromDropDownMenu(); 20 | } 21 | } 22 | 23 | module.exports = ClickVideoFxBackgroundReplacementButton; 24 | -------------------------------------------------------------------------------- /integration/js/steps/CloseAppStep.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class CloseAppStep extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new CloseAppStep(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Close app'; 15 | } 16 | 17 | async run() { 18 | this.logger(`Closing : ${this.url}`); 19 | await this.page.close(this); 20 | } 21 | } 22 | 23 | module.exports = CloseAppStep; 24 | -------------------------------------------------------------------------------- /integration/js/steps/GetBoundAttendeeIdStep.js: -------------------------------------------------------------------------------- 1 | const {KiteTestError, Status} = require('kite-common'); 2 | const AppTestStep = require('../utils/AppTestStep'); 3 | 4 | class GetBoundAttendeeIdStep extends AppTestStep { 5 | constructor(kiteBaseTest, sessionInfo) { 6 | super(kiteBaseTest, sessionInfo); 7 | } 8 | 9 | static async executeStep(KiteBaseTest, sessionInfo) { 10 | const step = new GetBoundAttendeeIdStep(KiteBaseTest, sessionInfo); 11 | await step.execute(KiteBaseTest); 12 | } 13 | 14 | stepDescription() { 15 | return 'get boundAttendeeId Step'; 16 | } 17 | 18 | metricName() { 19 | return 'GetBoundAttendeeId' 20 | } 21 | 22 | async run() { 23 | let boundAttendeeId = await this.page.getBoundAttendeeIdStep(); 24 | this.test.boundAttendeeId = boundAttendeeId; 25 | } 26 | } 27 | 28 | module.exports = GetBoundAttendeeIdStep; 29 | -------------------------------------------------------------------------------- /integration/js/steps/LeaveMeetingStep.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class LeaveMeetingStep extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new LeaveMeetingStep(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Leave the meeting'; 15 | } 16 | 17 | async run() { 18 | await this.page.leaveTheMeeting(); 19 | } 20 | } 21 | 22 | module.exports = LeaveMeetingStep; 23 | -------------------------------------------------------------------------------- /integration/js/steps/OpenAppStep.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class OpenAppStep extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new OpenAppStep(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Open app'; 15 | } 16 | 17 | async run() { 18 | this.logger(`Opening : ${this.url}`); 19 | await this.page.open(this); 20 | } 21 | } 22 | 23 | module.exports = OpenAppStep; 24 | -------------------------------------------------------------------------------- /integration/js/steps/OpenMeetingReadinessCheckerAppStep.js: -------------------------------------------------------------------------------- 1 | const {KiteTestError, Status} = require('kite-common'); 2 | const { v4: uuidv4 } = require('uuid'); 3 | const AppTestStep = require('../utils/AppTestStep'); 4 | 5 | class OpenMeetingReadinessCheckerAppStep extends AppTestStep { 6 | constructor(kiteBaseTest, sessionInfo) { 7 | super(kiteBaseTest, sessionInfo); 8 | } 9 | 10 | static async executeStep(KiteBaseTest, sessionInfo) { 11 | const step = new OpenMeetingReadinessCheckerAppStep(KiteBaseTest, sessionInfo); 12 | await step.execute(KiteBaseTest); 13 | } 14 | 15 | stepDescription() { 16 | return 'Open meeting readiness checker app'; 17 | } 18 | 19 | async run() { 20 | this.logger(`Opening : ${this.url}`); 21 | await this.page.open(this); 22 | } 23 | } 24 | 25 | module.exports = OpenMeetingReadinessCheckerAppStep; 26 | -------------------------------------------------------------------------------- /integration/js/steps/OpenMessagingSessionAppStep.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class OpenMessagingSessionAppStep extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new OpenMessagingSessionAppStep(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Open messaging session app'; 15 | } 16 | 17 | async run() { 18 | this.logger(`Opening : ${this.url}`); 19 | await this.page.open(this); 20 | } 21 | } 22 | 23 | module.exports = OpenMessagingSessionAppStep; 24 | -------------------------------------------------------------------------------- /integration/js/steps/PlayEchoStep.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class PlayEchoStep extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new PlayEchoStep(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Start Echo Effect'; 15 | } 16 | 17 | metricName() { 18 | return 'PlayEchoStep'; 19 | } 20 | 21 | async run() { 22 | await this.page.clickOnMicrophoneDropDownButton(); 23 | await this.page.playEcho(); 24 | this.finished("echo_start"); 25 | } 26 | } 27 | 28 | module.exports = PlayEchoStep; 29 | -------------------------------------------------------------------------------- /integration/js/steps/PlayPrerecordedSpeechStep.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class PlayPrerecordedSpeechStep extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo, useMedical) { 9 | const step = new PlayPrerecordedSpeechStep(KiteBaseTest, sessionInfo, useMedical); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Start playing prerecorded speech from microphone dropdown menu'; 15 | } 16 | 17 | metricName() { 18 | return 'PlayPrerecordedSpeechStep'; 19 | } 20 | 21 | async run() { 22 | await this.page.clickOnMicrophoneDropDownButton(); 23 | await this.page.playPrerecordedSpeech(); 24 | this.finished("prerecorded_speech_start"); 25 | } 26 | } 27 | 28 | module.exports = PlayPrerecordedSpeechStep; 29 | -------------------------------------------------------------------------------- /integration/js/steps/Reconnect.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class Reconnect extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new Reconnect(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Trigger reconnection'; 15 | } 16 | 17 | async run() { 18 | await this.page.triggerReconnection(); 19 | } 20 | } 21 | 22 | module.exports = Reconnect; 23 | -------------------------------------------------------------------------------- /integration/js/steps/SelectNoAudioInputStep.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class SelectNoAudioInputStep extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new SelectNoAudioInputStep(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Select No Audio in the microphone dropdown menu'; 15 | } 16 | 17 | metricName() { 18 | return 'SelectNoAudioInputStep'; 19 | } 20 | 21 | async run() { 22 | await this.page.clickOnMicrophoneDropDownButton(); 23 | await this.page.selectNoAudioInput(); 24 | this.finished("selected_no_audio_input"); 25 | } 26 | } 27 | 28 | module.exports = SelectNoAudioInputStep; 29 | -------------------------------------------------------------------------------- /integration/js/steps/SelectNoneAudioInputStep.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class SelectNoneAudioInputStep extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo, useMedical) { 9 | const step = new SelectNoneAudioInputStep(KiteBaseTest, sessionInfo, useMedical); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Select None in the microphone dropdown menu'; 15 | } 16 | 17 | metricName() { 18 | return 'SelectNoneAudioInputStep'; 19 | } 20 | 21 | async run() { 22 | await this.page.clickOnMicrophoneDropDownButton(); 23 | await this.page.selectNoneAudioInput(); 24 | this.finished("audio_none_start"); 25 | } 26 | } 27 | 28 | module.exports = SelectNoneAudioInputStep; 29 | -------------------------------------------------------------------------------- /integration/js/steps/SendDataMessage.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class SendDataMessage extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo, message) { 5 | super(kiteBaseTest, sessionInfo); 6 | this.message = message; 7 | } 8 | 9 | static async executeStep(KiteBaseTest, sessionInfo, message) { 10 | const step = new SendDataMessage(KiteBaseTest, sessionInfo, message); 11 | await step.execute(KiteBaseTest); 12 | } 13 | 14 | stepDescription() { 15 | return 'Send a data message: ' + this.message; 16 | } 17 | 18 | async run() { 19 | await this.page.sendDataMessage(this.message); 20 | } 21 | } 22 | 23 | module.exports = SendDataMessage; 24 | -------------------------------------------------------------------------------- /integration/js/steps/SetTestBrokenStep.js: -------------------------------------------------------------------------------- 1 | const {KiteTestError, Status} = require('kite-common'); 2 | const AppTestStep = require('../utils/AppTestStep'); 3 | 4 | class SetTestBrokenStep extends AppTestStep { 5 | constructor(kiteBaseTest, errorMessage) { 6 | super(kiteBaseTest); 7 | this.errorMessage = errorMessage; 8 | } 9 | 10 | stepDescription() { 11 | return 'Setting test to broken'; 12 | } 13 | 14 | static async executeStep(KiteBaseTest, errorMessage) { 15 | const step = new SetTestBrokenStep(KiteBaseTest, errorMessage); 16 | await step.execute(KiteBaseTest); 17 | } 18 | 19 | async step() { 20 | throw new KiteTestError(Status.BROKEN, this.errorMessage); 21 | } 22 | 23 | async finish() { 24 | this.report.setName(this.stepDescription()); 25 | this.report.setDescription(this.stepDescription()); 26 | this.report.setStopTimestamp(); 27 | } 28 | } 29 | 30 | module.exports = SetTestBrokenStep; 31 | -------------------------------------------------------------------------------- /integration/js/steps/StartAmazonVoiceFocusStep.js: -------------------------------------------------------------------------------- 1 | const AppTestStep = require('../utils/AppTestStep'); 2 | 3 | class StartAmazonVoiceFocus extends AppTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new StartAmazonVoiceFocus(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Start Amazon Voice Focus'; 15 | } 16 | 17 | async run() { 18 | await this.page.clickOnMicrophoneDropDownButton(); 19 | await this.page.clickStartAmazonVoiceFocus(); 20 | } 21 | } 22 | 23 | module.exports = StartAmazonVoiceFocus; 24 | -------------------------------------------------------------------------------- /integration/js/steps/StartMeetingReadinessCheckerStep.js: -------------------------------------------------------------------------------- 1 | const {KiteTestError, Status, TestUtils} = require('kite-common'); 2 | const AppTestStep = require('../utils/AppTestStep'); 3 | 4 | class StartMeetingReadinessCheckerStep extends AppTestStep { 5 | constructor(kiteBaseTest, sessionInfo) { 6 | super(kiteBaseTest, sessionInfo); 7 | } 8 | 9 | static async executeStep(KiteBaseTest, sessionInfo) { 10 | const step = new StartMeetingReadinessCheckerStep(KiteBaseTest, sessionInfo); 11 | await step.execute(KiteBaseTest); 12 | } 13 | 14 | stepDescription() { 15 | return 'Start meeting readiness checker'; 16 | } 17 | 18 | metricName() { 19 | return 'StartMeetingReadinessChecker' 20 | } 21 | 22 | async run() { 23 | await this.page.startCheck(); 24 | } 25 | } 26 | 27 | module.exports = StartMeetingReadinessCheckerStep; 28 | -------------------------------------------------------------------------------- /integration/js/steps/WaitForContentShareTestToBeReady.js: -------------------------------------------------------------------------------- 1 | const {KiteTestError, Status, TestUtils} = require('kite-common'); 2 | const AsyncAppWaitTestStep = require('../utils/AsyncAppWaitTestStep'); 3 | 4 | class WaitForContentShareTestToBeReady extends AsyncAppWaitTestStep { 5 | constructor(kiteBaseTest, sessionInfo) { 6 | super(kiteBaseTest, sessionInfo); 7 | } 8 | 9 | static async executeStep(KiteBaseTest, sessionInfo) { 10 | const step = new WaitForContentShareTestToBeReady(KiteBaseTest, sessionInfo); 11 | await step.execute(KiteBaseTest); 12 | } 13 | 14 | stepDescription() { 15 | return 'Waiting for content share test to be ready'; 16 | } 17 | 18 | async waitCompleteCondition() { 19 | return await this.page.isTestContentShareConnectivityButtonEnabled() 20 | } 21 | 22 | waitCompleteMessage() { 23 | this.logger('Content share connectivity check enabled'); 24 | } 25 | } 26 | 27 | module.exports = WaitForContentShareTestToBeReady; 28 | -------------------------------------------------------------------------------- /integration/js/steps/WaitForMeetingToBeCreated.js: -------------------------------------------------------------------------------- 1 | const {KiteTestError, Status, TestUtils} = require('kite-common'); 2 | const AppWaitTestStep = require('../utils/AppWaitTestStep'); 3 | 4 | class WaitForMeetingToBeCreated extends AppWaitTestStep { 5 | constructor(kiteBaseTest, sessionInfo) { 6 | super(kiteBaseTest, sessionInfo); 7 | } 8 | 9 | static async executeStep(KiteBaseTest, sessionInfo) { 10 | const step = new WaitForMeetingToBeCreated(KiteBaseTest, sessionInfo); 11 | await step.execute(KiteBaseTest); 12 | } 13 | 14 | stepDescription() { 15 | return 'Waiting for meeting to be created'; 16 | } 17 | 18 | waitCompleteCondition() { 19 | return this.test.meetingCreated === true 20 | } 21 | 22 | waitCompleteMessage() { 23 | this.logger("Meeting created"); 24 | } 25 | } 26 | 27 | module.exports = WaitForMeetingToBeCreated; 28 | -------------------------------------------------------------------------------- /integration/js/steps/WaitForRemoteParticipantsToJoinMeeting.js: -------------------------------------------------------------------------------- 1 | const AppWaitTestStep = require('../utils/AppWaitTestStep'); 2 | 3 | class WaitForRemoteParticipantsToJoinMeeting extends AppWaitTestStep { 4 | constructor(kiteBaseTest, sessionInfo) { 5 | super(kiteBaseTest, sessionInfo); 6 | } 7 | 8 | static async executeStep(KiteBaseTest, sessionInfo) { 9 | const step = new WaitForRemoteParticipantsToJoinMeeting(KiteBaseTest, sessionInfo); 10 | await step.execute(KiteBaseTest); 11 | } 12 | 13 | stepDescription() { 14 | return 'Waiting for other participants to join the meeting'; 15 | } 16 | 17 | waitCompleteCondition() { 18 | return this.test.numRemoteJoined.toString() === this.numberOfParticipant 19 | } 20 | 21 | waitCompleteMessage() { 22 | return "all remote participants present" 23 | } 24 | 25 | } 26 | 27 | module.exports = WaitForRemoteParticipantsToJoinMeeting; 28 | -------------------------------------------------------------------------------- /integration/js/utils/PageUtil.js: -------------------------------------------------------------------------------- 1 | const clickElement = async (driver, element) => { 2 | await driver.executeScript("arguments[0].click();", element); 3 | } 4 | 5 | module.exports.clickElement = clickElement; -------------------------------------------------------------------------------- /integration/js/utils/SdkTestUtils.js: -------------------------------------------------------------------------------- 1 | const {OpenAppStep, JoinMeetingStep, AuthenticateUserStep} = require('../steps'); 2 | const {UserJoinedMeetingCheck, UserAuthenticationCheck} = require('../checks'); 3 | 4 | class SdkTestUtils { 5 | static async addUserToMeeting(test, attendee_id, sessionInfo, region='') { 6 | await OpenAppStep.executeStep(test, sessionInfo); 7 | await AuthenticateUserStep.executeStep(test, sessionInfo, attendee_id, region); 8 | await UserAuthenticationCheck.executeStep(test, sessionInfo); 9 | await JoinMeetingStep.executeStep(test, sessionInfo); 10 | await UserJoinedMeetingCheck.executeStep(test, sessionInfo, attendee_id); 11 | } 12 | } 13 | 14 | module.exports.SdkTestUtils = SdkTestUtils; -------------------------------------------------------------------------------- /integration/mocha-tests/configs/browserCompatibilityTest/desktop/sample_test.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "clients": [ 3 | { 4 | "browserName": "chrome", 5 | "browserVersion": "latest", 6 | "platform": "MAC" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /integration/mocha-tests/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6" 5 | }, 6 | "exclude": ["node_modules", "**/node_modules/*"] 7 | } -------------------------------------------------------------------------------- /integration/mocha-tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sdk-integration-tests", 3 | "version": "1.0.0", 4 | "description": "", 5 | "scripts": { 6 | "test": "npm install && node ./script/run-test", 7 | "lint": "eslint --config eslintrc.json ./ --ext .ts,.tsx,.js --fix" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "aws-sdk": "^2.1144.0", 13 | "chalk": "^4.1.2", 14 | "selenium-webdriver": "^4.32.0", 15 | "uuid": "^8.3.2" 16 | }, 17 | "mocha": { 18 | "timeout": 300000 19 | }, 20 | "devDependencies": { 21 | "mocha-steps": "^1.3.0" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /integration/mocha-tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "./tests/*" 4 | ], 5 | "compilerOptions": { 6 | "declaration": true, 7 | "downlevelIteration": true, 8 | "experimentalDecorators": true, 9 | "lib": [ 10 | "DOM", 11 | "ES2015", 12 | "ES2016.Array.Include", 13 | "ES2017.SharedMemory" 14 | ], 15 | "module": "commonjs", 16 | "noImplicitAny": true, 17 | "noUnusedLocals": true, 18 | "sourceMap": true, 19 | "stripInternal": true, 20 | "target": "ES2015", 21 | }, 22 | } 23 | -------------------------------------------------------------------------------- /libs/voicefocus/fetch.d.ts: -------------------------------------------------------------------------------- 1 | import { VoiceFocusFetchBehavior } from './types'; 2 | export declare function fetchWithBehavior(url: string, init?: RequestInit, fetchBehavior?: VoiceFocusFetchBehavior): Promise; 3 | export declare function withRequestHeaders(init?: RequestInit, fetchBehavior?: VoiceFocusFetchBehavior): RequestInit | undefined; 4 | export declare function withQueryString(url: string, fetchBehavior?: VoiceFocusFetchBehavior): string; 5 | export declare function addQueryParams(fetchBehavior: VoiceFocusFetchBehavior | undefined, queryParams: { 6 | [key: string]: string; 7 | }): VoiceFocusFetchBehavior | undefined; 8 | export declare function resolveURL(url: string, fetchBehavior?: VoiceFocusFetchBehavior): Promise; 9 | export declare function isValidAssetGroup(assetGroup: string): boolean; 10 | export declare function isValidRevisionID(revisionID: string): boolean; 11 | -------------------------------------------------------------------------------- /libs/voicefocus/loader.d.ts: -------------------------------------------------------------------------------- 1 | import { Logger, VoiceFocusFetchBehavior } from './types.js'; 2 | export declare const loadWorker: (workerURL: string, name: string, fetchBehavior: VoiceFocusFetchBehavior, logger?: Logger | undefined) => Promise; 3 | -------------------------------------------------------------------------------- /libs/voicefocus/types.js: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | "use strict"; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.VoiceFocusAudioWorkletNode = void 0; 7 | class VoiceFocusAudioWorkletNode extends ((typeof globalThis !== 'undefined' && globalThis['AudioWorkletNode']) || 8 | class Sadness { 9 | }) { 10 | } 11 | exports.VoiceFocusAudioWorkletNode = VoiceFocusAudioWorkletNode; 12 | -------------------------------------------------------------------------------- /libs/voicefocus/worklet-inline-node.d.ts: -------------------------------------------------------------------------------- 1 | import { ProcessorMessage, VoiceFocusAudioWorkletNode, VoiceFocusNodeOptions, WorkerMessage } from './types.js'; 2 | declare class VoiceFocusInlineNode extends VoiceFocusAudioWorkletNode { 3 | private delegate?; 4 | private worker; 5 | private logger; 6 | private cpuWarningLastTriggered; 7 | private cpuWarningCount; 8 | constructor(context: AudioContext, options: VoiceFocusNodeOptions); 9 | onModuleBufferLoaded(buffer: ArrayBuffer, key: string): void; 10 | onModuleLoaded(module: WebAssembly.Module, key: string): void; 11 | enable(): Promise; 12 | disable(): Promise; 13 | stop(): Promise; 14 | onProcessorMessage(event: ProcessorMessage): void; 15 | onWorkerMessage(event: WorkerMessage): void; 16 | } 17 | export default VoiceFocusInlineNode; 18 | -------------------------------------------------------------------------------- /libs/voicefocus/worklet-worker-postMessage-node.d.ts: -------------------------------------------------------------------------------- 1 | import { ProcessorMessage, VoiceFocusAudioWorkletNode, VoiceFocusNodeOptions, WorkerMessage } from './types.js'; 2 | declare class VoiceFocusWorkerPostMessageNode extends VoiceFocusAudioWorkletNode { 3 | private worker; 4 | private delegate?; 5 | constructor(context: AudioContext, options: VoiceFocusNodeOptions); 6 | enable(): Promise; 7 | disable(): Promise; 8 | stop(): Promise; 9 | onWorkerMessage(event: WorkerMessage): void; 10 | onProcessorMessage(event: ProcessorMessage): void; 11 | } 12 | export default VoiceFocusWorkerPostMessageNode; 13 | -------------------------------------------------------------------------------- /libs/voicefocus/worklet-worker-sab-node.d.ts: -------------------------------------------------------------------------------- 1 | import { ProcessorMessage, VoiceFocusAudioWorkletNode, VoiceFocusNodeOptions, WorkerMessage } from './types.js'; 2 | declare class VoiceFocusWorkerBufferNode extends VoiceFocusAudioWorkletNode { 3 | private worker; 4 | private delegate?; 5 | private state; 6 | constructor(context: AudioContext, options: VoiceFocusNodeOptions); 7 | enable(): Promise; 8 | disable(): Promise; 9 | stop(): Promise; 10 | onWorkerMessage(event: WorkerMessage): void; 11 | onProcessorMessage(event: ProcessorMessage): void; 12 | } 13 | export default VoiceFocusWorkerBufferNode; 14 | -------------------------------------------------------------------------------- /script/audit-deps: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | def verbose command 4 | puts("--> #{command}") || system(command) || fail("Failed: #{command}") 5 | end 6 | 7 | # Just so the devs can see. 8 | puts 'Auditing development dependencies. You should address any findings.' 9 | system('npm audit --only dev') 10 | 11 | puts '---' 12 | 13 | # Do not pull in package fixes automatically: it will cause the build to fail. 14 | puts 'Auditing production dependencies. You must address these.' 15 | verbose('npm audit --audit-level=moderate --production') 16 | -------------------------------------------------------------------------------- /script/check-lockfile-version.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const lockFileVersion = require('../package-lock.json').lockfileVersion; 4 | 5 | if (lockFileVersion !== 1) { 6 | process.exit(0); 7 | } else { 8 | console.log('Incorrect package-lock version detected. Version 1 is not supported.'); 9 | console.log( 10 | 'Please check if you are using npm v8 or higher. If not, update to npm v8 or higher and re-run build:release' 11 | ); 12 | process.exit(1); 13 | } 14 | -------------------------------------------------------------------------------- /script/check-voice-focus-version.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const https = require('https'); 4 | const version = require('../package.json').version; 5 | 6 | console.log('Checking assets for version', version); 7 | 8 | const majorMinor = version.split('.', 2).join('.'); 9 | 10 | const url = `https://static.sdkassets.chime.aws/workers/NOTICES.txt?assetGroup=sdk-${majorMinor}`; 11 | 12 | console.log('Fetching', url); 13 | 14 | https.get(url, res => { 15 | if (res.statusCode === 200) { 16 | console.log('Got 200. Success!'); 17 | process.exit(0); 18 | } else { 19 | console.error('Got result', res.statusCode); 20 | process.exit(1); 21 | } 22 | }); -------------------------------------------------------------------------------- /script/conditional-install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'digest' 3 | 4 | def verbose command 5 | puts("--> #{command}") || system(command) || fail("Failed: #{command}") 6 | end 7 | 8 | # Why not read node_modules/.package-lock.json? Because it's not the same. 9 | hashfile = 'node_modules/.package-lock.json.hash' 10 | current = Digest::SHA2.file('package-lock.json').hexdigest 11 | expected = File.read(hashfile) if File.file?(hashfile) 12 | 13 | if expected != current 14 | puts 'Running npm ci to regenerate node_modules.' 15 | verbose('npm ci') 16 | File.write(hashfile, current) 17 | else 18 | puts 'node_modules is up to date.' 19 | end 20 | -------------------------------------------------------------------------------- /script/copy-protocol.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // eslint-disable-next-line @typescript-eslint/no-var-requires 4 | const fs = require('fs-extra'); 5 | fs.copy('./src/signalingprotocol/', './build/signalingprotocol/', err => { 6 | if (err) return console.error(err); 7 | }); 8 | -------------------------------------------------------------------------------- /script/generate-docs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # We prefer 'upstream' because a fork will likely have both. 4 | # We fall back to 'origin' to support Travis. 5 | compare_to = ['upstream', 'origin'] 6 | 7 | intersection = compare_to & `git remote`.split 8 | 9 | if intersection.empty? 10 | STDERR.puts "Cannot generate docs: unable to determine remote. Create a remote named 'upstream' or 'origin'." 11 | exit 1 12 | end 13 | 14 | remote = intersection[0] 15 | branch = 'main' 16 | 17 | STDERR.puts "Generating docs against #{remote}/#{branch}." 18 | 19 | # Explicitly use the guides/tsconfig.json file, because it includes 20 | # both the source and docs. The build itself just uses the root tsconfig, 21 | # which just hits src. 22 | `node node_modules/typedoc/bin/typedoc --tsconfig guides/tsconfig.json --gitRemote #{remote} --gitRevision #{branch}` 23 | -------------------------------------------------------------------------------- /script/github-action-awscli-installation: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" LNK POP 4 | test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) 5 | test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile 6 | echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile 7 | 8 | brew install python 9 | pip3 install --user awscli 10 | pip3 install aws-sam-cli 11 | sam --version -------------------------------------------------------------------------------- /script/logout.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // eslint-disable-next-line @typescript-eslint/no-var-requires 4 | const fs = require('fs'); 5 | // eslint-disable-next-line @typescript-eslint/no-var-requires 6 | const path = require('path'); 7 | // eslint-disable-next-line @typescript-eslint/no-var-requires 8 | const { exec } = require('child_process'); 9 | 10 | process.cwd(path.join(__dirname, '..')); 11 | 12 | exec('npm logout', (err, _stdout, _stderr) => { 13 | if (err) { 14 | console.error(err); 15 | process.exit(1); 16 | } else { 17 | console.log('Logged out (auth token deleted)'); 18 | fs.unlinkSync('.npmrc'); 19 | process.exit(0); 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /script/postbuild: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | Dir.chdir(File.expand_path(File.join(File.dirname(__FILE__), '..'))) 3 | uncommitted_files = `git status -s`.strip 4 | 5 | if uncommitted_files.length == 0 6 | puts "OK: no uncommitted files" 7 | else 8 | STDERR.puts "Error: there are uncommitted changes:\n #{uncommitted_files}" 9 | delta = `git diff | head -n 100` 10 | STDERR.puts "Diff (100 lines):\n#{delta}\n…\n" 11 | exit 1 12 | end -------------------------------------------------------------------------------- /src/attendee/Attendee.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[Attendee]] contains the information of an attendee. 6 | */ 7 | export default class Attendee { 8 | /** 9 | * The attendee id of an attendee. 10 | */ 11 | attendeeId: string; 12 | /** 13 | * The external user id of an attendee. 14 | */ 15 | externalUserId: string; 16 | } 17 | -------------------------------------------------------------------------------- /src/audiomixcontroller/AudioMixControllerFacade.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import AudioMixObserver from '../audiomixobserver/AudioMixObserver'; 5 | 6 | export default interface AudioMixControllerFacade { 7 | bindAudioElement(element: HTMLAudioElement): Promise; 8 | unbindAudioElement(): void; 9 | getCurrentMeetingAudioStream(): Promise; 10 | addAudioMixObserver(observer: AudioMixObserver): void; 11 | removeAudioMixObserver(observer: AudioMixObserver): void; 12 | } 13 | -------------------------------------------------------------------------------- /src/audiomixobserver/AudioMixObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default interface AudioMixObserver { 5 | /** 6 | * Called when the meeting audio stream became active. 7 | */ 8 | meetingAudioStreamBecameActive(activeStream: MediaStream): void; 9 | 10 | /** 11 | * Called when the meeting audio stream became inactive. 12 | */ 13 | meetingAudioStreamBecameInactive(inactiveStream: MediaStream): void; 14 | } 15 | -------------------------------------------------------------------------------- /src/backgroundblurprocessor/BackgroundBlurOptions.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import BackgroundFilterOptions from '../backgroundfilter/BackgroundFilterOptions'; 5 | 6 | /** 7 | * A set of options that can be supplied when creating a background blur video frame processor. 8 | */ 9 | export default interface BackgroundBlurOptions extends BackgroundFilterOptions { 10 | /** The amount of blur that will be applied to a video stream. */ 11 | blurStrength?: number; 12 | } 13 | -------------------------------------------------------------------------------- /src/backgroundblurprocessor/BackgroundBlurStrength.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * The numbers below indicate the amount of blur to apply. Larger numbers will produce 6 | * more blur. 7 | */ 8 | const BlurStrength = { 9 | LOW: 7, 10 | MEDIUM: 15, 11 | HIGH: 30, 12 | }; 13 | 14 | /** @internal */ 15 | export class BlurStrengthMapper { 16 | private static readonly BLUR_STRENGTH_DIVISOR = 540; // use 540P as baseline blur strength 17 | static getBlurAmount(bstrength: number, options: { height: number }): number { 18 | if (bstrength <= 0) { 19 | throw new Error(`invalid value for blur strength: ${bstrength}`); 20 | } 21 | return Math.round((bstrength * options.height) / this.BLUR_STRENGTH_DIVISOR); 22 | } 23 | } 24 | 25 | export default BlurStrength; 26 | -------------------------------------------------------------------------------- /src/backgroundblurprocessor/BackgroundBlurVideoFrameProcessorDelegate.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import BackgroundFilterVideoFrameProcessorDelegate from '../backgroundfilter/BackgroundFilterVideoFrameProcessorDelegate'; 5 | 6 | /** 7 | * This class adds the functionality to allow for a set of unique observers to be added to the 8 | * video frame processor. 9 | */ 10 | /** @internal */ 11 | export default class BackgroundBlurVideoFrameProcessorDelegate extends BackgroundFilterVideoFrameProcessorDelegate {} 12 | -------------------------------------------------------------------------------- /src/backgroundblurprocessor/BackgroundBlurVideoFrameProcessorObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import BackgroundFilterVideoFrameProcessorObserver from '../backgroundfilter/BackgroundFilterVideoFrameProcessorObserver'; 5 | 6 | /** 7 | * An observer for the background blur video frame processor. 8 | * 9 | * Use {@link BackgroundBlurVideoFrameProcessor.addObserver} to register an 10 | * observer with the processor. 11 | */ 12 | export default interface BackgroundBlurVideoFrameProcessorObserver 13 | extends BackgroundFilterVideoFrameProcessorObserver {} 14 | -------------------------------------------------------------------------------- /src/backgroundfilter/BackgroundFilterPaths.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * Paths to assets that will be loaded from CDN 6 | */ 7 | export default interface BackgroundFilterPaths { 8 | /** 9 | * Path to the web worker that will processing background segmentation. 10 | */ 11 | worker: string; 12 | 13 | /** 14 | * Path to the WASM file for processing background segmentation. 15 | */ 16 | wasm: string; 17 | 18 | /** 19 | * Path to the WASM file compiled with SIMD support for processing background segmentation 20 | */ 21 | simd: string; 22 | } 23 | -------------------------------------------------------------------------------- /src/backgroundreplacementprocessor/BackgroundReplacementOptions.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import BackgroundFilterOptions from '../backgroundfilter/BackgroundFilterOptions'; 5 | /** 6 | * A set of options that can be supplied when creating a background replacement video frame processor. 7 | */ 8 | export default interface BackgroundReplacementOptions extends BackgroundFilterOptions { 9 | /** The image to replace the background with */ 10 | imageBlob?: Blob; 11 | } 12 | -------------------------------------------------------------------------------- /src/backgroundreplacementprocessor/BackgroundReplacementVideoFrameProcessorDelegate.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import BackgroundFilterVideoFrameProcessorDelegate from '../backgroundfilter/BackgroundFilterVideoFrameProcessorDelegate'; 5 | 6 | /** 7 | * This class adds the functionality to allow for a set of unique observers to be added to the 8 | * video frame processor. 9 | */ 10 | /** @internal */ 11 | export default class BackgroundReplacementVideoFrameProcessorDelegate extends BackgroundFilterVideoFrameProcessorDelegate {} 12 | -------------------------------------------------------------------------------- /src/backgroundreplacementprocessor/BackgroundReplacementVideoFrameProcessorObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import BackgroundFilterVideoFrameProcessorObserver from '../backgroundfilter/BackgroundFilterVideoFrameProcessorObserver'; 5 | 6 | /** 7 | * An observer for the background replacement video frame processor. 8 | * 9 | * Use {@link BackgroundReplacementVideoFrameProcessor.addObserver} to register an 10 | * observer with the processor. 11 | */ 12 | export default interface BackgroundReplacementVideoFrameProcessorObserver 13 | extends BackgroundFilterVideoFrameProcessorObserver {} 14 | -------------------------------------------------------------------------------- /src/backoff/Backoff.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[Backoff]] defines how long to wait before the next retry. Implementations 6 | * of [[Backoff]] provide custom algorithms for calculating the backoff amount. 7 | */ 8 | export default interface Backoff { 9 | /* 10 | * Resets the backoff state to the first retry. 11 | */ 12 | reset(): void; 13 | 14 | /* 15 | * Returns the wait period in milliseconds before the next retry and 16 | * increments the retry index as a side-effect. 17 | */ 18 | nextBackoffAmountMs(): number; 19 | } 20 | -------------------------------------------------------------------------------- /src/backoff/BackoffFactory.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Backoff from './Backoff'; 5 | 6 | export default interface BackoffFactory { 7 | /** 8 | * Backoff factory method 9 | */ 10 | create(): Backoff; 11 | 12 | /** 13 | * Limited factory method 14 | */ 15 | createWithLimit(limit: number): Backoff; 16 | } 17 | -------------------------------------------------------------------------------- /src/backoff/FullJitterBackoffFactory.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Backoff from './Backoff'; 5 | import BackoffFactory from './BackoffFactory'; 6 | import FullJitterBackoff from './FullJitterBackoff'; 7 | import FullJitterLimitedBackoff from './FullJitterLimitedBackoff'; 8 | 9 | export default class FullJitterBackoffFactory implements BackoffFactory { 10 | constructor( 11 | private fixedWaitMs: number, 12 | private shortBackoffMs: number, 13 | private longBackoffMs: number 14 | ) {} 15 | 16 | create(): Backoff { 17 | return new FullJitterBackoff(this.fixedWaitMs, this.shortBackoffMs, this.longBackoffMs); 18 | } 19 | 20 | createWithLimit(limit: number): Backoff { 21 | return new FullJitterLimitedBackoff( 22 | this.fixedWaitMs, 23 | this.shortBackoffMs, 24 | this.longBackoffMs, 25 | limit 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/backoff/FullJitterLimitedBackoff.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import FullJitterBackoff from './FullJitterBackoff'; 5 | 6 | export default class FullJitterLimitedBackoff extends FullJitterBackoff { 7 | private attempts = 0; 8 | 9 | constructor( 10 | fixedWaitMs: number, 11 | shortBackoffMs: number, 12 | longBackoffMs: number, 13 | private limit: number 14 | ) { 15 | super(fixedWaitMs, shortBackoffMs, longBackoffMs); 16 | } 17 | 18 | nextBackoffAmountMs(): number { 19 | this.attempts++; 20 | if (this.attempts > this.limit) { 21 | throw new Error('retry limit exceeded'); 22 | } 23 | return super.nextBackoffAmountMs(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/clientmetricreport/ClientMetricReportDirection.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum ClientMetricReportDirection { 5 | UPSTREAM, 6 | DOWNSTREAM, 7 | } 8 | 9 | export default ClientMetricReportDirection; 10 | -------------------------------------------------------------------------------- /src/clientmetricreport/ClientMetricReportMediaType.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum ClientMetricReportMediaType { 5 | AUDIO, 6 | VIDEO, 7 | } 8 | 9 | export default ClientMetricReportMediaType; 10 | -------------------------------------------------------------------------------- /src/clientmetricreport/ClientVideoStreamReceivingReport.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default class ClientVideoStreamReceivingReport { 5 | attendeeId: string; 6 | receivedAverageBitrateKbps: number; 7 | expectedAverageBitrateKbps: number; 8 | } 9 | -------------------------------------------------------------------------------- /src/clientmetricreport/GlobalMetricReport.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default class GlobalMetricReport { 5 | previousMetrics: { [id: string]: number } = {}; 6 | currentMetrics: { [id: string]: number } = {}; 7 | // As metric values do not necessarily be number, this is a workaround in case metric value is string 8 | currentStringMetrics: { [id: string]: string } = {}; 9 | previousObjectMetrics: { [id: string]: object } = {}; 10 | currentObjectMetrics: { [id: string]: object } = {}; 11 | } 12 | -------------------------------------------------------------------------------- /src/clientmetricreport/RedundantAudioRecoveryMetricReport.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[RedundantAudioRecoveryMetricReport]] will contain metrics reported 6 | * by the [[RedundantAudioEncoder]] 7 | */ 8 | export default class RedundantAudioRecoveryMetricReport { 9 | currentTimestampMs: number = 0; 10 | ssrc: number = 0; 11 | totalAudioPacketsLost: number = 0; 12 | totalAudioPacketsExpected: number = 0; 13 | totalAudioPacketsRecoveredRed: number = 0; 14 | totalAudioPacketsRecoveredFec: number = 0; 15 | } 16 | -------------------------------------------------------------------------------- /src/clientmetricreport/StreamMetricReport.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Direction from './ClientMetricReportDirection'; 5 | import MediaType from './ClientMetricReportMediaType'; 6 | 7 | export default class StreamMetricReport { 8 | streamId: number; 9 | groupId: number; 10 | mediaType: MediaType; 11 | direction: Direction; 12 | previousMetrics: { [id: string]: number } = {}; 13 | currentMetrics: { [id: string]: number } = {}; 14 | // As metric values do not necessarily be number, this is a workaround in case metric value is string 15 | currentStringMetrics: { [id: string]: string } = {}; 16 | previousObjectMetrics: { [id: string]: object } = {}; 17 | currentObjectMetrics: { [id: string]: object } = {}; 18 | } 19 | -------------------------------------------------------------------------------- /src/connectionhealthpolicy/VideoEncodingConnectionHealthPolicyName.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * Video encoding connection policy names. The policy name is used in MonitorTask 6 | * to determine video codec degradation reason and report metrics accordingly. 7 | */ 8 | export enum VideoEncodingConnectionHealthPolicyName { 9 | VideoEncodingCpuHealth = 'Video Encoding CPU Health', 10 | VideoEncodingFramerateHealth = 'Video Encoding framerate Health', 11 | VideoConcurrentSendersHealth = 'Video Concurrent Senders Health', 12 | } 13 | 14 | export default VideoEncodingConnectionHealthPolicyName; 15 | -------------------------------------------------------------------------------- /src/connectionmonitor/ConnectionMonitor.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[ConnectionMonitor]] updates health data based on incoming metrics. 6 | */ 7 | export default interface ConnectionMonitor { 8 | /** 9 | * Starts the ConnectionMonitor. 10 | */ 11 | start(): void; 12 | 13 | /** 14 | * Stops the ConnectionMonitor. 15 | */ 16 | stop(): void; 17 | } 18 | -------------------------------------------------------------------------------- /src/contentsharecontroller/ContentShareConstants.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | enum ContentShareConstants { 5 | Modality = '#content', 6 | } 7 | 8 | export default ContentShareConstants; 9 | -------------------------------------------------------------------------------- /src/contentsharecontroller/ContentShareController.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import ContentShareObserver from '../contentshareobserver/ContentShareObserver'; 5 | import ContentShareControllerFacade from './ContentShareControllerFacade'; 6 | 7 | export default interface ContentShareController extends ContentShareControllerFacade { 8 | /** 9 | * Iterates through each observer, so that their notification functions may 10 | * be called. 11 | */ 12 | forEachContentShareObserver(observerFunc: (observer: ContentShareObserver) => void): void; 13 | } 14 | -------------------------------------------------------------------------------- /src/contentshareobserver/ContentShareObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default interface ContentShareObserver { 5 | /** 6 | * Called when a content share session is started. 7 | */ 8 | contentShareDidStart?(): void; 9 | /** 10 | * Called when a content share session is stopped. 11 | */ 12 | contentShareDidStop?(): void; 13 | /** 14 | * Called when a content share session is paused. 15 | */ 16 | contentShareDidPause?(): void; 17 | /** 18 | * Called when a content share session is unpaused. 19 | */ 20 | contentShareDidUnpause?(): void; 21 | } 22 | -------------------------------------------------------------------------------- /src/destroyable/Destroyable.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * An interface for objects that require manual cleanup. 6 | */ 7 | export interface Destroyable { 8 | /** 9 | * Dispose of this instance. The instance cannot be used after this method has been called. 10 | */ 11 | destroy(): Promise; 12 | } 13 | 14 | /** 15 | * Type guard for `Destroyable`. 16 | * 17 | * @param x A value that might implement the `Destroyable` interface. 18 | * @returns Whether the value implements `Destroyable`. 19 | */ 20 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 21 | export function isDestroyable(x: any): x is Destroyable { 22 | return x && 'destroy' in x; 23 | } 24 | 25 | export default Destroyable; 26 | -------------------------------------------------------------------------------- /src/devicecontroller/AudioInputDevice.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import AudioTransformDevice from './AudioTransformDevice'; 5 | import Device from './Device'; 6 | 7 | type AudioInputDevice = Device | AudioTransformDevice | null; 8 | 9 | export default AudioInputDevice; 10 | -------------------------------------------------------------------------------- /src/devicecontroller/AudioNodeSubgraph.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default interface AudioNodeSubgraph { 5 | start: AudioNode; 6 | end: AudioNode; 7 | } 8 | -------------------------------------------------------------------------------- /src/devicecontroller/Device.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * A specifier for how to obtain a media stream from the browser. This 6 | * can be a `MediaStream` itself, a set of constraints, a device ID. 7 | */ 8 | type Device = string | MediaTrackConstraints | MediaStream; 9 | export default Device; 10 | -------------------------------------------------------------------------------- /src/devicecontroller/DeviceSelection.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default class DeviceSelection { 5 | constraints: MediaStreamConstraints; 6 | stream: MediaStream; 7 | groupId: string = ''; 8 | 9 | endedCallback?: undefined | (() => void); 10 | trackMuteCallback?: undefined | (() => void); 11 | trackUnmuteCallback?: undefined | (() => void); 12 | 13 | matchesConstraints(constraints: MediaStreamConstraints): boolean { 14 | return JSON.stringify(this.constraints) === JSON.stringify(constraints); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/devicecontroller/GetUserMediaError.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default class GetUserMediaError extends Error { 5 | constructor(public cause?: Error, message?: string) { 6 | super(message || 'Error fetching device.'); 7 | this.name = 'GetUserMediaError'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/devicecontroller/NotFoundError.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import GetUserMediaError from './GetUserMediaError'; 5 | 6 | export default class NotFoundError extends GetUserMediaError { 7 | constructor(cause?: Error) { 8 | super(cause); 9 | this.name = 'NotFoundError'; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/devicecontroller/NotReadableError.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import GetUserMediaError from './GetUserMediaError'; 5 | 6 | export default class NotReadableError extends GetUserMediaError { 7 | constructor(cause?: Error) { 8 | super(cause); 9 | this.name = 'NotReadableError'; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/devicecontroller/OverconstrainedError.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import GetUserMediaError from './GetUserMediaError'; 5 | 6 | export default class OverconstrainedError extends GetUserMediaError { 7 | constructor(cause?: Error, public constraint?: string) { 8 | super(cause); 9 | this.name = 'OverconstrainedError'; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/devicecontroller/PermissionDeniedError.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import GetUserMediaError from './GetUserMediaError'; 5 | 6 | export default class PermissionDeniedError extends GetUserMediaError { 7 | constructor(cause?: Error, message?: string) { 8 | super(cause, message); 9 | this.name = 'PermissionDeniedError'; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/devicecontroller/RemovableAnalyserNode.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * An `AnalyserNode` that knows how to remove the inputs with which it was 6 | * created. This allows us to safely clean up in Safari, which has issues 7 | * if an analyzer is left hanging around. 8 | */ 9 | export default interface RemovableAnalyserNode extends AnalyserNode { 10 | removeOriginalInputs(): void; 11 | } 12 | -------------------------------------------------------------------------------- /src/devicecontroller/TypeError.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import GetUserMediaError from './GetUserMediaError'; 5 | 6 | export default class TypeError extends GetUserMediaError { 7 | constructor(cause?: Error) { 8 | super(cause); 9 | this.name = 'TypeError'; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/devicecontroller/VideoInputDevice.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Device from './Device'; 5 | import VideoTransformDevice from './VideoTransformDevice'; 6 | 7 | type VideoInputDevice = Device | VideoTransformDevice; 8 | 9 | export default VideoInputDevice; 10 | -------------------------------------------------------------------------------- /src/devicepixelratiomonitor/DevicePixelRatioMonitor.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import DevicePixelRatioObserver from '../devicepixelratioobserver/DevicePixelRatioObserver'; 5 | 6 | /** 7 | * [[DevicePixelRatioMonitor]] manages device pixel ratio observers. 8 | */ 9 | export default interface DevicePixelRatioMonitor { 10 | /** 11 | * Registers a device pixel ratio observer to the observer queue. 12 | */ 13 | registerObserver(observer: DevicePixelRatioObserver): void; 14 | 15 | /** 16 | * Removes a device pixel ratio observer from the observer queue. 17 | */ 18 | removeObserver(observer: DevicePixelRatioObserver): void; 19 | } 20 | -------------------------------------------------------------------------------- /src/devicepixelratioobserver/DevicePixelRatioObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * Instances of [[DevicePixelRatioObserver]] can be registered with a 6 | * [[DevicePixelRatioMonitor]] to receive callbacks for a change in the HTML window's 7 | * device pixel ratio. 8 | */ 9 | export default interface DevicePixelRatioObserver { 10 | /** 11 | * Called when the device pixel ratio monitor detects a change in the 12 | * HTML window's device pixel ratio. This can happen if the window is dragged 13 | * to a monitor with a different hi-dpi characteristics. 14 | */ 15 | devicePixelRatioChanged(newDevicePixelRatio: number): void; 16 | } 17 | -------------------------------------------------------------------------------- /src/devicepixelratiosource/DevicePixelRatioSource.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[DevicePixelRatioSource]] provides an interface for the source 6 | * of the device pixel ratio. 7 | */ 8 | export default interface DevicePixelRatioSource { 9 | /** 10 | * Returns the current device pixel ratio. 11 | */ 12 | devicePixelRatio(): number; 13 | } 14 | -------------------------------------------------------------------------------- /src/devicepixelratiosource/DevicePixelRatioWindowSource.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import DevicePixelRatioSource from './DevicePixelRatioSource'; 5 | 6 | export default class DevicePixelRatioWindowSource implements DevicePixelRatioSource { 7 | devicePixelRatio(): number { 8 | if (typeof window === 'undefined' || !window || !window.devicePixelRatio) { 9 | return 1; 10 | } 11 | return window.devicePixelRatio; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/eventbuffer/EventBuffer.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[EventBuffer]] is responsible to store and send events to the 6 | * ingestion service endpoint. 7 | */ 8 | export default interface EventBuffer { 9 | /** 10 | * Adds an event to the buffer. 11 | * An error is thrown if the event buffer is full. 12 | * @param item to add to the buffer. 13 | */ 14 | addItem(item: T): Promise; 15 | 16 | /** 17 | * Starts sending events. 18 | */ 19 | start(): void; 20 | 21 | /** 22 | * Stops sending events. 23 | */ 24 | stop(): void; 25 | } 26 | -------------------------------------------------------------------------------- /src/eventbuffer/JSONIngestionEvent.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import JSONIngestionPayloadItem from './JSONIngestionPayloadItem'; 5 | 6 | export default interface JSONIngestionEvent { 7 | type: string; 8 | v: number; 9 | payloads: JSONIngestionPayloadItem[]; 10 | } 11 | -------------------------------------------------------------------------------- /src/eventbuffer/JSONIngestionPayloadItem.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default interface JSONIngestionPayloadItem { 5 | [key: string]: string | number; 6 | } 7 | -------------------------------------------------------------------------------- /src/eventbuffer/JSONIngestionRecord.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import EventsIngestionMetadata from '../eventreporter/EventsIngestionMetadata'; 5 | import JSONIngestionEvent from './JSONIngestionEvent'; 6 | 7 | export default interface JSONIngestionRecord { 8 | metadata: EventsIngestionMetadata; 9 | events: JSONIngestionEvent[]; 10 | authorization?: string; 11 | } 12 | -------------------------------------------------------------------------------- /src/eventcontroller/AudioVideoEventAttributes.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[AudioVideoEventAttributes]] describes an audio-video event. 6 | */ 7 | export default interface AudioVideoEventAttributes { 8 | attendeePresenceDurationMs?: number; 9 | iceGatheringDurationMs?: number; 10 | maxVideoTileCount?: number; 11 | meetingDurationMs?: number; 12 | meetingErrorMessage?: string; 13 | meetingStartDurationMs?: number; 14 | meetingStatus?: string; 15 | poorConnectionCount?: number; 16 | retryCount?: number; 17 | signalingOpenDurationMs?: number; 18 | } 19 | -------------------------------------------------------------------------------- /src/eventcontroller/DeviceEventAttributes.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[DeviceEventAttributes]] describes a device event. 6 | */ 7 | export default interface DeviceEventAttributes { 8 | audioInputErrorMessage?: string; 9 | videoInputErrorMessage?: string; 10 | deviceLabelTriggerErrorMessage?: string; 11 | } 12 | -------------------------------------------------------------------------------- /src/eventcontroller/EventName.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | type EventName = 5 | | 'meetingStartRequested' 6 | | 'meetingStartSucceeded' 7 | | 'meetingReconnected' 8 | | 'meetingStartFailed' 9 | | 'meetingEnded' 10 | | 'meetingFailed' 11 | | 'attendeePresenceReceived' 12 | | 'audioInputSelected' 13 | | 'audioInputUnselected' 14 | | 'audioInputFailed' 15 | | 'videoInputSelected' 16 | | 'videoInputUnselected' 17 | | 'videoInputFailed' 18 | | 'signalingDropped' 19 | | 'receivingAudioDropped' 20 | | 'sendingAudioFailed' 21 | | 'sendingAudioRecovered' 22 | | 'backgroundFilterConfigSelected' 23 | | 'deviceLabelTriggerFailed'; 24 | 25 | export default EventName; 26 | -------------------------------------------------------------------------------- /src/eventcontroller/MeetingHistoryState.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import EventName from './EventName'; 5 | 6 | /** 7 | * [[MeetingHistoryState]] describes user actions and events, including all event names 8 | * in [[EventName]]. 9 | */ 10 | type MeetingHistoryState = EventName; 11 | 12 | export default MeetingHistoryState; 13 | -------------------------------------------------------------------------------- /src/eventcontroller/VideoFXEventAttributes.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import VideoFxBlurStrength from '../videofx/VideoFxBlurStrength'; 5 | 6 | /** 7 | * [[VideoFXEventAttributes]] describes the config of video effect event. 8 | */ 9 | export default interface VideoFXEventAttributes { 10 | backgroundBlurEnabled?: string; 11 | backgroundBlurStrength?: number | VideoFxBlurStrength; 12 | backgroundReplacementEnabled?: string; 13 | backgroundFilterVersion?: number; 14 | } 15 | -------------------------------------------------------------------------------- /src/eventobserver/EventObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import EventAttributes from '../eventcontroller/EventAttributes'; 5 | import EventName from '../eventcontroller/EventName'; 6 | 7 | export default interface EventObserver { 8 | /** 9 | * Called when specific events occur during the SDK session and includes attributes of the event. 10 | * For more info visit: https://aws.amazon.com/blogs/business-productivity/monitoring-and-troubleshooting-with-amazon-chime-sdk-meeting-events/ 11 | */ 12 | eventDidReceive(name: EventName, attributes: EventAttributes): void; 13 | } 14 | -------------------------------------------------------------------------------- /src/eventreporter/EventData.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import MeetingHistoryState from '../eventcontroller/MeetingHistoryState'; 5 | 6 | /** 7 | * [[EventData]] describes an event information. 8 | */ 9 | export default interface EventData { 10 | /** 11 | * Name of an event with the [[MeetingHistoryState]] type. 12 | * For example, "signalingDropped", "meetingReconnected", "meetingStartRequested". 13 | */ 14 | name: MeetingHistoryState; 15 | /** 16 | * Event generated timestamp in milliseconds. 17 | */ 18 | ts: number; 19 | /** 20 | * Event attributes to provide extra information with an event. 21 | */ 22 | attributes?: { [key: string]: string | number }; 23 | } 24 | -------------------------------------------------------------------------------- /src/eventreporter/EventReporter.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import MeetingHistoryState from '../eventcontroller/MeetingHistoryState'; 5 | 6 | /** 7 | * [[EventReporter]] is responsible to get an event, buffer and send events to the 8 | * ingestion service endpoint. 9 | */ 10 | export default interface EventReporter { 11 | /** 12 | * Reports an event with a name, timestamp and any optional attributes. 13 | */ 14 | reportEvent( 15 | ts: number, 16 | name: MeetingHistoryState, 17 | attributes?: { [key: string]: string | number } 18 | ): Promise; 19 | 20 | /** 21 | * Enables reporting events to the ingestion service, if disabled while creating the EventIngestionConfiguration. 22 | */ 23 | start(): void; 24 | 25 | /** 26 | * Disables event reporting to the ingestion service. 27 | */ 28 | stop(): void; 29 | } 30 | -------------------------------------------------------------------------------- /src/eventreporter/EventsIngestionMetadata.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import MeetingEventsClientConfigurationAttributes from '../eventsclientconfiguration/MeetingEventsClientConfigurationAttributes'; 5 | 6 | /** 7 | * [[EventsIngestionMetadata]] contains the necessary metadata information 8 | * to be sent with events to the ingestion service. 9 | */ 10 | export default interface EventsIngestionMetadata 11 | extends MeetingEventsClientConfigurationAttributes { 12 | sdkVersion?: string; 13 | sdkName?: string; 14 | osName?: string; 15 | osVersion?: string; 16 | browserName?: string; 17 | browserVersion?: string; 18 | deviceName?: string; 19 | } 20 | -------------------------------------------------------------------------------- /src/eventreporter/NoOpEventReporter.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import EventReporter from './EventReporter'; 5 | 6 | export default class NoOpEventReporter implements EventReporter { 7 | constructor() {} 8 | 9 | reportEvent( 10 | _ts: number, 11 | _name: string, 12 | _attributes?: { [key: string]: string | number } 13 | ): Promise { 14 | return; 15 | } 16 | 17 | start(): void {} 18 | 19 | stop(): void {} 20 | } 21 | -------------------------------------------------------------------------------- /src/eventsclientconfiguration/MeetingEventsClientConfigurationAttributes.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[MeetingEventsClientConfigurationAttributes]] describes meeting client specific attributes 6 | * required in client metadata when sending to ingestion service endpoint. 7 | */ 8 | export default interface MeetingEventsClientConfigurationAttributes { 9 | meetingId?: string; 10 | attendeeId?: string; 11 | type?: string; 12 | v?: number; 13 | } 14 | -------------------------------------------------------------------------------- /src/logger/Log.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default class Log { 5 | constructor( 6 | public sequenceNumber: number, 7 | public message: string, 8 | public timestampMs: number, 9 | public logLevel: string 10 | ) {} 11 | } 12 | -------------------------------------------------------------------------------- /src/logger/LogLevel.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum LogLevel { 5 | DEBUG, 6 | INFO, 7 | WARN, 8 | ERROR, 9 | OFF, 10 | } 11 | 12 | export default LogLevel; 13 | -------------------------------------------------------------------------------- /src/logger/NoOpDebugLogger.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import LogLevel from './LogLevel'; 5 | import NoOpLogger from './NoOpLogger'; 6 | 7 | /** 8 | * [[NoOpDebugLogger]] does not log any message but does call 9 | * debug functions by default. 10 | */ 11 | export default class NoOpDebugLogger extends NoOpLogger { 12 | constructor() { 13 | super(LogLevel.DEBUG); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/logger/NoOpLogger.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Logger from './Logger'; 5 | import LogLevel from './LogLevel'; 6 | 7 | /** 8 | * [[NoOpLogger]] does not log any message. 9 | */ 10 | export default class NoOpLogger implements Logger { 11 | level: LogLevel; 12 | 13 | constructor(level = LogLevel.OFF) { 14 | this.level = level; 15 | } 16 | 17 | info(_msg: string): void {} 18 | 19 | warn(_msg: string): void {} 20 | 21 | error(_msg: string): void {} 22 | 23 | debug(debugFunction: string | (() => string)): void { 24 | if (LogLevel.DEBUG < this.level) { 25 | return; 26 | } 27 | if (typeof debugFunction !== 'string') { 28 | debugFunction(); 29 | } 30 | } 31 | 32 | setLogLevel(level: LogLevel): void { 33 | this.level = level; 34 | } 35 | 36 | getLogLevel(): LogLevel { 37 | return this.level; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/mediadevicefactory/DefaultMediaDeviceFactory.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import MediaDeviceFactory from './MediaDeviceFactory'; 5 | import MediaDeviceProxyHandler from './MediaDeviceProxyHandler'; 6 | 7 | export default class DefaultMediaDeviceFactory implements MediaDeviceFactory { 8 | private isMediaDevicesSupported: boolean; 9 | 10 | constructor() { 11 | this.isMediaDevicesSupported = typeof navigator !== 'undefined' && !!navigator.mediaDevices; 12 | } 13 | 14 | create(): MediaDevices { 15 | if (!this.isMediaDevicesSupported) { 16 | throw new Error(`navigator.mediaDevices is not supported`); 17 | } else { 18 | return new Proxy(navigator.mediaDevices, new MediaDeviceProxyHandler()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/mediadevicefactory/MediaDeviceFactory.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[MediaDeviceFactory]] creates a proxy for MediaDevices. 6 | */ 7 | export default interface MediaDeviceFactory { 8 | /** 9 | * Creates a MediaDevices proxy. 10 | */ 11 | create(): MediaDevices; 12 | } 13 | -------------------------------------------------------------------------------- /src/mediastreambroker/DeviceControllerBasedMediaStreamBroker.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import DeviceController from '../devicecontroller/DeviceController'; 5 | import MediaStreamBroker from '../mediastreambroker/MediaStreamBroker'; 6 | 7 | export default interface DeviceControllerBasedMediaStreamBroker 8 | extends DeviceController, 9 | MediaStreamBroker { 10 | // This interface combines a device controller with a media stream broker 11 | } 12 | -------------------------------------------------------------------------------- /src/meetingreadinesschecker/CheckAudioConnectivityFeedback.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum CheckAudioConnectivityFeedback { 5 | Succeeded, 6 | AudioInputRequestFailed, 7 | AudioInputPermissionDenied, 8 | ConnectionFailed, 9 | AudioNotReceived, 10 | } 11 | 12 | export default CheckAudioConnectivityFeedback; 13 | -------------------------------------------------------------------------------- /src/meetingreadinesschecker/CheckAudioInputFeedback.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum CheckAudioInputFeedback { 5 | Succeeded, 6 | Failed, 7 | PermissionDenied, 8 | } 9 | 10 | export default CheckAudioInputFeedback; 11 | -------------------------------------------------------------------------------- /src/meetingreadinesschecker/CheckAudioOutputFeedback.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum CheckAudioOutputFeedback { 5 | Succeeded, 6 | Failed, 7 | } 8 | 9 | export default CheckAudioOutputFeedback; 10 | -------------------------------------------------------------------------------- /src/meetingreadinesschecker/CheckCameraResolutionFeedback.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum CheckCameraResolutionFeedback { 5 | Succeeded, 6 | Failed, 7 | ResolutionNotSupported, 8 | PermissionDenied, 9 | } 10 | 11 | export default CheckCameraResolutionFeedback; 12 | -------------------------------------------------------------------------------- /src/meetingreadinesschecker/CheckContentShareConnectivityFeedback.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum CheckContentShareConnectivityFeedback { 5 | Succeeded, 6 | Failed, 7 | PermissionDenied, 8 | TimedOut, 9 | ConnectionFailed, 10 | } 11 | 12 | export default CheckContentShareConnectivityFeedback; 13 | -------------------------------------------------------------------------------- /src/meetingreadinesschecker/CheckNetworkTCPConnectivityFeedback.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum CheckNetworkTCPConnectivityFeedback { 5 | Succeeded, 6 | MeetingSessionURLsNotInitialized, 7 | ConnectionFailed, 8 | ICENegotiationFailed, 9 | } 10 | 11 | export default CheckNetworkTCPConnectivityFeedback; 12 | -------------------------------------------------------------------------------- /src/meetingreadinesschecker/CheckNetworkUDPConnectivityFeedback.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum CheckNetworkUDPConnectivityFeedback { 5 | Succeeded, 6 | MeetingSessionURLsNotInitialized, 7 | ConnectionFailed, 8 | ICENegotiationFailed, 9 | } 10 | 11 | export default CheckNetworkUDPConnectivityFeedback; 12 | -------------------------------------------------------------------------------- /src/meetingreadinesschecker/CheckVideoConnectivityFeedback.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum CheckVideoConnectivityFeedback { 5 | Succeeded, 6 | VideoInputRequestFailed, 7 | VideoInputPermissionDenied, 8 | ConnectionFailed, 9 | VideoNotSent, 10 | } 11 | 12 | export default CheckVideoConnectivityFeedback; 13 | -------------------------------------------------------------------------------- /src/meetingreadinesschecker/CheckVideoInputFeedback.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum CheckVideoInputFeedback { 5 | Succeeded, 6 | Failed, 7 | PermissionDenied, 8 | } 9 | 10 | export default CheckVideoInputFeedback; 11 | -------------------------------------------------------------------------------- /src/meetingsession/MeetingSession.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import AudioVideoFacade from '../audiovideofacade/AudioVideoFacade'; 5 | import ContentShareController from '../contentsharecontroller/ContentShareController'; 6 | import DeviceController from '../devicecontroller/DeviceController'; 7 | import EventController from '../eventcontroller/EventController'; 8 | import Logger from '../logger/Logger'; 9 | import MeetingSessionConfiguration from './MeetingSessionConfiguration'; 10 | 11 | export default interface MeetingSession { 12 | readonly configuration: MeetingSessionConfiguration; 13 | readonly logger: Logger; 14 | readonly audioVideo: AudioVideoFacade; 15 | readonly contentShare: ContentShareController; 16 | readonly deviceController: DeviceController; 17 | readonly eventController?: EventController; 18 | } 19 | -------------------------------------------------------------------------------- /src/meetingsession/MeetingSessionLifecycleEvent.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[MeetingSessionLifecycleEvent]] indicates the lifecycle status. 6 | * Add new enums to the bottom. We depend on these numbers for analytics. 7 | */ 8 | export enum MeetingSessionLifecycleEvent { 9 | /** 10 | * The session is connecting, either to start a new call, or reconnect to an existing one. 11 | */ 12 | Connecting = 0, 13 | 14 | /** 15 | * The session successfully arrived in the started state either for the first time or 16 | * due to a change in connection type. 17 | */ 18 | Started = 1, 19 | 20 | /** 21 | * The session came to a stop, either from leaving or due to a failure. 22 | */ 23 | Stopped = 2, 24 | } 25 | 26 | export default MeetingSessionLifecycleEvent; 27 | -------------------------------------------------------------------------------- /src/meetingsession/MeetingSessionTURNCredentials.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[MeetingSessionTURNCredentials]] contains TURN credentials from the TURN server. 6 | */ 7 | export default class MeetingSessionTURNCredentials { 8 | username: string | null = null; 9 | password: string | null = null; 10 | ttl: number | null = null; 11 | uris: string[] | null = null; 12 | } 13 | -------------------------------------------------------------------------------- /src/message/Message.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default class Message { 5 | constructor( 6 | public readonly type: string, // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types 7 | public readonly headers: any, 8 | public readonly payload: string 9 | ) {} 10 | } 11 | -------------------------------------------------------------------------------- /src/messagingsession/PrefetchOn.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Using an enum here to make sure we can expand on future features 5 | enum PrefetchOn { 6 | Connect = 'connect', 7 | } 8 | 9 | export default PrefetchOn; 10 | -------------------------------------------------------------------------------- /src/messagingsession/PrefetchSortBy.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Using an enum here to make sure we can expand on future features 5 | enum PrefetchSortBy { 6 | Unread = 'unread', 7 | LastMessageTimestamp = 'last-message-timestamp', 8 | } 9 | 10 | export default PrefetchSortBy; 11 | -------------------------------------------------------------------------------- /src/messagingsessionobserver/MessagingSessionObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Message from '../message/Message'; 5 | 6 | export default interface MessagingSessionObserver { 7 | messagingSessionDidStart?(): void; 8 | messagingSessionDidStartConnecting?(reconnecting: boolean): void; 9 | messagingSessionDidStop?(event: CloseEvent): void; 10 | messagingSessionDidReceiveMessage?(message: Message): void; 11 | } 12 | -------------------------------------------------------------------------------- /src/modality/Modality.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // The Modality type is a backwards-compatible extension of the 5 | // profile id (UUID string) and session token schemas (base 64 string). 6 | // It appends # to the string, which indicates the modality 7 | // of the participant. 8 | export default interface Modality { 9 | /** 10 | * The participant Id 11 | */ 12 | id(): string; 13 | 14 | /** 15 | * The base of the Id 16 | */ 17 | base(): string; 18 | 19 | /** 20 | * The modality of the Id 21 | */ 22 | modality(): string; 23 | 24 | /** 25 | * Check whether the current Id contains the input modality 26 | */ 27 | hasModality(modality: string): boolean; 28 | 29 | /** 30 | * Create a new Id using the base of the current Id and the input modality 31 | */ 32 | withModality(modality: string): Modality; 33 | } 34 | -------------------------------------------------------------------------------- /src/modelspec/ModelShape.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * An interface to define the shape of an ML model. This can be used to define the input and 6 | * output shape of an ML model. 7 | */ 8 | export default interface ModelShape { 9 | height: number; 10 | width: number; 11 | range: number[]; 12 | channels: number; 13 | } 14 | -------------------------------------------------------------------------------- /src/modelspec/ModelSpec.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import ModelShape from './ModelShape'; 5 | 6 | /** 7 | * An interface for defining the input and output shape of a ML model along with the path 8 | * to download the model. 9 | */ 10 | export default interface ModelSpec { 11 | path: string; 12 | input: ModelShape; 13 | output: ModelShape; 14 | } 15 | -------------------------------------------------------------------------------- /src/pingpongobserver/PingPongObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[PingPongObserver]] implements callbacks for when [[PingPong]] pongs are 6 | * received or missed. 7 | */ 8 | export default interface PingPongObserver { 9 | /** 10 | * Called when a pong is received with the measured latency from the ping as 11 | * well as an estimate of the local clock skew compared to the server clock. 12 | */ 13 | didReceivePong?(id: number, latencyMs: number, clockSkewMs: number): void; 14 | 15 | /** 16 | * Called when one or more pongs are missed in a row. This can be an 17 | * indication that the underlying connection has failed. 18 | */ 19 | didMissPongs?(consecutiveMissed: number): void; 20 | } 21 | -------------------------------------------------------------------------------- /src/realtimecontroller/RealtimeAttendeePositionInFrame.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[RealtimeAttendeePositionInFrame]] information about the attendee's place in the frame. 6 | */ 7 | export default class RealtimeAttendeePositionInFrame { 8 | /** 9 | * Index of attendee update in the frame starting at zero 10 | */ 11 | attendeeIndex: number | null = null; 12 | 13 | /** 14 | * Number of total attendee updates in the frame 15 | */ 16 | attendeesInFrame: number | null = null; 17 | } 18 | -------------------------------------------------------------------------------- /src/realtimecontroller/RealtimeVolumeIndicator.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[RealtimeVolumeIndicator]] stores the current volume, mute, and 6 | * signal strength for an attendee. 7 | */ 8 | export default class RealtimeVolumeIndicator { 9 | volume: number | null = null; 10 | muted: boolean | null = null; 11 | signalStrength: number | null = null; 12 | } 13 | -------------------------------------------------------------------------------- /src/realtimecontroller/VolumeIndicatorCallback.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[RealtimeVolumeIndicator]] functions that listen to changes in attendees volume. 6 | */ 7 | 8 | type VolumeIndicatorCallback = ( 9 | attendeeId: string, 10 | volume: number | null, 11 | muted: boolean | null, 12 | signalStrength: number | null, 13 | externalUserId?: string 14 | ) => void; 15 | 16 | export default VolumeIndicatorCallback; 17 | -------------------------------------------------------------------------------- /src/redundantaudiorecoverymetricsobserver/RedundantAudioRecoveryMetricsObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import RedundantAudioRecoveryMetricReport from '../clientmetricreport/RedundantAudioRecoveryMetricReport'; 5 | 6 | /** 7 | * Instances of [[RedundantAudioRecoveryMetricsObserver]] can be registered with a 8 | * [[TransceiverController]] to receive callbacks with recovery metrics 9 | */ 10 | export default interface RedundantAudioRecoveryMetricsObserver { 11 | /** 12 | * Called when new RED and FEC recovery metrics become available. 13 | */ 14 | recoveryMetricsDidReceive(metricReport: RedundantAudioRecoveryMetricReport): void; 15 | } 16 | -------------------------------------------------------------------------------- /src/removableobserver/RemovableObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[RemovableObserver]] provides a callback for any cleanup logic. 6 | */ 7 | export default interface RemovableObserver { 8 | /** 9 | * Executes any cleanup logic. 10 | */ 11 | removeObserver(): void; 12 | } 13 | -------------------------------------------------------------------------------- /src/scheduler/AsyncScheduler.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import TimeoutScheduler from './TimeoutScheduler'; 5 | 6 | /** 7 | * [[AsyncScheduler]] enqueues the callback for the soonest available run of the 8 | * event loop. 9 | */ 10 | export default class AsyncScheduler extends TimeoutScheduler { 11 | constructor() { 12 | super(0); 13 | } 14 | 15 | /** 16 | * Execute the provided callback on the next tick of the event loop. 17 | * This is semantically equivalent to 18 | * 19 | * ```typescript 20 | * new AsyncScheduler(callback).start(); 21 | * ``` 22 | * 23 | * but with less overhead. 24 | * 25 | * @param callback the code to run. 26 | */ 27 | static nextTick(callback: () => void): void { 28 | setTimeout(callback, 0); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/scheduler/IntervalScheduler.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Scheduler from './Scheduler'; 5 | 6 | /** 7 | * [[IntervalScheduler]] calls the callback every intervalMs milliseconds. 8 | */ 9 | export default class IntervalScheduler implements Scheduler { 10 | timer: undefined | ReturnType; 11 | 12 | constructor(private intervalMs: number) {} 13 | 14 | start(callback: () => void): void { 15 | this.stop(); 16 | this.timer = setInterval(callback, this.intervalMs); 17 | } 18 | 19 | stop(): void { 20 | if (this.timer === undefined) { 21 | return; 22 | } 23 | clearInterval(this.timer); 24 | this.timer = undefined; 25 | } 26 | 27 | running(): boolean { 28 | return this.timer !== undefined; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/scheduler/Scheduler.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[Scheduler]] calls a callback on the schedule determined by the implementation. 6 | */ 7 | export default interface Scheduler { 8 | /** 9 | * Schedules the callback according to the implementation. 10 | */ 11 | start(callback: () => void): void; 12 | 13 | /** 14 | * Unschedules the callback and prevents it from being called anymore. 15 | */ 16 | stop(): void; 17 | } 18 | -------------------------------------------------------------------------------- /src/scheduler/TimeoutScheduler.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Scheduler from './Scheduler'; 5 | /** 6 | * [[TimeoutScheduler]] calls the callback once after timeoutMs milliseconds. 7 | */ 8 | export default class TimeoutScheduler implements Scheduler { 9 | // eslint-disable-next-line 10 | private timer: any = null; 11 | 12 | constructor(private timeoutMs: number) {} 13 | 14 | start(callback: () => void): void { 15 | this.stop(); 16 | this.timer = setTimeout(() => { 17 | clearTimeout(this.timer); 18 | callback(); 19 | }, this.timeoutMs); 20 | } 21 | 22 | stop(): void { 23 | if (this.timer !== null) { 24 | clearTimeout(this.timer); 25 | this.timer = null; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/sdp/SDPCandidateType.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum SDPCandidateType { 5 | Host = 'host', 6 | ServerReflexive = 'srflx', 7 | PeerReflexive = 'prflx', 8 | Relay = 'relay', 9 | } 10 | 11 | export default SDPCandidateType; 12 | -------------------------------------------------------------------------------- /src/sdp/SDPMediaSection.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * Represents parsed attributes of a media section (i.e. associated with a single m-line) 6 | */ 7 | export default class SDPMediaSection { 8 | mediaType: 'audio' | 'video'; 9 | mid: string; 10 | direction: RTCRtpTransceiverDirection; 11 | } 12 | -------------------------------------------------------------------------------- /src/sessionstatecontroller/SessionStateControllerAction.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[SessionStateControllerAction]] is a state-changing action to perform. 6 | */ 7 | export enum SessionStateControllerAction { 8 | Connect, 9 | FinishConnecting, 10 | Update, 11 | FinishUpdating, 12 | Reconnect, 13 | Disconnect, 14 | Fail, 15 | FinishDisconnecting, 16 | } 17 | 18 | export default SessionStateControllerAction; 19 | -------------------------------------------------------------------------------- /src/sessionstatecontroller/SessionStateControllerDeferPriority.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[SessionStateControllerDeferPriority]] indicates the priority level of the action 6 | * being deferred. For example, stop is more important than update so if forced 7 | * to pick between the two stop should be chosen. 8 | */ 9 | export enum SessionStateControllerDeferPriority { 10 | DoNotDefer = 0, 11 | Low = 1, 12 | Medium = 2, 13 | High = 3, 14 | VeryHigh = 4, 15 | } 16 | 17 | export default SessionStateControllerDeferPriority; 18 | -------------------------------------------------------------------------------- /src/sessionstatecontroller/SessionStateControllerState.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[SessionStateControllerState]] reflects the current connection state of the session. 6 | */ 7 | export enum SessionStateControllerState { 8 | NotConnected, 9 | Connecting, 10 | Connected, 11 | Updating, 12 | Disconnecting, 13 | } 14 | 15 | export default SessionStateControllerState; 16 | -------------------------------------------------------------------------------- /src/sessionstatecontroller/SessionStateControllerTransitionResult.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * Indicates the result of an attempted state transition. 6 | */ 7 | export enum SessionStateControllerTransitionResult { 8 | /** 9 | * The transition was successful. 10 | */ 11 | Transitioned, 12 | 13 | /** 14 | * No transition is available from the current state using that action. 15 | */ 16 | NoTransitionAvailable, 17 | 18 | /** 19 | * The transition will be tried on the next state. 20 | */ 21 | DeferredTransition, 22 | 23 | /** 24 | * An unexpected error occurred while transitioning to the next state. 25 | */ 26 | TransitionFailed, 27 | } 28 | 29 | export default SessionStateControllerTransitionResult; 30 | -------------------------------------------------------------------------------- /src/signalingclient/SignalingClientEventType.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** Defines the event types generated by SignalingClient and the underlying WebSocket connection. */ 5 | export enum SignalingClientEventType { 6 | WebSocketConnecting, 7 | WebSocketOpen, 8 | WebSocketError, 9 | WebSocketClosing, 10 | WebSocketClosed, 11 | WebSocketFailed, 12 | WebSocketMessage, 13 | WebSocketSendMessageFailure, 14 | WebSocketSentMessage, 15 | ProtocolDecodeFailure, 16 | ReceivedSignalFrame, 17 | WebSocketSkippedMessage, 18 | } 19 | 20 | export default SignalingClientEventType; 21 | -------------------------------------------------------------------------------- /src/signalingclient/SignalingClientJoin.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import ApplicationMetadata from '../applicationmetadata/ApplicationMetadata'; 5 | import ServerSideNetworkAdaption from './ServerSideNetworkAdaption'; 6 | 7 | /** 8 | * [[SignalingClientJoin]] contains settings for the Join SignalFrame. 9 | */ 10 | export default class SignalingClientJoin { 11 | serverSideNetworkAdaption: ServerSideNetworkAdaption = ServerSideNetworkAdaption.Default; 12 | supportedServerSideNetworkAdaptions: ServerSideNetworkAdaption[] = []; 13 | wantsAllTemporalLayersInIndex: boolean = false; 14 | disablePeriodicKeyframeRequestOnContentSender: boolean = false; 15 | 16 | /** 17 | * Initializes a SignalingClientJoin with the given properties. 18 | * @param applicationMetadata [[ApplicationMetadata]]. 19 | */ 20 | constructor(public readonly applicationMetadata?: ApplicationMetadata) {} 21 | } 22 | -------------------------------------------------------------------------------- /src/signalingclientobserver/SignalingClientObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import SignalingClientEvent from '../signalingclient/SignalingClientEvent'; 5 | 6 | /** 7 | * Instances of [[SignalingClientObserver]] can be registered with a 8 | * [[SignalingClient]] to receive notifications of events. 9 | */ 10 | export default interface SignalingClientObserver { 11 | /** Handles the events from the SignalingClient this observer is registered with. 12 | * 13 | * @param event The event being notified. 14 | */ 15 | handleSignalingClientEvent(event: SignalingClientEvent): void; 16 | } 17 | -------------------------------------------------------------------------------- /src/sigv4/SigV4.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[SigV4]] is a helper interface for sigv4 signing. 6 | */ 7 | export default interface SigV4 { 8 | /** 9 | * Sign a URL 10 | */ 11 | signURL( 12 | method: string, 13 | scheme: string, 14 | serviceName: string, 15 | hostname: string, 16 | path: string, 17 | payload: string, 18 | queryParams: Map | null 19 | ): Promise; 20 | } 21 | -------------------------------------------------------------------------------- /src/simulcastlayers/SimulcastLayers.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[SimulcastLayers]] represents simulcast layers for selected simulcast video streams. 6 | */ 7 | export enum SimulcastLayers { 8 | /** 9 | * Low resolution video stream. 10 | */ 11 | Low, 12 | /** 13 | * Low and medium resolution video streams. 14 | */ 15 | LowAndMedium, 16 | /** 17 | * Low and high resolution video streams. 18 | */ 19 | LowAndHigh, 20 | /** 21 | * Medium resolution video stream. 22 | */ 23 | Medium, 24 | /** 25 | * Medium and high resolution video streams. 26 | */ 27 | MediumAndHigh, 28 | /** 29 | * High resolution video stream. 30 | */ 31 | High, 32 | } 33 | 34 | export default SimulcastLayers; 35 | -------------------------------------------------------------------------------- /src/statscollector/AudioLogEvent.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum AudioLogEvent { 5 | DeviceChanged, 6 | MutedLocal, 7 | UnmutedLocal, 8 | Connected, 9 | ConnectFailed, 10 | RedmicStartLoss, 11 | RedmicEndLoss, 12 | } 13 | 14 | export default AudioLogEvent; 15 | -------------------------------------------------------------------------------- /src/statscollector/VideoLogEvent.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum VideoLogEvent { 5 | InputAttached, 6 | SendingFailed, 7 | SendingSuccess, 8 | } 9 | 10 | export default VideoLogEvent; 11 | -------------------------------------------------------------------------------- /src/task/CleanRestartedSessionTask.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import AudioVideoControllerState from '../audiovideocontroller/AudioVideoControllerState'; 5 | import BaseTask from './BaseTask'; 6 | 7 | export default class CleanRestartedSessionTask extends BaseTask { 8 | protected taskName = 'CleanRestartedSessionTask'; 9 | 10 | constructor(private context: AudioVideoControllerState) { 11 | super(context.logger); 12 | } 13 | 14 | async run(): Promise { 15 | this.context.resetConnectionSpecificState(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/task/NoOpTask.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Task from './Task'; 5 | 6 | export default class NoOpTask implements Task { 7 | cancel(): void {} 8 | 9 | name(): string { 10 | return 'NoOpTask'; 11 | } 12 | 13 | run(): Promise { 14 | return Promise.resolve(); 15 | } 16 | 17 | setParent(_parentTask: Task): void {} 18 | } 19 | -------------------------------------------------------------------------------- /src/task/RunnableTask.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Logger from '../logger/Logger'; 5 | import BaseTask from './BaseTask'; 6 | 7 | /** 8 | * [[RunnableTask]] Task wrapper for any Promised-operation 9 | */ 10 | export default class RunnableTask extends BaseTask { 11 | constructor(logger: Logger, private fn: () => Promise, taskName: string = 'RunnableTask') { 12 | super(logger); 13 | this.taskName = taskName; 14 | } 15 | 16 | run(): Promise { 17 | return this.fn().then(() => {}); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/task/TaskStatus.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | enum TaskStatus { 5 | IDLE = 'IDLE', 6 | RUNNING = 'RUNNING', 7 | CANCELED = 'CANCELED', 8 | FINISHED = 'FINISHED', 9 | } 10 | 11 | export default TaskStatus; 12 | -------------------------------------------------------------------------------- /src/taskcanceler/TaskCanceler.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /* 5 | * [[TaskCanceler]] cancel the task. 6 | */ 7 | export default interface TaskCanceler { 8 | /** 9 | * Cancel the task 10 | */ 11 | cancel(): void; 12 | } 13 | -------------------------------------------------------------------------------- /src/transcript/Transcript.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import TranscriptResult from './TranscriptResult'; 5 | 6 | export default class Transcript { 7 | results: TranscriptResult[]; 8 | } 9 | -------------------------------------------------------------------------------- /src/transcript/TranscriptAlternative.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import TranscriptEntity from './TranscriptEntity'; 5 | import TranscriptItem from './TranscriptItem'; 6 | 7 | export default class TranscriptAlternative { 8 | items: TranscriptItem[]; 9 | transcript: string; 10 | entities?: TranscriptEntity[]; 11 | } 12 | -------------------------------------------------------------------------------- /src/transcript/TranscriptItem.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Attendee from '../attendee/Attendee'; 5 | import TranscriptItemType from './TranscriptItemType'; 6 | 7 | export default class TranscriptItem { 8 | type: TranscriptItemType; 9 | startTimeMs: number; // epoch time 10 | endTimeMs: number; // epoch time 11 | attendee: Attendee; 12 | content: string; 13 | vocabularyFilterMatch?: boolean; 14 | confidence?: number; // confidence level of the predicted word ranging from 0 - 1 inclusive. 15 | stable?: boolean; 16 | } 17 | -------------------------------------------------------------------------------- /src/transcript/TranscriptItemType.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | enum TranscriptItemType { 5 | PRONUNCIATION = 'pronunciation', 6 | PUNCTUATION = 'punctuation', 7 | } 8 | 9 | export default TranscriptItemType; 10 | -------------------------------------------------------------------------------- /src/transcript/TranscriptResult.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import TranscriptAlternative from './TranscriptAlternative'; 5 | import TranscriptLanguageWithScore from './TranscriptLanguageWithScore'; 6 | 7 | export default class TranscriptResult { 8 | resultId: string; 9 | channelId?: string; 10 | isPartial: boolean; 11 | languageCode?: string; 12 | languageIdentification?: TranscriptLanguageWithScore[]; 13 | startTimeMs: number; // epoch time 14 | endTimeMs: number; // epoch time 15 | alternatives: TranscriptAlternative[]; 16 | } 17 | -------------------------------------------------------------------------------- /src/transcript/TranscriptionController.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import TranscriptEvent from './TranscriptEvent'; 5 | 6 | export default interface TranscriptionController { 7 | /** 8 | * Subscribe a callback to handle received transcript event 9 | */ 10 | subscribeToTranscriptEvent(callback: (transcriptEvent: TranscriptEvent) => void): void; 11 | 12 | /** 13 | * Unsubscribe a callback from receiving transcript event 14 | */ 15 | unsubscribeFromTranscriptEvent(callback: (transcriptEvent: TranscriptEvent) => void): void; 16 | } 17 | -------------------------------------------------------------------------------- /src/transcript/TranscriptionStatus.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import TranscriptionStatusType from './TranscriptionStatusType'; 5 | 6 | export default class TranscriptionStatus { 7 | type: TranscriptionStatusType; 8 | eventTimeMs: number; // epoch time 9 | transcriptionRegion: string; 10 | transcriptionConfiguration: string; 11 | message?: string; 12 | } 13 | -------------------------------------------------------------------------------- /src/transcript/TranscriptionStatusType.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | enum TranscriptionStatusType { 5 | STARTED = 'started', 6 | INTERRUPTED = 'interrupted', 7 | RESUMED = 'resumed', 8 | STOPPED = 'stopped', 9 | FAILED = 'failed', 10 | } 11 | 12 | export default TranscriptionStatusType; 13 | -------------------------------------------------------------------------------- /src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../config/tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /src/useragentparser/UserAgentParser.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[UserAgentParser]] is responsible to parse the browser's user agent 6 | * and provide the parsed result. 7 | */ 8 | export default interface UserAgentParser { 9 | /** 10 | * Provides resultant data after parsing browser user agent. 11 | */ 12 | getParserResult(): { [key: string]: string }; 13 | } 14 | -------------------------------------------------------------------------------- /src/utils/PromiseQueue.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * A simple promise queue to enforce the order of async APIs for example, start/stop video/audio input. 6 | */ 7 | export default class PromiseQueue { 8 | queue = Promise.resolve(); 9 | 10 | // eslint-disable-next-line 11 | add(func: () => Promise): Promise { 12 | return new Promise((resolve, reject) => { 13 | this.queue = this.queue.then(func).then(resolve).catch(reject); 14 | }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/videodownlinkbandwidthpolicy/NoVideoDownlinkBandwidthPolicy.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import ClientMetricReport from '../clientmetricreport/ClientMetricReport'; 5 | import DefaultVideoStreamIdSet from '../videostreamidset/DefaultVideoStreamIdSet'; 6 | import DefaultVideoStreamIndex from '../videostreamindex/DefaultVideoStreamIndex'; 7 | import VideoDownlinkBandwidthPolicy from './VideoDownlinkBandwidthPolicy'; 8 | 9 | export default class NoVideoDownlinkBandwidthPolicy implements VideoDownlinkBandwidthPolicy { 10 | reset(): void {} 11 | updateIndex(_videoIndex: DefaultVideoStreamIndex): void {} 12 | updateMetrics(_clientMetricReport: ClientMetricReport): void {} 13 | wantsResubscribe(): boolean { 14 | return false; 15 | } 16 | chooseSubscriptions(): DefaultVideoStreamIdSet { 17 | return new DefaultVideoStreamIdSet(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/videodownlinkbandwidthpolicy/TargetDisplaySize.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[TargetDisplaySize]] represents the max resolution that a video stream can have when simulcast is enabled in priority based downlink policy. 6 | * If there is only one stream being sent, then this field will get ignored. Its values currently parallel [[SimulcastLayers]]. 7 | */ 8 | export enum TargetDisplaySize { 9 | /** 10 | * Low resolution video stream. 11 | */ 12 | Low, 13 | 14 | /** 15 | * Medium resolution video stream. 16 | */ 17 | Medium, 18 | 19 | /** 20 | * High resolution video stream. 21 | */ 22 | High, 23 | 24 | /** 25 | * Maximum resolution video stream. 26 | */ 27 | Maximum, 28 | } 29 | 30 | export default TargetDisplaySize; 31 | -------------------------------------------------------------------------------- /src/videodownlinkbandwidthpolicy/VideoDownlinkObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default interface VideoDownlinkObserver { 5 | /** 6 | * Called when the downlink policy wants to pause the remote video tile 7 | * 8 | * Note that calling `VideoTileController.unpauseVideoTile` on tiles 9 | * indicated by this observer before `tileWillBeUnpausedByDownlinkPolicy` 10 | * is called may result in undefined behavior. 11 | */ 12 | tileWillBePausedByDownlinkPolicy(tileId: number): void; 13 | 14 | /** 15 | * Called when the downlink policy wants to unpause the remote video tile 16 | */ 17 | tileWillBeUnpausedByDownlinkPolicy(tileId: number): void; 18 | } 19 | -------------------------------------------------------------------------------- /src/videoelementfactory/VideoElementFactory.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[VideoElementFactory]] provides an interface for creating a video element. 6 | */ 7 | export default interface VideoElementFactory { 8 | /** 9 | * Creates a video element. 10 | */ 11 | create(): HTMLVideoElement; 12 | } 13 | -------------------------------------------------------------------------------- /src/videoframeprocessor/DefaultVideoTransformDeviceObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import VideoFrameProcessorPipelineObserver from './VideoFrameProcessorPipelineObserver'; 5 | 6 | // eslint-disable-next-line @typescript-eslint/no-empty-interface 7 | export default interface DefaultVideoTransformDeviceObserver 8 | extends VideoFrameProcessorPipelineObserver {} 9 | -------------------------------------------------------------------------------- /src/videoframeprocessor/NoOpVideoFrameProcessor.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import VideoFrameBuffer from './VideoFrameBuffer'; 5 | import VideoFrameProcessor from './VideoFrameProcessor'; 6 | 7 | /** 8 | * [[NoOpVideoFrameProcessor]] implements [[VideoFrameProcessor]]. 9 | * It's a no-op processor and input is passed to output directly. 10 | */ 11 | export default class NoOpVideoFrameProcessor implements VideoFrameProcessor { 12 | async process(buffers: VideoFrameBuffer[]): Promise { 13 | return buffers; 14 | } 15 | 16 | async destroy(): Promise { 17 | return; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/videoframeprocessor/VideoFrameProcessorTimer.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Destroyable from '../destroyable/Destroyable'; 5 | 6 | /** 7 | * [[VideoFrameProcessorTimer]] defines a timer used in the context of video frame processing. 8 | */ 9 | export default interface VideoFrameProcessorTimer extends Destroyable { 10 | /** 11 | * Starts the timer with a specified delay and callback function. 12 | * @param delay The delay in milliseconds after which the callback function should be invoked. 13 | * @param callback The function to be called when the timer expires. 14 | */ 15 | start(delay: number, callback: () => void): Promise; 16 | } 17 | -------------------------------------------------------------------------------- /src/videofx/VideoFxAssetParams.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[VideoFxAssetParams]] Is an interface for the specifications 6 | * that define the current version of the SDK. 7 | */ 8 | export interface VideoFxAssetParams { 9 | assetGroup: string; 10 | revisionID: string; 11 | // SDK Version 12 | sdk: string; 13 | // Browser setting (for example, chrome-110) 14 | ua: string; 15 | } 16 | -------------------------------------------------------------------------------- /src/videofx/VideoFxBlurStrength.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * A qualitative measure of the background blur strength. 6 | * Note: the underlying blur implementation, and therefore the perceived strength, may change between different versions. 7 | */ 8 | type VideoFxBlurStrength = 'low' | 'medium' | 'high'; 9 | 10 | export default VideoFxBlurStrength; 11 | -------------------------------------------------------------------------------- /src/videofx/VideoFxPaths.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * An interface to define the asset paths that will be loaded from CDN for video effects during meeting 6 | */ 7 | export interface VideoFxPaths { 8 | /** 9 | * Base path for CDN 10 | */ 11 | cdnBasePath: string; 12 | 13 | /** 14 | * Path to the web worker that will be processing video frames 15 | */ 16 | workerPath: string; 17 | 18 | /** 19 | * Path to the library responsible for managing and applying video effects like background blur or replacement. 20 | */ 21 | fxLibPath: string; 22 | } 23 | 24 | export default VideoFxPaths; 25 | -------------------------------------------------------------------------------- /src/videofx/VideoFxSpec.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import VideoFxPaths from './VideoFxPaths'; 5 | 6 | /** 7 | * An interface to specify customizable resources such as asset paths that will be presented as an input to VideoFxProcessor 8 | */ 9 | export interface VideoFxSpec { 10 | /** 11 | * Paths that will be loaded from CDN for video effects. 12 | */ 13 | paths?: VideoFxPaths; 14 | } 15 | 16 | export default VideoFxSpec; 17 | -------------------------------------------------------------------------------- /src/videofx/VideoFxStreamParameters.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /** 5 | * [[VideoFxStreamParameters]] describes the configuration of the current 6 | * video stream passing through the [[VideoFxProcessor]] 7 | */ 8 | export interface VideoFxStreamParameters { 9 | framerate: number; 10 | width: number; 11 | height: number; 12 | channels: number; 13 | } 14 | -------------------------------------------------------------------------------- /src/videosource/VideoSource.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import Attendee from '../attendee/Attendee'; 5 | 6 | /** 7 | * [[VideoSource]] contains the information of a video source. 8 | */ 9 | export default class VideoSource { 10 | /** 11 | * The attendee's information for a video source. 12 | */ 13 | attendee: Attendee; 14 | } 15 | -------------------------------------------------------------------------------- /src/videotilefactory/VideoTileFactory.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import DevicePixelRatioMonitor from '../devicepixelratiomonitor/DevicePixelRatioMonitor'; 5 | import VideoElementResolutionMonitor from '../videotile/VideoElementResolutionMonitor'; 6 | import VideoTile from '../videotile/VideoTile'; 7 | import VideoTileController from '../videotilecontroller/VideoTileController'; 8 | 9 | /** 10 | * [[VideoTileFactory]] provides an interface for creating a video tile. 11 | */ 12 | export default interface VideoTileFactory { 13 | /** 14 | * Creates a video tile. 15 | */ 16 | makeTile( 17 | tileId: number, 18 | localTile: boolean, 19 | tileController: VideoTileController, 20 | devicePixelRatioMonitor: DevicePixelRatioMonitor, 21 | resolutionMonitor?: VideoElementResolutionMonitor 22 | ): VideoTile; 23 | } 24 | -------------------------------------------------------------------------------- /src/videouplinkbandwidthpolicy/BitrateParameters.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default class BitrateParameters { 5 | minBitrateKbps: number; 6 | maxBitrateKbps: number; 7 | } 8 | -------------------------------------------------------------------------------- /src/videouplinkbandwidthpolicy/ConnectionMetrics.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default interface ConnectionMetrics { 5 | uplinkKbps?: number; 6 | nackCountPerSecond?: number; 7 | } 8 | -------------------------------------------------------------------------------- /src/videouplinkbandwidthpolicy/ContentShareSimulcastEncodingParameters.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import VideoEncodingParameters from './VideoEncodingParameters'; 5 | 6 | type ContentShareSimulcastEncodingParameters = { 7 | low?: VideoEncodingParameters; 8 | high?: VideoEncodingParameters; 9 | }; 10 | 11 | export default ContentShareSimulcastEncodingParameters; 12 | -------------------------------------------------------------------------------- /src/videouplinkbandwidthpolicy/SimulcastUplinkObserver.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import SimulcastLayers from '../simulcastlayers/SimulcastLayers'; 5 | 6 | export default interface SimulcastUplinkObserver { 7 | /** 8 | * Called when simulcast is enabled and simulcast uplink encoding layers get changed. 9 | */ 10 | encodingSimulcastLayersDidChange(simulcastLayers: SimulcastLayers): void; 11 | } 12 | -------------------------------------------------------------------------------- /src/videouplinkbandwidthpolicy/SimulcastUplinkPolicy.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import SimulcastUplinkObserver from './SimulcastUplinkObserver'; 5 | import VideoUplinkBandwidthPolicy from './VideoUplinkBandwidthPolicy'; 6 | 7 | export default interface SimulcastUplinkPolicy extends VideoUplinkBandwidthPolicy { 8 | /** 9 | * Adds SimulcastUplinkObserver to observe simulcast encoding 10 | * resolution layer changes 11 | */ 12 | addObserver(observer: SimulcastUplinkObserver): void; 13 | 14 | /** 15 | * Removes SimulcastUplinkObserver 16 | */ 17 | removeObserver(observer: SimulcastUplinkObserver): void; 18 | 19 | /** 20 | * Iterates through each observer, so that their notification functions may 21 | * be called. 22 | */ 23 | forEachObserver(observerFunc: (observer: SimulcastUplinkObserver) => void): void; 24 | } 25 | -------------------------------------------------------------------------------- /src/videouplinkbandwidthpolicy/VideoEncodingParameters.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | type VideoEncodingParameters = { 5 | maxBitrateKbps?: number; 6 | scaleResolutionDownBy?: number; 7 | maxFramerate?: number; 8 | }; 9 | 10 | export default VideoEncodingParameters; 11 | -------------------------------------------------------------------------------- /src/voicefocus/AGCOptions.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /* istanbul ignore next */ 5 | import type { AGCOptions } from '../../libs/voicefocus/types'; 6 | 7 | // Barrelizer re-export, assemble! 8 | export default AGCOptions; 9 | -------------------------------------------------------------------------------- /src/voicefocus/AssetSpec.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /* istanbul ignore next */ 5 | import type { AssetSpec } from '../../libs/voicefocus/voicefocus'; 6 | 7 | // Barrelizer re-export, assemble! 8 | export default AssetSpec; 9 | -------------------------------------------------------------------------------- /src/voicefocus/VoiceFocusConfig.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /* istanbul ignore next */ 5 | import type { VoiceFocusConfig } from '../../libs/voicefocus/voicefocus'; 6 | 7 | // Barrelizer re-export, assemble! 8 | export default VoiceFocusConfig; 9 | -------------------------------------------------------------------------------- /src/voicefocus/VoiceFocusDeviceOptions.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import { VoiceFocusFetchBehavior } from '../../libs/voicefocus/types'; 5 | import { AssetSpec } from '../../libs/voicefocus/voicefocus'; 6 | import Logger from '../logger/Logger'; 7 | 8 | /** 9 | * A set of options that can be supplied when creating an Amazon Voice Focus device. 10 | */ 11 | export default interface VoiceFocusDeviceOptions extends AssetSpec { 12 | /** A {@link Logger|Logger} to which log output will be written. */ 13 | logger?: Logger; 14 | /** If `true`, Amazon Voice Focus assets will be loaded from the network as soon as possible. 15 | * If `false`, load will be delayed until the device is used to create an input stream. */ 16 | preload?: boolean; 17 | 18 | /** @internal */ 19 | fetchBehavior?: VoiceFocusFetchBehavior; 20 | } 21 | -------------------------------------------------------------------------------- /src/voicefocus/VoiceFocusModelComplexity.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /* istanbul ignore next */ 5 | import { ModelVariant as VoiceFocusModelComplexity } from '../../libs/voicefocus/types'; 6 | 7 | // Barrelizer re-export, assemble! 8 | export default VoiceFocusModelComplexity; 9 | -------------------------------------------------------------------------------- /src/voicefocus/VoiceFocusModelName.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /* istanbul ignore next */ 5 | import { ModelName as VoiceFocusModelName } from '../../libs/voicefocus/types'; 6 | 7 | // Barrelizer re-export, assemble! 8 | export default VoiceFocusModelName; 9 | -------------------------------------------------------------------------------- /src/voicefocus/VoiceFocusPaths.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /* istanbul ignore next */ 5 | import type { VoiceFocusPaths } from '../../libs/voicefocus/types'; 6 | 7 | // Barrelizer re-export, assemble! 8 | export default VoiceFocusPaths; 9 | -------------------------------------------------------------------------------- /src/voicefocus/VoiceFocusSpec.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | /* istanbul ignore next */ 5 | import type { VoiceFocusSpec } from '../../libs/voicefocus/voicefocus'; 6 | 7 | // Barrelizer re-export, assemble! 8 | export default VoiceFocusSpec; 9 | -------------------------------------------------------------------------------- /src/websocketadapter/WebSocketReadyState.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum WebSocketReadyState { 5 | None, 6 | Connecting, 7 | Open, 8 | Closing, 9 | Closed, 10 | } 11 | export default WebSocketReadyState; 12 | -------------------------------------------------------------------------------- /test/backoff/FullJitterLimitedBackoff.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import * as chai from 'chai'; 5 | 6 | import FullJitterLimitedBackoff from '../../src/backoff/FullJitterLimitedBackoff'; 7 | 8 | describe('FullJitterLimitedBackoff', () => { 9 | const fixed = 1000; 10 | const short = 100; 11 | const long = 300; 12 | const limit = 1; 13 | 14 | describe('nextBackoffAmountMs', () => { 15 | it('is computed', () => { 16 | const subject = new FullJitterLimitedBackoff(fixed, short, long, limit); 17 | subject.nextBackoffAmountMs(); 18 | chai 19 | .expect(() => { 20 | subject.nextBackoffAmountMs(); 21 | }) 22 | .to.throw('retry limit exceeded'); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /test/customeventmock/CustomEventMock.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import CustomEventMockInit from './CustomEventMockInit'; 5 | 6 | export default class CustomEventMock { 7 | constructor(public readonly type: string, _eventInitDict?: CustomEventMockInit) {} 8 | } 9 | -------------------------------------------------------------------------------- /test/customeventmock/CustomEventMockInit.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 5 | export default interface CustomEventMockInit extends EventInit { 6 | detail?: T; 7 | } 8 | -------------------------------------------------------------------------------- /test/domblobmock/DOMBlobMock.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default class DOMBlobMock implements Blob { 5 | get size(): number { 6 | return 0; 7 | } 8 | 9 | get type(): string { 10 | return ''; 11 | } 12 | 13 | constructor(public readonly blobParts?: BlobPart[], public readonly options?: BlobPropertyBag) {} 14 | 15 | slice(_start?: number, _end?: number, _contentType?: string): Blob { 16 | return new Blob(); 17 | } 18 | 19 | arrayBuffer(): Promise { 20 | throw new Error('Unimplemented.'); 21 | } 22 | 23 | stream(): NodeJS.ReadableStream; 24 | 25 | stream(): ReadableStream; 26 | 27 | stream(): NodeJS.ReadableStream | ReadableStream { 28 | throw new Error('Unimplemented.'); 29 | } 30 | 31 | text(): Promise { 32 | throw new Error('Unimplemented.'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /test/dommock/DisplayMediaState.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum DisplayMediaState { 5 | Success, 6 | PermissionDenied, 7 | Failure, 8 | } 9 | 10 | export default DisplayMediaState; 11 | -------------------------------------------------------------------------------- /test/dommock/MockError.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default class MockError extends Error { 5 | constructor(name: string, message?: string) { 6 | super(message); 7 | this.name = name; 8 | } 9 | } 10 | 11 | export class OverconstrainedError extends Error { 12 | constructor(message: string, public constraint: string) { 13 | super(message); 14 | this.name = 'OverconstrainedError'; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/dommock/UserMediaState.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export enum UserMediaState { 5 | Success, 6 | PermissionDeniedError, 7 | NotReadableError, 8 | TrackStartError, 9 | NotFoundError, 10 | DevicesNotFoundError, 11 | NotAllowedError, 12 | OverconstrainedError, 13 | ConstraintNotSatisfiedError, 14 | TypeError, 15 | AbortError, 16 | SecurityError, 17 | Failure, 18 | GetUserMediaError, 19 | } 20 | 21 | export default UserMediaState; 22 | -------------------------------------------------------------------------------- /test/global/Global.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | const mochaTestDelayMs = parseInt(process.env.MOCHA_TEST_DELAY_MS); 5 | 6 | if (mochaTestDelayMs > 0) { 7 | beforeEach(done => { 8 | setTimeout(() => { 9 | done(); 10 | }, mochaTestDelayMs); 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /test/meetingsession/CreateMeetingResponseMock.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default class CreateMeetingResponseMock { 5 | static readonly MeetingResponseMock: unknown = { 6 | Meeting: { 7 | MeetingId: '123456', 8 | MediaPlacement: { 9 | AudioHostUrl: 'wss://audiohost/control/123456', 10 | ScreenDataUrl: 'wss://hostscreendatausl/123456', 11 | ScreenSharingUrl: 'wss://hostscreensharingurl/123456', 12 | ScreenViewUrl: '', 13 | SignalingUrl: 'wss://signalurl/control/123456', 14 | TurnControlUrl: '', 15 | }, 16 | }, 17 | }; 18 | 19 | static readonly AttendeeResponseMock: unknown = { 20 | Attendee: { 21 | ExternalUserId: 'leave', 22 | AttendeeId: 'join', 23 | JoinToken: 'can', 24 | }, 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /test/realtimecontroller/RealtimeAttendeePositionInFrame.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import * as chai from 'chai'; 5 | 6 | import RealtimeAttendeePositionInFrame from '../../src/realtimecontroller/RealtimeAttendeePositionInFrame'; 7 | 8 | describe('RealtimeAttendeePositionInFrame', () => { 9 | let expect: Chai.ExpectStatic; 10 | 11 | before(() => { 12 | expect = chai.expect; 13 | }); 14 | 15 | describe('default values for RealtimeState', () => { 16 | it('has the expected default values', () => { 17 | const positionInFrame = new RealtimeAttendeePositionInFrame(); 18 | expect(positionInFrame.attendeeIndex).to.be.null; 19 | expect(positionInFrame.attendeesInFrame).to.be.null; 20 | }); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /test/realtimecontroller/RealtimeState.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import * as chai from 'chai'; 5 | 6 | import RealtimeState from '../../src/realtimecontroller/RealtimeState'; 7 | 8 | describe('RealtimeState', () => { 9 | let expect: Chai.ExpectStatic; 10 | 11 | before(() => { 12 | expect = chai.expect; 13 | }); 14 | 15 | describe('default values for RealtimeState', () => { 16 | it('has the expected default values', () => { 17 | const state = new RealtimeState(); 18 | expect(state.muted).to.be.false; 19 | expect(state.canUnmute).to.be.true; 20 | expect(Object.keys(state.volumeIndicatorCallbacks).length).to.equal(0); 21 | }); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /test/responsemock/ResponseMock.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export default class ResponseMock { 5 | constructor(_blob: Blob) {} 6 | 7 | arrayBuffer(): Promise { 8 | return Promise.resolve(new ArrayBuffer(0)); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/scheduler/AsyncScheduler.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import * as chai from 'chai'; 5 | 6 | import AsyncScheduler from '../../src/scheduler/AsyncScheduler'; 7 | 8 | describe('AsyncScheduler', () => { 9 | let expect: Chai.ExpectStatic; 10 | before(() => { 11 | expect = chai.expect; 12 | }); 13 | 14 | it('can be constructed', () => { 15 | const asyncScheduler = new AsyncScheduler(); 16 | expect(asyncScheduler).to.not.equal(null); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /test/signalingclient/SignalingClientConnectionRequest.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import * as chai from 'chai'; 5 | 6 | import SignalingClientConnectionRequest from '../../src/signalingclient/SignalingClientConnectionRequest'; 7 | 8 | describe('SignalingClientConnectionRequest', () => { 9 | const expect: Chai.ExpectStatic = chai.expect; 10 | const fullSignalingURL = 11 | 'signalingurl/control/conferenceid?X-Chime-Control-Protocol-Version=3&X-Amzn-Chime-Send-Close-On-Error=1'; 12 | describe('url', () => { 13 | it('use the url as given if it is already fully constructed', () => { 14 | const request = new SignalingClientConnectionRequest( 15 | 'signalingurl/control/conferenceid', 16 | 'sessiontoken' 17 | ); 18 | expect(request.url()).to.equal(fullSignalingURL); 19 | }); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /test/task/NoOpTask.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import NoOpTask from '../../src/task/NoOpTask'; 5 | 6 | describe('NoOpTask', () => { 7 | describe('cancel', () => { 8 | it('cancels', () => { 9 | new NoOpTask().cancel(); 10 | }); 11 | }); 12 | describe('name', () => { 13 | it('gets name', () => { 14 | new NoOpTask().name(); 15 | }); 16 | }); 17 | describe('run', () => { 18 | it('runs', () => { 19 | new NoOpTask().run(); 20 | }); 21 | }); 22 | describe('setParent', () => { 23 | it('sets parent', () => { 24 | new NoOpTask().setParent(undefined); 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "COMMENT": "This file exists because typescript-eslint/parser needs every file to be explicitly included in a project.", 3 | "extends": "../config/tsconfig.base.json", 4 | "compilerOptions": { 5 | "outDir": "./test-build" 6 | }, 7 | "references": [{ 8 | "path": "../config/tsconfig.json" 9 | }], 10 | "include": [ 11 | "./**/*" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /test/utils.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | export function delay(timeoutMs: number): Promise { 5 | return new Promise(resolve => setTimeout(resolve, timeoutMs)); 6 | } 7 | 8 | /** 9 | * Return a promise that rejects after timeout and offers a function to resolve. 10 | */ 11 | export function shortcut(timeoutMs: number): { done: (t: T) => void; wait: Promise } { 12 | let done; 13 | const wait = Promise.race([ 14 | new Promise((resolve, _reject) => { 15 | done = (v: T) => { 16 | resolve(v); 17 | }; 18 | }), 19 | new Promise((_resolve, reject) => { 20 | setTimeout(() => { 21 | reject('timeout hit'); 22 | }, timeoutMs); 23 | }), 24 | ]); 25 | return { done, wait }; 26 | } 27 | -------------------------------------------------------------------------------- /test/utils/Maybe.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import * as chai from 'chai'; 5 | 6 | import { Maybe } from '../../src/utils/Types'; 7 | 8 | describe('Maybe', () => { 9 | describe('::of', () => { 10 | describe('with null', () => { 11 | it('is none', () => { 12 | chai.expect(Maybe.of(null).isNone).to.be.true; 13 | }); 14 | }); 15 | 16 | describe('with undefined', () => { 17 | it('is none', () => { 18 | chai.expect(Maybe.of(undefined).isNone).to.be.true; 19 | }); 20 | }); 21 | 22 | describe('without null', () => { 23 | it('is some', () => { 24 | chai.expect(Maybe.of('some').isSome).to.be.true; 25 | }); 26 | }); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /test/utils/Types.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import { expect } from 'chai'; 5 | 6 | import { Maybe, None, Some } from '../../src/'; 7 | 8 | describe('index.ts imports of Types', () => { 9 | it('makes istanbul stop complaining about public exports', () => { 10 | expect(Maybe).to.not.be.undefined; 11 | expect(None).to.not.be.undefined; 12 | expect(Some).to.not.be.undefined; 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /test/videotile/VideoTileState.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import * as chai from 'chai'; 5 | 6 | import VideoTileState from '../../src/videotile/VideoTileState'; 7 | 8 | describe('VideoTileState', () => { 9 | let assert: Chai.AssertStatic; 10 | let expect: Chai.ExpectStatic; 11 | 12 | before(() => { 13 | assert = chai.assert; 14 | expect = chai.expect; 15 | }); 16 | 17 | describe('construction', () => { 18 | it('can be constructed', () => { 19 | assert.exists(new VideoTileState()); 20 | }); 21 | }); 22 | 23 | describe('clone', () => { 24 | it('returns a copy', () => { 25 | const state = new VideoTileState(); 26 | state.streamId = 255; 27 | const copy = state.clone(); 28 | expect(copy).be.deep.equal(state); 29 | state.tileId = 5; 30 | expect(copy).not.deep.equal(state); 31 | }); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /test/voicefocus/MockLogger.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import * as sinon from 'sinon'; 5 | 6 | import Logger from '../../src/logger/Logger'; 7 | import LogLevel from '../../src/logger/LogLevel'; 8 | 9 | export class MockLogger implements Logger { 10 | private level: LogLevel = LogLevel.DEBUG; 11 | warn = sinon.spy(); 12 | debug = sinon.spy(); 13 | info = sinon.spy(); 14 | error = sinon.spy(); 15 | 16 | setLogLevel(level: LogLevel): void { 17 | this.level = level; 18 | } 19 | 20 | getLogLevel(): LogLevel { 21 | return this.level; 22 | } 23 | } 24 | --------------------------------------------------------------------------------