├── .eslintrc ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .project ├── CONTRIBUTING.md ├── LICENSE ├── QUERY_PARAMS.md ├── README.md ├── assets ├── Red5_Truetime_black.png ├── red5pro_logo.png └── red5pro_logo.svg ├── configuration.json ├── gulpfile.js ├── package-lock.json ├── package.json ├── scripts ├── LICENSE.css ├── LICENSE.html ├── LICENSE.js ├── clean-dist-sm2.sh ├── inject-license-css-source.sh ├── inject-license-html-template.sh ├── inject-license-js-source.sh └── inject-license.sh ├── src ├── page │ ├── index.html │ ├── proxy-publisher.html │ ├── proxy-screenshare.html │ ├── proxy-subscriber-all-edge.html │ ├── proxy-subscriber-amount.html │ ├── proxy-subscriber.html │ ├── r5-player.html │ ├── sample-mixer-pages │ │ ├── 2x2 │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── subscriber-block.js │ │ ├── 3x3 │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── subscriber-block.js │ │ ├── 7x7 │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── subscriber-block.js │ │ ├── conference │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── presenter-flow-viewer.js │ │ └── nxn │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── subscriber-block.js │ ├── sm-mixer │ │ ├── conferenceHostStreamManagerProxy │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ ├── presenter-flow-viewer.html │ │ │ └── presenter-flow-viewer.js │ │ ├── conferenceParticipantStreamManagerProxy │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── publisher-settings.js │ │ └── gridMixerCompositionStreamManagerProxy │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ ├── sm-test │ │ ├── ConferenceAPIStreamManagerProxy │ │ │ ├── README.md │ │ │ ├── conference-service.js │ │ │ ├── conference-subscriber.js │ │ │ ├── device-selector-util.js │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── ConferenceStreamManagerProxy │ │ │ ├── README.md │ │ │ ├── conference-subscriber.js │ │ │ ├── device-selector-util.js │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── TwoWayStreamManagerProxy │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── brewMixerSM │ │ │ ├── README.md │ │ │ ├── assets │ │ │ │ ├── 2x2.svg │ │ │ │ ├── 3x3.svg │ │ │ │ ├── 4x4.svg │ │ │ │ ├── close_button.svg │ │ │ │ ├── mic.svg │ │ │ │ ├── mic_active.svg │ │ │ │ ├── render_tree.svg │ │ │ │ ├── stop_button.svg │ │ │ │ ├── volume_off.svg │ │ │ │ └── volume_on.svg │ │ │ ├── brewmixer.js │ │ │ ├── coord-util.js │ │ │ ├── css │ │ │ │ └── style.css │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── castlabsPublishStreamManagerProxy │ │ │ ├── README.md │ │ │ ├── encrypt-worker.js │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── castlabsStreamManagerProxy │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── castlabsWatermarkStreamManagerProxy │ │ │ ├── README.md │ │ │ ├── castlabs-service.js │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── watermarked-image.png │ │ ├── playbackVODStreamManager │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── playbackVODStreamManagerList │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProvisionForm │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxy │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyAMFMetadata │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyAudioSettings │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyAudioTranscoder │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyCamera │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyDataChannel │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyMultiOriginRequest │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyMultiOriginStrictRequest │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyRecord │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyRoundTripAuth │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyScreenShare │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxySettings │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyTranscoderPOST │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyTranscoderPOSTauth │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyTranscoderPOSTauthAMF │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerProxyValidation │ │ │ ├── README.md │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishStreamManagerSocialPusher │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeBackupStreamSwitchStreammanager │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxy │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyAMFMetadata │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyAMFMetadataVOD │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyDataChannel │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyInterstitial │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyLiveVOD │ │ │ ├── README.md │ │ │ ├── controls.js │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyMute │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyReconnect │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyRoundTripAuth │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyScreenShare │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxySwitch │ │ │ ├── Readme.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyTranscoderHLS │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyTranscoderRTC │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyTranscoderRTMP │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStreamManagerProxyVP8 │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ └── subscribeStreamManagerProxyValidation │ │ │ ├── README.md │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ └── index.js │ ├── test │ │ ├── castlabs │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── castlabsPublish │ │ │ ├── README.md │ │ │ ├── encrypt-worker.js │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── castlabsWatermark │ │ │ ├── README.md │ │ │ ├── castlabs-service.js │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── watermarked-image.png │ │ ├── conference-api │ │ │ ├── README.md │ │ │ ├── conference-service.js │ │ │ ├── conference-subscriber.js │ │ │ ├── device-selector-util.js │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── conference-streams-api │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── conference │ │ │ ├── README.md │ │ │ ├── conference-subscriber.js │ │ │ ├── device-selector-util.js │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── conferenceComposite │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── conferenceParticipant │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── playbackVOD │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publish │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publish1080 │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishAMFMetadata │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishAppend │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishAudioCustomSettingsWebRTC │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishAuth │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishAvailableHDSettings │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishCall │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishCameraResize │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── red5pro-camera-resize-publisher.swf │ │ ├── publishCameraSource │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishCameraSwap │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishCodecSupport │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishCustomSettingsWebRTC │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishDataChannel │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishEncodings │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishFlashvars │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishHQAudio │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishImageCapture │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishMediaStreamCamera │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishMute │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishRecord │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishRemoteCall │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishRoundTripAuth │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishScreenShare │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishScreenShareWithExtension │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishSendLog │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishSocialPusher │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishUnpublish │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishVP8 │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishValidation │ │ │ ├── README.md │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── publishWHIP │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribe │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribe360 │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── renderer-360.js │ │ ├── subscribeAMFMetadata │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeAMFMetadataVOD │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeAudioOnly │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeAuth │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeCall │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeCluster │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeCodecSupport │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeDataChannel │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeHLS │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeImageCapture │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeInterstitial │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeLiveVOD │ │ │ ├── README.md │ │ │ ├── controls.js │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeMobile │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeMute │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeReconnect │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeRemoteCall │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeRetryOnInvalidName │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeRoundTripAuth │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeScreenShare │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeSendLog │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeStandby │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeSwitch │ │ │ ├── Readme.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeTwoStreams │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeValidation │ │ │ ├── README.md │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeVideoMute │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeWHEP │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribeh264 │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── subscribevp8 │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ │ └── twoWay │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ └── index.js │ ├── testbed-menu-mixer-sample-pages.html │ ├── testbed-menu-mixer-sm.html │ ├── testbed-menu-sm.html │ └── testbed-menu.html └── template │ └── partial │ ├── body-scripts.hbs │ ├── error-notification.hbs │ ├── footer.hbs │ ├── header-scripts.hbs │ ├── header-stylesheets.hbs │ ├── license.hbs │ ├── meta.hbs │ ├── mobile-subscriber-util.hbs │ ├── navigation.hbs │ ├── settings-link.hbs │ ├── sm-proxy-notification.hbs │ ├── sm-scripts.hbs │ ├── statistics-field.hbs │ ├── status-field-publisher.hbs │ ├── status-field-subscriber.hbs │ ├── test-info.hbs │ ├── test-title.hbs │ ├── top-bar.hbs │ ├── transcoder-form.hbs │ └── version.hbs └── static ├── css ├── assets │ ├── Red5Pro_logo_white_red.svg │ └── red5pro_logo.png ├── conference.css ├── modal.css ├── reset.css ├── testbed.css └── video-filters.css ├── favicon.ico ├── fonts ├── Lato-Bold.ttf ├── Lato-Regular.ttf ├── fontawesome-webfont.eot ├── fontawesome-webfont.svg ├── fontawesome-webfont.ttf └── fontawesome-webfont.woff ├── images ├── 2x2.png ├── 3x3.png ├── 4x4.png ├── 6x4.png ├── Red5_Truetime.png ├── arrow_down.svg ├── arrow_left.svg ├── black-arrow.svg ├── loading.svg ├── red-arrow-right.svg └── white-arrow.svg ├── lib ├── bootstrap │ └── css │ │ └── bootstrap.min.css ├── castlabs │ ├── crypto │ │ ├── clcrypto.js │ │ └── clcrypto.wasm │ └── rtc-drm-transform │ │ └── rtc-drm-transform.min.js ├── es6 │ ├── es6-array.js │ ├── es6-bind.js │ ├── es6-fetch-LICENSE │ ├── es6-fetch.js │ ├── es6-object-assign.js │ ├── es6-promise-LICENSE │ └── es6-promise.min.js ├── font-awesome │ ├── css │ │ └── font-awesome.min.css │ └── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── red5pro-ext │ ├── README.md │ └── red5pro-ext-stream-manager.min.js ├── red5pro │ ├── CHANGES.md │ ├── CONFERENCE_PARTICIPANT_README.md │ ├── LICENSE │ ├── MIGRATION_GUIDE.md │ ├── PLAYBACK_CONTROLS.md │ ├── PUBLISHER_README.md │ ├── README.md │ ├── SUBSCRIBER_README.md │ ├── WHIP_WHEP_README.md │ ├── icons │ │ ├── LICENSE │ │ ├── maximize.png │ │ ├── maximize.svg │ │ ├── minimize.png │ │ ├── minimize.svg │ │ ├── pause.png │ │ ├── pause.svg │ │ ├── play.png │ │ ├── play.svg │ │ ├── volume-2.png │ │ ├── volume-2.svg │ │ ├── volume-x.png │ │ └── volume-x.svg │ ├── red5pro-media.css │ ├── red5pro-publisher.swf │ ├── red5pro-sdk.min.js │ └── red5pro-subscriber.swf ├── screenfull │ ├── license │ └── screenfull.min.js ├── smartmenus-1.1.0 │ ├── LICENSE-MIT │ ├── README.md │ ├── css │ │ ├── sm-clean │ │ │ ├── _mixins.scss │ │ │ ├── _sm-clean-theme.scss │ │ │ ├── mixins │ │ │ │ ├── _round-corners-last-item.scss │ │ │ │ └── _sub-items-indentation.scss │ │ │ ├── sm-clean.css │ │ │ ├── sm-clean.css.map │ │ │ └── sm-clean.scss │ │ └── sm-core-css.css │ ├── jquery.smartmenus.js │ ├── jquery.smartmenus.min.js │ └── libs │ │ └── jquery │ │ └── jquery.js └── swfobject │ ├── LICENSE │ ├── playerProductInstall.swf │ └── swfobject.js └── script ├── conference-subscriber-block.js ├── mock-fetch.js ├── publisher-status.js ├── reachability.js ├── red5pro-utils.js ├── sm-api.js ├── subscription-status.js ├── testbed-config.js └── url-params.js /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@babel/eslint-parser", 3 | "env": { 4 | "browser": true, 5 | "es2021": true 6 | }, 7 | "rules": { 8 | "no-console": 0 9 | }, 10 | "globals": {}, 11 | "parserOptions": { 12 | "requireConfigFile": false, 13 | "ecmaVersion": 2018 14 | }, 15 | "extends": ["eslint:recommended", "prettier"], 16 | "plugins": ["prettier"] 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Logs 4 | logs 5 | *.log 6 | 7 | # Runtime data 8 | pids 9 | *.pid 10 | *.seed 11 | 12 | # Directory for instrumented libs generated by jscoverage/JSCover 13 | lib-cov 14 | 15 | # Coverage directory used by tools like istanbul 16 | coverage 17 | 18 | # node-waf configuration 19 | .lock-wscript 20 | 21 | # Dependency directory 22 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 23 | node_modules 24 | 25 | # Build 26 | build/ 27 | dist/ 28 | dist-webapp/ 29 | build-and-deploy-html5.sh 30 | testbeds.tarz 31 | 32 | # VSCode 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.hbs 2 | *.html 3 | **/*.min.js 4 | **/*.min.css 5 | src/page/test/castlabs/dummyframe.js 6 | src/page/test/castlabs/worker.js 7 | src/page/sm-test/castlabsStreamManagerProxy/dummyframe.js 8 | src/page/sm-test/castlabsStreamManagerProxyv/worker.js 9 | 10 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": false, 6 | "singleQuote": true, 7 | "quoteProps": "as-needed", 8 | "jsxSingleQuote": false, 9 | "trailingComma": "none", 10 | "bracketSpacing": true, 11 | "jsxBracketSameLine": false, 12 | "arrowParens": "avoid", 13 | "requirePragma": false, 14 | "insertPragma": false, 15 | "proseWrap": "preserve", 16 | "htmlWhitespaceSensitivity": "css", 17 | "endOfLine": "auto", 18 | "parser": "typescript" 19 | } 20 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | streaming-html5 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.common.project.facet.core.builder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.validation.validationbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.wst.common.project.facet.core.nature 21 | org.eclipse.wst.common.modulecore.ModuleCoreNature 22 | org.eclipse.wst.jsdt.core.jsNature 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2015 Infrared5, Inc. All rights reserved. 2 | 3 | The accompanying code comprising examples for use solely in conjunction with Red5 Pro (the "Example Code") 4 | is licensed to you by Infrared5 Inc. in consideration of your agreement to the following 5 | license terms and conditions. Access, use, modification, or redistribution of the accompanying 6 | code constitutes your acceptance of the following license terms and conditions. 7 | 8 | Permission is hereby granted, free of charge, to you to use the Example Code and associated documentation 9 | files (collectively, the "Software") without restriction, including without limitation the rights to use, 10 | copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 11 | persons to whom the Software is furnished to do so, subject to the following conditions: 12 | 13 | The Software shall be used solely in conjunction with Red5 Pro. Red5 Pro is licensed under a separate end 14 | user license agreement (the "EULA"), which must be executed with Infrared5, Inc. 15 | An example of the EULA can be found on our website at: https://account.red5.net/assets/LICENSE.txt. 16 | 17 | The above copyright notice and this license shall be included in all copies or portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 20 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 | NONINFRINGEMENT. IN NO EVENT SHALL INFRARED5, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 23 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /assets/Red5_Truetime_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5pro/streaming-html5/4501fc76c5a4675d42cac36021f1bbb4701d4b3a/assets/Red5_Truetime_black.png -------------------------------------------------------------------------------- /assets/red5pro_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5pro/streaming-html5/4501fc76c5a4675d42cac36021f1bbb4701d4b3a/assets/red5pro_logo.png -------------------------------------------------------------------------------- /configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Red5 Pro HTML SDK Testbed", 3 | "webappName": "webrtcexamples", 4 | "webappSource": "./", 5 | "buildCommand": "npm install && npm run dist:webapp", 6 | "webappOutput": "dist-webapp" 7 | } 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "red5pro-html-sdk-testbed", 3 | "version": "14.2.0", 4 | "description": "Testbed examples for Red5 Pro HTML SDK", 5 | "main": "src/js/index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/infrared5/red5pro-html-sdk-testbed.git" 9 | }, 10 | "keywords": [ 11 | "Red5", 12 | "Red5Pro", 13 | "Testbed", 14 | "HTML", 15 | "SDK" 16 | ], 17 | "author": "Infrared5, Inc.", 18 | "license": "LICENSE", 19 | "bugs": { 20 | "url": "https://github.com/infrared5/red5pro-html-sdk-testbed/issues" 21 | }, 22 | "homepage": "https://github.com/infrared5/red5pro-html-sdk-testbed#readme", 23 | "devDependencies": { 24 | "@babel/eslint-parser": "^7.17.0", 25 | "babel-eslint": "^10.1.0", 26 | "eslint": "^8.9.0", 27 | "eslint-plugin-prettier": "^4.2.1", 28 | "eslint-config-prettier": "^8.8.0", 29 | "gulp": "^4.0.2", 30 | "gulp-bump": "^2.4.0", 31 | "gulp-compile-handlebars": "^0.6.1", 32 | "gulp-rename": "^1.4.0", 33 | "gulp-replace": "^1.0.0", 34 | "mkdirp": "^1.0.4", 35 | "prettier": "^2.8.7" 36 | }, 37 | "scripts": { 38 | "test": "echo \"Error: no test specified\" && exit 1", 39 | "clean:build": "rm -rf build", 40 | "clean:dist": "rm -rf dist", 41 | "prebuild": "./scripts/inject-license.sh", 42 | "build": "NODE_ENV=develop gulp build", 43 | "predist": "npm run clean:dist && npm run prebuild", 44 | "dist": "gulp bump-version && NODE_ENV=production gulp build", 45 | "dist:webapp": "NODE_ENV=production gulp build:webapp" 46 | }, 47 | "dependencies": { 48 | "@babel/core": "^7.17.4" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /scripts/LICENSE.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2015 Infrared5, Inc. All rights reserved. 3 | 4 | The accompanying code comprising examples for use solely in conjunction with Red5 Pro (the "Example Code") 5 | is licensed to you by Infrared5 Inc. in consideration of your agreement to the following 6 | license terms and conditions. Access, use, modification, or redistribution of the accompanying 7 | code constitutes your acceptance of the following license terms and conditions. 8 | 9 | Permission is hereby granted, free of charge, to you to use the Example Code and associated documentation 10 | files (collectively, the "Software") without restriction, including without limitation the rights to use, 11 | copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 12 | persons to whom the Software is furnished to do so, subject to the following conditions: 13 | 14 | The Software shall be used solely in conjunction with Red5 Pro. Red5 Pro is licensed under a separate end 15 | user license agreement (the "EULA"), which must be executed with Infrared5, Inc. 16 | An example of the EULA can be found on our website at: https://account.red5.net/assets/LICENSE.txt. 17 | 18 | The above copyright notice and this license shall be included in all copies or portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 21 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL INFRARED5, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 23 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 24 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | */ 26 | -------------------------------------------------------------------------------- /scripts/LICENSE.html: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /scripts/LICENSE.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2015 Infrared5, Inc. All rights reserved. 3 | 4 | The accompanying code comprising examples for use solely in conjunction with Red5 Pro (the "Example Code") 5 | is licensed to you by Infrared5 Inc. in consideration of your agreement to the following 6 | license terms and conditions. Access, use, modification, or redistribution of the accompanying 7 | code constitutes your acceptance of the following license terms and conditions. 8 | 9 | Permission is hereby granted, free of charge, to you to use the Example Code and associated documentation 10 | files (collectively, the "Software") without restriction, including without limitation the rights to use, 11 | copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 12 | persons to whom the Software is furnished to do so, subject to the following conditions: 13 | 14 | The Software shall be used solely in conjunction with Red5 Pro. Red5 Pro is licensed under a separate end 15 | user license agreement (the "EULA"), which must be executed with Infrared5, Inc. 16 | An example of the EULA can be found on our website at: https://account.red5.net/assets/LICENSE.txt. 17 | 18 | The above copyright notice and this license shall be included in all copies or portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 21 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL INFRARED5, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 23 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 24 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | */ 26 | -------------------------------------------------------------------------------- /scripts/clean-dist-sm2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sleep 3 4 | cd dist-webapp 5 | sed -i.bak '/]*class="[^"]*top-level-listing[^"]*"[^>]*>.*<\/li>/d' testbed-menu-sm.html 6 | rm testbed-menu.html 7 | rm testbed-menu-sm.html.bak 8 | mv testbed-menu-sm.html testbed-menu.html 9 | 10 | -------------------------------------------------------------------------------- /scripts/inject-license-css-source.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # = NOTE = 4 | # Use at root of repository: ./scripts/inject-license-js-source.sh 5 | SRC=$(realpath src) 6 | CSS=$(realpath static/css) 7 | STRING="Copyright © 2015 Infrared5" 8 | LICENSE=$(realpath scripts/LICENSE.css) 9 | 10 | # clobber 11 | # find "${SRC}/" -type f -name "*.css" -exec sh -c "cat scripts/LICENSE.css {} > $$.tmp && mv $$.tmp {}" \; 12 | 13 | # check to see if already has license... 14 | echo "Traversing ${SRC}..." 15 | while IFS= read -r -d '' file; do 16 | if grep -q "$STRING" "$file"; then 17 | echo "$file" 18 | echo "Already has license..." 19 | else 20 | cat "$LICENSE" "$file" > $$.tmp && mv $$.tmp "$file" 21 | fi 22 | done < <(find "${SRC}/" -type f -name "*.css" -print0) 23 | 24 | echo "Traversing ${CSS}..." 25 | while IFS= read -r -d '' file; do 26 | if grep -q "$STRING" "$file"; then 27 | echo "$file" 28 | echo "Already has license..." 29 | else 30 | cat "$LICENSE" "$file" > $$.tmp && mv $$.tmp "$file" 31 | fi 32 | done < <(find "${CSS}/" -type f -name "*.css" -print0) 33 | -------------------------------------------------------------------------------- /scripts/inject-license-html-template.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # = NOTE = 4 | # Use at root of repository: ./scripts/inject-license-js-source.sh 5 | SRC=$(realpath src) 6 | STRING="{{> license}}" 7 | 8 | # clobber 9 | # find "${SRC}/" -type f -name "*.html" -exec sed -i '1 a {{> license}}' {} \; 10 | 11 | # check to see if already has license... 12 | echo "Traversing ${SRC}..." 13 | while IFS= read -r -d '' file; do 14 | if grep -q "$STRING" "$file"; then 15 | echo "$file" 16 | echo "Already has license..." 17 | else 18 | sed -i '1 a {{> license}}' "$file" 19 | fi 20 | done < <(find "${SRC}/" -type f -name "*.html" -print0) 21 | -------------------------------------------------------------------------------- /scripts/inject-license-js-source.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # = NOTE = 4 | # Use at root of repository: ./scripts/inject-license-js-source.sh 5 | SRC=$(realpath src) 6 | SCRIPT=$(realpath static/script) 7 | STRING="Copyright © 2015 Infrared5" 8 | LICENSE=$(realpath scripts/LICENSE.js) 9 | 10 | # clobber 11 | # find "${SRC}/" -type f -name "*.js" -exec sh -c "cat scripts/LICENSE.js {} > $$.tmp && mv $$.tmp {}" \; 12 | 13 | # check to see if already has license... 14 | echo "Traversing ${SRC}..." 15 | while IFS= read -r -d '' file; do 16 | b=$(basename $file) 17 | if grep -q "$STRING" "$file"; then 18 | echo "$file" 19 | echo "Already has license..." 20 | elif [ "$b" == "renderer-360.js" ] 21 | then 22 | echo "Skipping... $b" 23 | elif [ "$b" == "encrypt-worker.js" ] || [ "$b" == "decrypt-worker.js" ] 24 | then 25 | echo "Skipping... $b" 26 | else 27 | cat "$LICENSE" "$file" > $$.tmp && mv $$.tmp "$file" 28 | fi 29 | done < <(find "${SRC}/" -type f -name "*.js" -print0) 30 | 31 | echo "Traversing ${SCRIPT}..." 32 | while IFS= read -r -d '' file; do 33 | if grep -q "$STRING" "$file"; then 34 | echo "$file" 35 | echo "Already has license..." 36 | else 37 | cat "$LICENSE" "$file" > $$.tmp && mv $$.tmp "$file" 38 | fi 39 | done < <(find "${SCRIPT}/" -type f -name "*.js" -print0) 40 | -------------------------------------------------------------------------------- /scripts/inject-license.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | bash ./scripts/inject-license-css-source.sh 4 | bash ./scripts/inject-license-html-template.sh 5 | bash ./scripts/inject-license-js-source.sh 6 | -------------------------------------------------------------------------------- /src/page/sample-mixer-pages/2x2/README.md: -------------------------------------------------------------------------------- 1 | # 2x2 Grid 2 | 3 | This is an example of a 2x2 grid that can compose up to four streams into a single grid. Additionally, the 2x2 grid can be used together with the [3x3 grid](../3x3/) to create compositions of compositions. In that case, a first layer of mixers can use the 3x3 grid to compose a set of source streams and publish the mixed stream to a final mixer using the 2x2 grid, and thus creating a 6x6 grid composition. 4 | 5 | The HTML5 page includes a 2x2 flex box grid with video players that can subscribe to live streams. The list of live streams is sent over WebSockets together with the action to apply to each stream. The actions include add, remove, mute and unmute. The streams to subscribe to and related actions are provided in real-time by a Host through the [Stream Manager Grid Mixer Composition Testbed](../../sm-mixer/gridMixerCompositionStreamManagerProxy/). -------------------------------------------------------------------------------- /src/page/sample-mixer-pages/3x3/README.md: -------------------------------------------------------------------------------- 1 | # 3x3 Grid 2 | 3 | This is an example of a 3x3 grid that can compose up to nine streams into a single grid. Additionally, the 3x3 grid can be used together with the [2x2 grid](../2x2/) to create compositions of compositions. In that case, a first layer of mixers can use the 3x3 grid to compose a set of source streams and publish the mixed stream to a final mixer using the 2x2 grid, and thus creating a 6x6 grid composition. 4 | 5 | The HTML5 page includes a 3x3 flex box grid with video players that can subscribe to live streams. The list of live streams is sent over WebSockets together with the action to apply to each stream. The actions include add, remove, mute and unmute. The streams to subscribe to and related actions are provided in real-time by a Host through the [Stream Manager Grid Mixer Composition Testbed](../../sm-mixer/gridMixerCompositionStreamManagerProxy/). -------------------------------------------------------------------------------- /src/page/sample-mixer-pages/7x7/README.md: -------------------------------------------------------------------------------- 1 | # 7x7 Grid 2 | 3 | This is an example of a 7x7 grid that can compose up to 49 streams into a single grid. 4 | 5 | The HTML5 page includes a 7x7 flex box grid with video players that can subscribe to live streams. The list of live streams is sent over WebSockets together with the action to apply to each stream. The actions include add, remove, mute and unmute. The streams to subscribe to and related actions are provided in real-time by a Host through the [Stream Manager Grid Mixer Composition Testbed](../../sm-mixer/gridMixerCompositionStreamManagerProxy/). 6 | 7 | > **Note**: Mixing 49 streams requires a server with at least 8 CPUs and 16G memory. If your streams are high quality, then at least 16 CPUs are recommended. 8 | -------------------------------------------------------------------------------- /src/page/sample-mixer-pages/conference/README.md: -------------------------------------------------------------------------------- 1 | # Conference Focused Layout 2 | 3 | This is an example of a focused layout for video conferences. The Layout includes a focused presenter shown in a large rectangle on the top row and a set of unfocused participants shown in small rectangles in the bottom row. The list of participants' live streams to add to the layout is sent over WebSockets together with their presenter role. The page dynamically processes this information to update the layout as participants are added or removed to the conference or the presenter is changed. The dynamic commands are provided in real-time by a Host through the [Stream Manager Conference Host Testbed](../../sm-mixer/conferenceHostStreamManagerProxy/). -------------------------------------------------------------------------------- /src/page/sample-mixer-pages/nxn/README.md: -------------------------------------------------------------------------------- 1 | # NxN Grid 2 | 3 | This is an example of a general NxN grid that can resize as streams are added to it. The grid starts as a 1x1 grid that resizes every time a new stream is added and there is no available space in the current grid. At each resize cycle the grid adds two columns and one row to keep a rectangular aspect ratio. It should be noticed that currently the grid can only resize up. Resizing down is not supported. 4 | 5 | The HTML5 page includes a NxN flex box grid with video players that can subscribe to live streams. The list of live streams is sent over WebSockets together with the action to apply to each stream. The actions include add, remove, mute and unmute. The streams to subscribe to and related actions are provided in real-time by a Host through the [Stream Manager Grid Mixer Composition Testbed](../../sm-mixer/gridMixerCompositionStreamManagerProxy/). -------------------------------------------------------------------------------- /src/page/sm-test/brewMixerSM/assets/2x2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/page/sm-test/brewMixerSM/assets/3x3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/page/sm-test/brewMixerSM/assets/4x4.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/page/sm-test/brewMixerSM/assets/close_button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/page/sm-test/brewMixerSM/assets/mic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/page/sm-test/brewMixerSM/assets/mic_active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/page/sm-test/brewMixerSM/assets/render_tree.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/page/sm-test/brewMixerSM/assets/stop_button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/page/sm-test/brewMixerSM/assets/volume_off.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/page/sm-test/brewMixerSM/assets/volume_on.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/page/sm-test/castlabsPublishStreamManagerProxy/README.md: -------------------------------------------------------------------------------- 1 | # castLabs DRMtoday Integration for Encrypted Broadcast 2 | 3 | This example demonstrates integrating with a 3rd Party library provided from `castLabs` to encrypt live video utilizing the `DRMtoday` platform. 4 | 5 | > This example requires a version of the Red5Pro WebRTC SDK that has supported for [Insertable Streams](https://developer.mozilla.org/en-US/docs/Web/API/Insertable_Streams_for_MediaStreamTrack_API). 6 | 7 | # Requirements 8 | 9 | This example uses the 3rd Party library provided from `castLabs`: [encrypt-worker.js](./encrypt-worker.js). The library provides transform functions to be used in encrypted live stream that have been encrypted using `merchant` keys. 10 | 11 | > As such - though some polyfills are included - it is advised to run this example in browsers that support `Insertable Streams`. 12 | 13 | # Settings 14 | 15 | This example displays the encrypted stream along with the ability to playback decrypted. In order to playback the decrypted stream, integration with `castLabs' DRMtoday` is required. 16 | 17 | In particular, you will need to know the following that is provided as User Input settings on the interface for this example: 18 | 19 | - `environment`: The environment on castLabs DRMtoday account that your encrypted stream resides. 20 | - `merchant`: The merchant account within DRMtoday where the stream resides. 21 | - `encryption mode`: The type of AES (Advanced Encryption Standard) mode used on the stream. 22 | - `key / key id / iv`: The key, key id and iv id values to be used in decryption. These should be provided to you by the `merchant`. _Currently this is a `base64` stream._ 23 | 24 | > It is not the intent of this document to describe the `DRMtoday` platform. Please refer to their documentation for more information. 25 | -------------------------------------------------------------------------------- /src/page/sm-test/castlabsWatermarkStreamManagerProxy/README.md: -------------------------------------------------------------------------------- 1 | # Single Frame Forensic Watermarking with castLabs 2 | 3 | This example demonstrates how to use [castLabs forensic watermarking](https://castlabs.com/image-watermarking/) to embed a watermark during a live broadcast playback. 4 | 5 | # Requirements 6 | 7 | In order to use this example, you will need to: 8 | 9 | 1. Create a castLabs account. 10 | 2. Access the Organization URN from your new account. 11 | 3. Go to [castLabs account](https://account.castlabs.com/account) and add a key for use with the watermark overlay REST API 12 | 13 | ## Settings 14 | 15 | Once the above requirements are met, you will input the form values of the testbed example: 16 | 17 | - `Access Key Id` - Key Id 18 | - `Secret Access Key` - Key Secret 19 | - `Organization URN` - Organization URN 20 | - `User URN` - User URN 21 | 22 | # Usage 23 | 24 | 1. Start a broadcast preferrably with 16:9 (e.g., `640x360`) aspect ratio using a Publish example. 25 | 2. Click on `Subscribe` to begin credential authentication and watermark overlay request. 26 | 3. Once the watermark overlay request is complete, the watermarked image be overlayed on the live broadcast playback. 27 | 28 | ## Single-Frame Watermark Forensics 29 | 30 | Once playback has started, take a screenshot of the live video area to be used in your `castLabs` account for extraction. 31 | 32 | 1. Take a screenshot of the live video area. 33 | 2. Upload the screenshot to the [castLabs watermarking tool](https://watermark.castlabs.com/) 34 | 3. Select `Blind Extraction` 35 | 4. Upload the screenshot and allow for the extraction to process and complete. 36 | 37 | > You may need to adjust the extraction settings to ensure the watermark is extracted correctly. 38 | 39 | Once the system has completed the extraction, you will be able to download the watermarked image and use it in your forensic investigation. 40 | 41 | ![Watermarked Image](watermarked-image.png) 42 | -------------------------------------------------------------------------------- /src/page/sm-test/castlabsWatermarkStreamManagerProxy/watermarked-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5pro/streaming-html5/4501fc76c5a4675d42cac36021f1bbb4701d4b3a/src/page/sm-test/castlabsWatermarkStreamManagerProxy/watermarked-image.png -------------------------------------------------------------------------------- /src/page/sm-test/publishStreamManagerProxy/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Stream Manager Proxy Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> sm-proxy-notification}} 14 | {{> test-info testTitle='Publish Stream Manager Proxy Test'}} 15 |
16 | {{> status-field-publisher}} 17 | {{> statistics-field packets_field='Packets Sent'}} 18 |
19 | 20 |
21 |
22 | 25 |
26 |
27 |
28 | {{> footer}} 29 | {{> body-scripts}} 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/page/sm-test/publishStreamManagerProxyAMFMetadata/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | 6 | {{> meta title='Publish Stream Manager Proxy AMF Metadata Test'}} 7 | {{> header-scripts}} 8 | {{> header-stylesheets}} 9 | 15 | 16 | 17 | 18 | {{> top-bar }} 19 |
20 | {{> settings-link}} 21 | {{> sm-proxy-notification}} 22 | {{> test-info testTitle='Publish Stream Manager Proxy AMF Metadata Test'}} 23 |
24 | {{> status-field-publisher}} 25 | {{> statistics-field packets_field='Packets Sent'}} 26 |
27 | 28 |
29 |
30 | 32 |
33 |
34 |

35 | 36 | 37 |

38 | 39 |
40 |
41 |
42 | {{> footer}} 43 | {{> body-scripts}} 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/page/sm-test/publishStreamManagerProxyCamera/README.md: -------------------------------------------------------------------------------- 1 | # Publishing RTC Streams over Stream Manager Proxy 2 | 3 | The streammanager WebRTC proxy is a communication layer built inside streammanager web application which allows it to act as a proxy gateway for webrtc publishers / subscribers. The target use case of this communication layer is to facilitate a secure browser client to be able to connect to a "unsecure" remote websocket endpoint for consuming WebRTC services offered by Red5pro. 4 | 5 | Streammanager autoscaling works with dynamic nodes which are associated with dynamic IP addresses and cannot have a SSL attached to them. The proxy layer helps publishers to connect and initiate a WebRTC publish session from a `secure` (ssl enabled) domain to a `unsecure` Red5pro origin having using an IP address. 6 | 7 | **Please refer to the [Basic Publisher Documentation](../publishStreamManagerProxy/README.md) to learn more about the basic setup.** 8 | 9 | > In order to properly run the Stream Manager examples, you will need to configure you server for cluster infrastructure as described in the following documentation: [https://www.red5.net/docs/installation/](https://www.red5.net/docs/installation/). 10 | 11 | ## Server Configuration 12 | 13 | > Please read about [WHIP/WHEP Configuration for Standalone and Stream Manager support.](https://www.red5.net/docs/special/user-guide/whip-whep-configuration/) 14 | 15 | You also need to ensure that the stream manager proxy layer is `enabled`. The configuration section can be found in stream manager's config file - `red5-web.properties` 16 | 17 | ```sh 18 | ## WEBSOCKET PROXY SECTION 19 | 20 | proxy.enabled=false 21 | ``` 22 | 23 | ## Example Code 24 | 25 | - **[index.html](index.html)** 26 | - **[index.js](index.js)** 27 | -------------------------------------------------------------------------------- /src/page/sm-test/publishStreamManagerProxyCamera/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Stream Manager Proxy Camera Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> sm-proxy-notification}} 14 | {{> test-info testTitle='Publish Stream Manager Proxy Camera Source Test (WebRTC)'}} 15 |
16 |
17 |

18 | 19 | 20 |

21 |

22 | 23 |

24 |
25 | {{> status-field-publisher}} 26 | {{> statistics-field packets_field='Packets Sent'}} 27 |
28 | 29 | 32 |
33 |
34 |
35 | {{> footer}} 36 | {{> body-scripts}} 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/page/sm-test/publishStreamManagerProxyMultiOriginRequest/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Stream Manager Multi Origin Proxy Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> sm-proxy-notification}} 14 | {{> test-info testTitle='Publish Stream Manager Proxy Multi-Origin Test'}} 15 |
16 | {{> status-field-publisher}} 17 | {{> statistics-field packets_field='Packets Sent'}} 18 |

Origin Address: N/A

19 |
20 | 21 |
22 |
23 |
24 | {{> footer}} 25 | {{> body-scripts}} 26 | {{> sm-scripts}} 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/page/sm-test/publishStreamManagerProxyMultiOriginStrictRequest/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Stream Manager Proxy Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> sm-proxy-notification}} 14 | {{> test-info testTitle='Publish Stream Manager Proxy Multi-Origin Strict Test'}} 15 |
16 | {{> status-field-publisher}} 17 | {{> statistics-field packets_field='Packets Sent'}} 18 |

Origin Address: N/A

19 |
20 | 21 |
22 |
23 |
24 | {{> footer}} 25 | {{> body-scripts}} 26 | {{> sm-scripts}} 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/page/sm-test/publishStreamManagerProxyRecord/README.md: -------------------------------------------------------------------------------- 1 | # Publishing & Record RTC Streams over stream manager proxy 2 | 3 | This example is the same as the [Publish Stream Manager Proxy](../publishStreamManagerProxy) example, with the addition of setting the `streamMode` to `record` to record the live stream over Stream Manager. 4 | -------------------------------------------------------------------------------- /src/page/sm-test/publishStreamManagerProxyRecord/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Stream Manager Proxy Record Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> sm-proxy-notification}} 14 | {{> test-info testTitle='Publish Stream Manager Proxy Record Test'}} 15 |
16 | {{> status-field-publisher}} 17 | {{> statistics-field packets_field='Packets Sent'}} 18 |

Origin Address: N/A

19 |
20 | 23 |
24 |
25 |
26 | {{> footer}} 27 | {{> body-scripts}} 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/page/sm-test/publishStreamManagerProxySettings/README.md: -------------------------------------------------------------------------------- 1 | # Publishing RTC Streams over stream manager proxy 2 | 3 | The streammanager WebRTC proxy is a communication layer built inside streammanager web application which allows it to act as a proxy gateway for webrtc publishers / subscribers. The target use case of this communication layer is to facilitate a secure browser client to be able to connect to a "unsecure" remote websocket endpoint for consuming WebRTC services offered by Red5pro. 4 | 5 | Streammanager autoscaling works with dynamic nodes which are associated with dynamic IP addresses and cannot have a SSL attached to them. The proxy layer helps publishers to connect and initiate a WebRTC publish session from a `secure` (ssl enabled) domain to a `unsecure` Red5pro origin having using an IP address. 6 | 7 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 8 | 9 | > In order to properly run the Stream Manager examples, you will need to configure you server for cluster infrastructure as described in the following documentation: [https://www.red5.net/docs/installation/](https://www.red5.net/docs/installation/). 10 | 11 | ## Server Configuration 12 | 13 | > Please read about [WHIP/WHEP Configuration for Standalone and Stream Manager support.](https://www.red5.net/docs/special/user-guide/whip-whep-configuration/) 14 | 15 | You also need to ensure that the stream manager proxy layer is `enabled`. The configuration section can be found in stream manager's config file - `red5-web.properties` 16 | 17 | ```sh 18 | ## WEBSOCKET PROXY SECTION 19 | 20 | proxy.enabled=false 21 | ``` 22 | 23 | ## Example Code 24 | 25 | - **[index.html](index.html)** 26 | - **[index.js](index.js)** 27 | -------------------------------------------------------------------------------- /src/page/sm-test/publishStreamManagerProxyValidation/README.md: -------------------------------------------------------------------------------- 1 | # Passing Validation parameters when Publishing stream manager proxy 2 | 3 | The streammanager WebRTC proxy is a communication layer built inside streammanager web application which allows it to act as a proxy gateway for webrtc publishers / subscribers. The target use case of this communication layer is to facilitate a secure browser client to be able to connect to a "unsecure" remote websocket endpoint for consuming WebRTC services offered by Red5pro. 4 | 5 | Streammanager autoscaling works with dynamic nodes which are associated with dynamic IP addresses and cannot have a SSL attached to them. The proxy layer helps publishers to connect and initiate a WebRTC publish session from a `secure` (ssl enabled) domain to a `unsecure` Red5pro origin having using an IP address. 6 | 7 | **Validation Parameters** may be required for your current project. This is a way to additionally pass in query parameters when utilizing the Stream Manager API in order to run validation on the server-side. 8 | 9 | **Please refer to the [Basic Publisher Documentation](../publishStreamManagerProxy/README.md) to learn more about the basic setup.** 10 | 11 | > In order to properly run the Stream Manager examples, you will need to configure you server for cluster infrastructure as described in the following documentation: [https://www.red5.net/docs/installation/](https://www.red5.net/docs/installation/). 12 | 13 | ## Server Configuration 14 | 15 | > Please read about [WHIP/WHEP Configuration for Standalone and Stream Manager support.](https://www.red5.net/docs/special/user-guide/whip-whep-configuration/) 16 | 17 | You also need to ensure that the stream manager proxy layer is `enabled`. The configuration section can be found in stream manager's config file - `red5-web.properties` 18 | 19 | ```sh 20 | ## WEBSOCKET PROXY SECTION 21 | 22 | proxy.enabled=false 23 | ``` 24 | 25 | ## Example Code 26 | 27 | - **[index.html](index.html)** 28 | - **[index.js](index.js)** 29 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeBackupStreamSwitchStreammanager/README.md: -------------------------------------------------------------------------------- 1 | # Back-Up Stream Switching for Subscribers Using Stream Manager 2 | 3 | This example demonstrates the ability to load 2 (_can be modified_) Subscribers to 2 Edges at once and placing all but the first to report subscription success into `standby` mode in order to be "activated" in the off-chance that the current subscriber has gone down unexpectedly - such as from losing network connect or the edge server is lost. 4 | 5 | # Usage 6 | 7 | The Stream Manager form allows you to input information about the host address of the stream manager instance. It is assumed that the stream manager is served over SSL when constructing the APi request; as such, put in the Full Qualified Domain Name of the stream manager - e.g., `mystreammanager.red5.me`. 8 | 9 | In the Stream Manager form, also provide the stream name you wish to subscribe to. 10 | 11 | When the form is complete, click `Start`. 12 | 13 | Once a subscriber has completed an Edge API request, a connection and a playback, the other subscriber(s) are placed into `standby`. They should not be receiving audio or video streams at this moment, though will have a frozen frame at which they were placed in `standby`. 14 | 15 | > The subscribers are initially overlapped in the UI, but you can see both streams at the same time by clicking on the `Toggle Overlap` button. 16 | 17 | Once both subscribers are "alive" and one subscriber is playing back and the other is in standby, shut down the Red5 Pro server on the host instance that is reported in the information field above the videos. 18 | 19 | ## Expected Result 20 | 21 | You should see the original subscriber removed from the UI and the back-up subscriber released from `standby` mode. 22 | 23 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxy/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Stream Manager Proxy Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> sm-proxy-notification}} 14 | {{> test-info testTitle='Subscriber Stream Manager Proxy Test'}} 15 |
16 | {{> status-field-subscriber}} 17 | {{> statistics-field packets_field='Packets Received'}} 18 |
19 |
20 | 25 |
26 |
27 |
28 | {{> footer}} 29 | {{> body-scripts}} 30 | {{> mobile-subscriber-util}} 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxyAMFMetadata/README.md: -------------------------------------------------------------------------------- 1 | # Consuming AMF Metadata from RTC Streams 2 | 3 | AMF metadata can be ingested into source stream published to Red5 Pro and consumed on the client side in real time. The metadata is retrieved by processing the `Subscribe.Metadata` events for example using the following code: 4 | 5 | ```js 6 | function onSubscriberEvent(event) { 7 | console.log('[Red5ProSubsriber] ' + event.type + '.') 8 | if (event.type == 'Subscribe.Metadata') { 9 | processAMFData(event) 10 | } 11 | } 12 | 13 | function processAMFData(event) { 14 | const data = event.data 15 | console.log('received data: ', data) 16 | 17 | // process data 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxyAMFMetadata/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | 6 | {{> meta title='Subscriber Stream Manager Proxy AMF Metadata Test'}} 7 | {{> header-scripts}} 8 | {{> header-stylesheets}} 9 | 10 | 11 | 12 | {{> top-bar }} 13 |
14 | {{> settings-link}} 15 | {{> sm-proxy-notification}} 16 | {{> test-info testTitle='Subscriber Stream Manager Proxy AMF Metadata Test'}} 17 |
18 | {{> status-field-subscriber}} 19 | {{> statistics-field packets_field='Packets Received'}} 20 |
21 | 22 |
23 |
24 | 27 |
28 |
29 |
30 |

Received AMF Metadata:

31 |
32 |

33 |
34 |
35 |
36 | {{> footer}} 37 | {{> body-scripts}} 38 | {{> mobile-subscriber-util}} 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxyDataChannel/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber SM Data Channel Messaging'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | 15 | 16 | 17 | {{> top-bar }} 18 |
19 | {{> settings-link}} 20 | {{> test-info testTitle='Subscriber SM Data Channel Messsaging'}} 21 |
22 | {{> status-field-subscriber}} 23 | {{> statistics-field packets_field='Packets Received'}} 24 |

Edge Address: N/A

25 |
26 | 31 |
32 |
33 |
34 | {{> footer}} 35 | {{> body-scripts}} 36 | {{> mobile-subscriber-util}} 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxyInterstitial/README.md: -------------------------------------------------------------------------------- 1 | # Subscribe Interstitial Media Insertion over stream manager proxy 2 | 3 | This example is the same as the [Subscribe Interstitial](../../test/subscribeInterstitial/README.md) example. The interstitial REST request remains the same, but the request URL now points to the stream manager's proxy and includes the access token. 4 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxyMute/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='WebRTC Subscriber Stream Manager Proxy Mute API Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 20 | 21 | 22 | {{> top-bar }} 23 |
24 | {{> settings-link}} 25 | {{> test-info testTitle='Subscriber Stream Manager Proxy Mute API Test (WebRTC)'}} 26 |
27 | {{> status-field-subscriber}} 28 | {{> statistics-field packets_field='Packets Received'}} 29 |
30 |
31 | 36 |
37 |
38 |

39 | 40 | 41 |

42 |
43 |
44 |
45 | {{> footer}} 46 | {{> body-scripts}} 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxyReconnect/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Stream Manager Proxy Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> sm-proxy-notification}} 14 | {{> test-info testTitle='Subscriber Stream Manager Proxy Test'}} 15 |
16 | {{> status-field-subscriber}} 17 | {{> statistics-field packets_field='Packets Received'}} 18 |
19 |
20 | 25 |
26 |
27 |
28 | {{> footer}} 29 | {{> body-scripts}} 30 | {{> mobile-subscriber-util}} 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxyScreenShare/README.md: -------------------------------------------------------------------------------- 1 | # Subscribe Screen Share over Stream Manager using Red5 Pro 2 | 3 | This is an example subscribing to a broadcast with screen sharing. It is very similar to how you would subscribe to a video broadcast. However, this example makes to consumer connections: one for the screen share and one for the audio. This is due to the fact that is it not possible at the time of this writing (_November 30th, 2017_) to provide a valid media constraint with both audio an screen sharing. 4 | 5 | **Please refer to the [Basic Subscriber Documentation](../subscribeStreamManagerProxy/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # How to Subscribe 13 | 14 | First launch the [Publisher Screen Share Test](../publishStreamManagerProxyScreenShare) in a separate window/tab and follow the extension installation requirements (depending on your browser). 15 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxyScreenShare/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber SM Proxy Screen Share Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> sm-proxy-notification}} 14 | {{> test-info testTitle='Subscriber Stream Manager Proxy Screen Share Test'}} 15 |
16 | {{> status-field-subscriber}} 17 | {{> statistics-field packets_field='Packets Received'}} 18 |
19 |
20 | 25 |
26 |
27 |
28 | {{> footer}} 29 | {{> body-scripts}} 30 | {{> mobile-subscriber-util}} 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxySwitch/Readme.md: -------------------------------------------------------------------------------- 1 | # WebRTC Subscriber Switch over stream manager proxy 2 | 3 | Through WebRTC over stream manager proxy, the current subscriber's stream may be switched to another live stream. This example demonstrates that the process is essentially the same as with a standalone server. 4 | 5 | This example is based on the _subscribestreamManagerProxy_ example. See that example's [README](../subscribestreamManagerProxy/README.md) for details on subscribing. Like the subscriber example, this example assumes there is a live stream by default named "stream1". 6 | 7 | This example demonstrates using the `callServer` API to invoke a method on the Application Adapter of the target app. The `callServer` method returns a `Promise`-like object that can additional deliver return data from the server. 8 | 9 | [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) 10 | [WebRTC](https://developer.mozilla.org/en-US/docs/Web/Guide/API/WebRTC) 11 | 12 | ### Example Code 13 | 14 | - **[index.html](index.html)** 15 | - **[index.js](index.js)** 16 | 17 | # Calling the server 18 | 19 | The `switchStreams` server call requires two pieces of data: 20 | 21 | - **`path`** to the live stream. This includes the context path and stream name, e.g., "live/stream1". 22 | - **`isImmediate`** -- if **true**, the audio will switch immediately and the original stream's video will freeze, and the video will switch to the new stream at the next keyframe. If **false**, the original continues uninterrupted until a new keyframe is received on the new stream, at which point audio and video switch simultaneously. 23 | 24 | The server call then contains a JSON array with a single entry containing these two parameters: 25 | 26 | ```javascript 27 | targetSubscriber.callServer('switchStreams', [ 28 | { 29 | path: streamPath.value, 30 | isImmediate: true, 31 | }, 32 | ]) 33 | ``` 34 | 35 | The server responds with a message: 36 | 37 | ```javascript 38 | { 39 | "data": { 40 | "type": "result", 41 | "message": "Stream switch: Success" 42 | } 43 | } 44 | ``` 45 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxySwitch/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Stream Manager Proxy Stream Switch Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> sm-proxy-notification}} 14 | {{> test-info testTitle='Subscriber Stream Manager Proxy Test'}} 15 |
16 | {{> status-field-subscriber}} 17 | {{> statistics-field packets_field='Packets Received'}} 18 |

Edge Address: N/A

19 |
20 | 25 | 26 | 27 |
28 |

29 | 30 | 31 |

32 |

33 |
34 | 35 | 36 |
37 |
38 |
39 | {{> footer}} 40 | {{> body-scripts}} 41 | {{> mobile-subscriber-util}} 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxyTranscoderHLS/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Stream Manager Proxy Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> sm-proxy-notification}} 14 | {{> test-info testTitle='Subscriber Stream Manager Transcoder Proxy Test (HLS)'}} 15 |
16 | {{> status-field-subscriber}} 17 |
18 |
19 | 24 |
25 |
26 |
27 | {{> footer}} 28 | {{> body-scripts}} 29 | {{> mobile-subscriber-util}} 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxyTranscoderRTC/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Stream Manager Proxy Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> sm-proxy-notification}} 14 | {{> test-info testTitle='Subscriber Stream Manager Transcoder Proxy Test (RTC)'}} 15 |
16 | 27 | {{> status-field-subscriber}} 28 | {{> statistics-field packets_field='Packets Received'}} 29 |
30 |
31 | 36 |
37 |
38 |
39 | {{> footer}} 40 | {{> body-scripts}} 41 | {{> mobile-subscriber-util}} 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/page/sm-test/subscribeStreamManagerProxyVP8/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Stream Manager Proxy Test VP8'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 14 | 15 | 16 | {{> top-bar }} 17 |
18 | {{> version }} 19 | {{> settings-link}} 20 |
21 |
22 |

In order to properly run the Stream Manager examples, you will need to configure your environment with the autoscaling infrastructure as described in the following documentation:

23 |

https://www.red5.net/docs/installation/

24 |
25 |
26 | {{> test-info testTitle='Subscriber Stream Manager Test VP8'}} 27 | {{> status-field-subscriber}} 28 |

Edge Address: N/A

29 |
30 | 35 |
36 |
37 | {{> footer}} 38 | {{> body-scripts}} 39 | {{> mobile-subscriber-util}} 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/page/test/castlabsPublish/README.md: -------------------------------------------------------------------------------- 1 | # castLabs DRMtoday Integration for Encrypted Broadcast 2 | 3 | This example demonstrates integrating with a 3rd Party library provided from `castLabs` to encrypt live video utilizing the `DRMtoday` platform. 4 | 5 | > This example requires a version of the Red5Pro WebRTC SDK that has supported for [Insertable Streams](https://developer.mozilla.org/en-US/docs/Web/API/Insertable_Streams_for_MediaStreamTrack_API). 6 | 7 | # Requirements 8 | 9 | This example uses the 3rd Party library provided from `castLabs`: [encrypt-worker.js](./encrypt-worker.js). The library provides transform functions to be used in encrypted live stream that have been encrypted using `merchant` keys. 10 | 11 | > As such - though some polyfills are included - it is advised to run this example in browsers that support `Insertable Streams`. 12 | 13 | # Settings 14 | 15 | This example displays the encrypted stream along with the ability to playback decrypted. In order to playback the decrypted stream, integration with `castLabs' DRMtoday` is required. 16 | 17 | In particular, you will need to know the following that is provided as User Input settings on the interface for this example: 18 | 19 | - `environment`: The environment on castLabs DRMtoday account that your encrypted stream resides. 20 | - `merchant`: The merchant account within DRMtoday where the stream resides. 21 | - `encryption mode`: The type of AES (Advanced Encryption Standard) mode used on the stream. 22 | - `key / key id / iv`: The key, key id and iv id values to be used in decryption. These should be provided to you by the `merchant`. _Currently this is a `base64` stream._ 23 | 24 | > It is not the intent of this document to describe the `DRMtoday` platform. Please refer to their documentation for more information. 25 | -------------------------------------------------------------------------------- /src/page/test/castlabsWatermark/README.md: -------------------------------------------------------------------------------- 1 | # Single Frame Forensic Watermarking with castLabs 2 | 3 | This example demonstrates how to use [castLabs forensic watermarking](https://castlabs.com/image-watermarking/) to embed a watermark during a live broadcast playback. 4 | 5 | # Requirements 6 | 7 | In order to use this example, you will need to: 8 | 9 | 1. Create a castLabs account. 10 | 2. Access the Organization URN from your new account. 11 | 3. Go to [castLabs account](https://account.castlabs.com/account) and add a key for use with the watermark overlay REST API 12 | 13 | ## Settings 14 | 15 | Once the above requirements are met, you will input the form values of the testbed example: 16 | 17 | - `Access Key Id` - Key Id 18 | - `Secret Access Key` - Key Secret 19 | - `Organization URN` - Organization URN 20 | - `User URN` - User URN 21 | 22 | # Usage 23 | 24 | 1. Start a broadcast preferrably with 16:9 (e.g., `640x360`) aspect ratio using a Publish example. 25 | 2. Click on `Subscribe` to begin credential authentication and watermark overlay request. 26 | 3. Once the watermark overlay request is complete, the watermarked image be overlayed on the live broadcast playback. 27 | 28 | ## Single-Frame Watermark Forensics 29 | 30 | Once playback has started, take a screenshot of the live video area to be used in your `castLabs` account for extraction. 31 | 32 | 1. Take a screenshot of the live video area. 33 | 2. Upload the screenshot to the [castLabs watermarking tool](https://watermark.castlabs.com/) 34 | 3. Select `Blind Extraction` 35 | 4. Upload the screenshot and allow for the extraction to process and complete. 36 | 37 | > You may need to adjust the extraction settings to ensure the watermark is extracted correctly. 38 | 39 | Once the system has completed the extraction, you will be able to download the watermarked image and use it in your forensic investigation. 40 | 41 | ![Watermarked Image](watermarked-image.png) 42 | -------------------------------------------------------------------------------- /src/page/test/castlabsWatermark/watermarked-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5pro/streaming-html5/4501fc76c5a4675d42cac36021f1bbb4701d4b3a/src/page/test/castlabsWatermark/watermarked-image.png -------------------------------------------------------------------------------- /src/page/test/conferenceComposite/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Conference Composite Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 45 | 46 | 47 | {{> top-bar }} 48 |
49 | {{> settings-link}} 50 | {{> test-info testTitle='Conference Composite Test'}} 51 |
52 |
53 |

Set Group to Composite:

54 |
55 |

56 | 57 | 58 |

59 | 60 |
61 |
62 | 63 |
64 |
65 | {{> footer}} 66 | {{> body-scripts}} 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/page/test/publish/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> test-info testTitle='Publish Test'}} 14 |
15 | {{> status-field-publisher}} 16 | {{> statistics-field packets_field='Packets Sent'}} 17 |
18 | 21 |
22 |
23 |
24 | {{> footer}} 25 | {{> body-scripts}} 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/page/test/publish1080/README.md: -------------------------------------------------------------------------------- 1 | # Publishing at 1080p 2 | 3 | This example demonstrates a request for a `MediaStream` with video contraints to publish at 1080p. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # MediaStream 13 | 14 | Constraints for the audio and video components are defined when accessing a `MediaStream` from the browser. 15 | 16 | To define a stream with 1080p constraints for publishing, initialize the Publisher with a `mediaConstraint` with those video constraints: 17 | 18 | ```js 19 | const userMedia = { 20 | video: { 21 | width: { 22 | ideal: 1920, 23 | }, 24 | height: { 25 | ideal: 1080, 26 | }, 27 | frameRate: { 28 | ideal: 60, 29 | }, 30 | }, 31 | } 32 | 33 | const rtcConfig = { 34 | ...config, 35 | ...{ 36 | mediaConstraints: userMedia, 37 | bandwidth: { 38 | video: 2500, 39 | }, 40 | }, 41 | } 42 | 43 | const publisher = new window.red5prosdk.RTCPublisher() 44 | publisher 45 | .init(rtcConfig) 46 | .then(() => { 47 | return publisher.publish() 48 | }) 49 | .catch((error) => { 50 | console.error(error) 51 | }) 52 | ``` 53 | 54 | > More information: [Media.getUserMedia from MDN](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) 55 | 56 | ## Additional Information 57 | 58 | To read more about Stream Quality and recommended settings, please visit [The Balancing Act of Stream Quality](https://red5pro.zendesk.com/hc/en-us/articles/235679488-Suggested-Resolution-and-Bitrate-Settings). 59 | -------------------------------------------------------------------------------- /src/page/test/publish1080/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish 1080p Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> test-info testTitle='Publish 1080p Test'}} 14 |
15 | {{> status-field-publisher}} 16 | {{> statistics-field packets_field='Packets Sent'}} 17 |
18 | 21 |
22 |
23 |
24 | {{> footer}} 25 | {{> body-scripts}} 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/page/test/publishAMFMetadata/README.md: -------------------------------------------------------------------------------- 1 | # Sending AMF Metadata using a Publisher. 2 | 3 | This example demonstrates sending AMF Metadata on a Publisher stream connection. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | ## Sending AMF Metadata 13 | 14 | The `RTCPublisher` and `WHIPClient` instances include a `send` method that allows sending AMF metadata with the `onMetaData` method name. This metadata is received by all subscribers watching the stream. 15 | 16 | ```js 17 | submitButton.addEventListener('click', function () { 18 | if (!targetPublisher) { 19 | console.warn('A stream must be published before metadata can be sent!') 20 | return 21 | } 22 | 23 | let data = metadataField.value 24 | if (data === '') { 25 | return 26 | } 27 | 28 | console.log(`sending metadata: ${data}`) 29 | targetPublisher.send('onMetaData', { metadata: data }) 30 | 31 | metadataField.value = '' 32 | }) 33 | ``` 34 | 35 | The metadata sent with this testbed can be received or seen using the [Subscribe AMF Metadata testbed](../subscribeAMFMetadata/index.html). 36 | -------------------------------------------------------------------------------- /src/page/test/publishAMFMetadata/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | 6 | {{> meta title='Publish - AMF Metadata'}} 7 | {{> header-scripts}} 8 | {{> header-stylesheets}} 9 | 15 | 16 | 17 | 18 | {{> top-bar }} 19 |
20 | {{> settings-link}} 21 | {{> test-info testTitle='Publish - AMF Metadata'}} 22 |
23 | {{> status-field-publisher}} 24 | {{> statistics-field packets_field='Packets Sent'}} 25 |
26 | 28 |
29 |
30 |

31 | 32 | 33 |

34 | 35 |
36 |
37 |
38 | {{> footer}} 39 | {{> body-scripts}} 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/page/test/publishAppend/README.md: -------------------------------------------------------------------------------- 1 | # Publish Stream Recording - Append 2 | 3 | This example demonstrates appended recording of the published stream to the server. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # Recording 13 | 14 | To record a published stream, modify the `streamMode` configuration attribute provided upon initialization of the Publisher: 15 | 16 | ```js 17 | var defaultConfiguration = { 18 | protocol: 'ws', 19 | port: 5080, 20 | app: 'live', 21 | streamMode: 'append', 22 | } 23 | ``` 24 | 25 | The following are accepted values for the `streamMode` configuration attribute: 26 | 27 | - **live** 28 | - **record** 29 | - **append** 30 | 31 | The default value is `live`. 32 | -------------------------------------------------------------------------------- /src/page/test/publishAppend/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Append Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
12 | {{> settings-link}} 13 | {{> test-info testTitle='Publish Append Test'}} 14 |
15 | {{> status-field-publisher}} 16 | {{> statistics-field packets_field='Packets Sent'}} 17 |
18 | 21 |
22 |
23 |
24 | {{> footer}} 25 | {{> body-scripts}} 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/page/test/publishAudioCustomSettingsWebRTC/README.md: -------------------------------------------------------------------------------- 1 | # Publish Custom Settings 2 | 3 | This example allows you to customize the media broadcast settings for a WebRTC Publisher. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # Running the Example 13 | 14 | Fill in any custom broadcast settings for testing, then press **Publish**. 15 | 16 | ## Settings 17 | 18 | Settings included for customization: 19 | 20 | | Name | Usage | 21 | | -------------------- | ----------------------------------------------------------------------------------------------------------- | 22 | | Camera Device | The Camera Device to broadcast with. | 23 | | Camera Width | The requested Camera width to broadcast. | 24 | | Camera Height | The requested Camera height to broadcast. | 25 | | Camera Framerate | The frequested framerate at which to broadcast. | 26 | | Video Bitrate (Kbps) | The requested video bitrate to broadcast. This will munge the SDP being sent out in Peer Connection offers. | 27 | | Audio Bitrate (Kbps) | The requested audio bitrate to broadcast. This will munge the SDP being sent out in Peer Connection offers. | 28 | | Key Framerate (ms) | The requested time - in milliseconds - to send a key frame during broadcast. | 29 | -------------------------------------------------------------------------------- /src/page/test/publishAuth/README.md: -------------------------------------------------------------------------------- 1 | # Publisher Authentication using Red5 Pro 2 | 3 | This is an example of authenticating a Broadcast for stream playback. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publisher/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | > This example requires you to enable the `SimpleAuthentication` Plugin for the `live` webapp. More information: [Simple Authentication Plugin](https://www.red5.net/docs/special/authplugin/overview 13 | 14 | # Authenticating 15 | 16 | With the username and password known from the Red5 Pro Server `webapps/live/WEB-INF/simple-auth-plugin.credentials` file (if following the basic auth setup of the Red5 Pro Server), those values are provided to the `connectionParams` attribute of the subscriber configuration(s). 17 | 18 | For example, if you have defined the authorization of a user `foo` with a password `bar`, the configuration addition would look like the following: 19 | 20 | ```js 21 | connectionParms: { 22 | username: 'foo', 23 | password: 'bar', 24 | } 25 | ``` 26 | 27 | ## Example 28 | 29 | In the example, a login form is provided to allow the user to enter in their username and password. Those field values are added to the respective properties in the `connectionParms` attribute of the configuration(s) upon submit of the form, and the request to broadcast started: 30 | 31 | ```js 32 | submitButton.addEventListener('click', function () { 33 | configuration.connectionParams = { 34 | username: usernameField.value, 35 | password: passwordField.value, 36 | } 37 | start() 38 | }) 39 | ``` 40 | -------------------------------------------------------------------------------- /src/page/test/publishAuth/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Authentication Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 26 | 27 | 28 | {{> top-bar }} 29 |
30 | {{> settings-link}} 31 | {{> test-info testTitle='Publish Authentication Test'}} 32 |
33 |
34 |

Log In to begin your Broadcast:

35 |
36 |

37 | 38 | 39 |

40 |

41 | 42 |

43 | 44 |
45 | {{> status-field-publisher}} 46 | {{> statistics-field packets_field='Packets Sent'}} 47 |
48 | 51 |
52 |
53 |
54 | {{> footer}} 55 | {{> body-scripts}} 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/page/test/publishAvailableHDSettings/README.md: -------------------------------------------------------------------------------- 1 | # Publish Custom Settings 2 | 3 | This example allows you to customize the media broadcast settings for a WebRTC Publisher. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # Running the Example 13 | 14 | Fill in any custom broadcast settings for testing, then press **Publish**. 15 | 16 | ## Settings 17 | 18 | Settings included for customization: 19 | 20 | | Name | Usage | 21 | | -------------------- | ----------------------------------------------------------------------------------------------------------- | 22 | | Camera Device | The Camera Device to broadcast with. | 23 | | Camera Width | The requested Camera width to broadcast. | 24 | | Camera Height | The requested Camera height to broadcast. | 25 | | Camera Framerate | The frequested framerate at which to broadcast. | 26 | | Video Bitrate (Kbps) | The requested video bitrate to broadcast. This will munge the SDP being sent out in Peer Connection offers. | 27 | | Audio Bitrate (Kbps) | The requested audio bitrate to broadcast. This will munge the SDP being sent out in Peer Connection offers. | 28 | | Key Framerate (ms) | The requested time - in milliseconds - to send a key frame during broadcast. | 29 | -------------------------------------------------------------------------------- /src/page/test/publishCall/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Server Call Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 28 | 29 | 30 | {{> top-bar }} 31 |
32 | {{> settings-link}} 33 | {{> test-info testTitle='Publish Server Call Test'}} 34 |
35 | {{> status-field-publisher}} 36 | {{> statistics-field packets_field='Packets Sent'}} 37 |
38 | 41 |
42 |
43 |

Current Live Streams

44 |
    45 |

    46 |
    47 |
    48 |
    49 | {{> footer}} 50 | {{> body-scripts}} 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/page/test/publishCameraResize/README.md: -------------------------------------------------------------------------------- 1 | # Publish Change Camera Size for Flash/RTMP 2 | 3 | This is an example of changing the camera sie during a live broadcast without stopping the publishing session. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publisher/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | -------------------------------------------------------------------------------- /src/page/test/publishCameraResize/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Camera Resize Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
    12 | {{> settings-link}} 13 | {{> test-info testTitle='Publish Camera Resize Test (Flash Only)'}} 14 |
    15 | {{> status-field-publisher}} 16 |
    17 |

    Camera Dimensions

    18 |
    19 |
    20 | 23 |
    24 |
    25 | 26 |
    27 |
    28 |
    29 | {{> footer}} 30 | {{> body-scripts}} 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/page/test/publishCameraResize/red5pro-camera-resize-publisher.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5pro/streaming-html5/4501fc76c5a4675d42cac36021f1bbb4701d4b3a/src/page/test/publishCameraResize/red5pro-camera-resize-publisher.swf -------------------------------------------------------------------------------- /src/page/test/publishCameraSource/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='WebRTC Publish Camera Source Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
    12 | {{> settings-link}} 13 | {{> test-info testTitle='Publish Camera Source Test (WebRTC)'}} 14 |
    15 |
    16 |

    17 | 18 | 19 |

    20 |

    21 | 22 |

    23 |
    24 | {{> status-field-publisher}} 25 | {{> statistics-field packets_field='Packets Sent'}} 26 |
    27 | 30 |
    31 |
    32 |
    33 | {{> footer}} 34 | {{> body-scripts}} 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/page/test/publishCameraSwap/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='WebRTC Publish Camera Swap Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
    12 | {{> settings-link}} 13 | {{> test-info testTitle='Publish Camera Swap Test (WebRTC)'}} 14 |
    15 |

    The browser you are using does not support the facingMode video constraint require for this test.

    16 | {{> status-field-publisher}} 17 | {{> statistics-field packets_field='Packets Sent'}} 18 |
    19 |
    20 | 23 |
    24 |
    25 |
    26 |
    27 | {{> footer}} 28 | {{> body-scripts}} 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/page/test/publishCodecSupport/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='WebRTC Publish Codec Support'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
    12 | {{> settings-link}} 13 | {{> test-info testTitle='Publish Codec Support'}} 14 |
    15 |
    16 |

    17 | 18 | 19 |

    20 |

    21 | 22 | 23 |

    24 |

    25 | 26 |

    27 |
    28 | {{> status-field-publisher}} 29 | {{> statistics-field packets_field='Packets Sent'}} 30 |
    31 | 34 |
    35 |
    36 |
    37 | {{> footer}} 38 | {{> body-scripts}} 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/page/test/publishCustomSettingsWebRTC/README.md: -------------------------------------------------------------------------------- 1 | # Publish Custom Settings 2 | 3 | This example allows you to customize the media broadcast settings for a WebRTC Publisher. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # Running the Example 13 | 14 | Fill in any custom broadcast settings for testing, then press **Publish**. 15 | 16 | ## Settings 17 | 18 | Settings included for customization: 19 | 20 | | Name | Usage | 21 | | -------------------- | ----------------------------------------------------------------------------------------------------------- | 22 | | Camera Device | The Camera Device to broadcast with. | 23 | | Camera Width | The requested Camera width to broadcast. | 24 | | Camera Height | The requested Camera height to broadcast. | 25 | | Camera Framerate | The frequested framerate at which to broadcast. | 26 | | Video Bitrate (Kbps) | The requested video bitrate to broadcast. This will munge the SDP being sent out in Peer Connection offers. | 27 | | Audio Bitrate (Kbps) | The requested audio bitrate to broadcast. This will munge the SDP being sent out in Peer Connection offers. | 28 | | Key Framerate (ms) | The requested time - in milliseconds - to send a key frame during broadcast. | 29 | -------------------------------------------------------------------------------- /src/page/test/publishFlashvars/README.md: -------------------------------------------------------------------------------- 1 | # Publish FlashVars for Flash/RTMP 2 | 3 | This is an example of providing publisher params as FlashVars to a Flash-based Publisher. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | -------------------------------------------------------------------------------- /src/page/test/publishHQAudio/README.md: -------------------------------------------------------------------------------- 1 | # Publish HQ Audio 2 | 3 | This is an example of broadcasting with High-Quality Audio. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ### Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # How to Publish with HQ Audio 13 | 14 | To publish with High-Quality Audio, define the `sampleRate` on the `audio` constraint passed in the intialization configuration through the `mediaConstraints` property. 15 | 16 | ```js 17 | function getUserMediaConfiguration() { 18 | if (typeof configuration.mediaConstraints.audio === 'boolean') { 19 | configuration.mediaConstraints.audio = {} 20 | } 21 | configuration.mediaConstraints.audio.sampleRate = 44100 22 | return { 23 | mediaConstraints: { 24 | audio: configuration.useAudio 25 | ? configuration.mediaConstraints.audio 26 | : false, 27 | video: configuration.useVideo 28 | ? configuration.mediaConstraints.video 29 | : false, 30 | }, 31 | } 32 | } 33 | ``` 34 | 35 | > More information: [Media.getUserMedia from MDN](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) 36 | -------------------------------------------------------------------------------- /src/page/test/publishHQAudio/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish HQ Audio Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
    12 | {{> settings-link}} 13 | {{> test-info testTitle='Publish HQ Audio Test'}} 14 |
    15 | {{> status-field-publisher}} 16 | {{> statistics-field packets_field='Packets Sent'}} 17 |
    18 | 21 |
    22 |
    23 |
    24 | {{> footer}} 25 | {{> body-scripts}} 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/page/test/publishImageCapture/README.md: -------------------------------------------------------------------------------- 1 | # Publish Image Capture 2 | 3 | This example demonstrates capturing a still of the camera by using the `drawImage` API of `CanvasRenderingContext2D`. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # Running the Example 13 | 14 | Click on the video playback to generate a still image of the video and display it below the video preview. 15 | 16 | ## Using drawImage 17 | 18 | ```js 19 | function clearCanvas(targetElement, canvasElement) { 20 | var context = canvasElement.getContext('2d') 21 | context.fillStyle = '#a1a1a1' 22 | context.fillRect(0, 0, targetElement.offsetWidth, targetElement.offsetHeight) 23 | } 24 | 25 | function drawOnCanvas(targetElement, canvasElement) { 26 | var context = canvasElement.getContext('2d') 27 | canvasElement.width = targetElement.offsetWidth 28 | canvasElement.height = targetElement.offsetHeight 29 | context.drawImage( 30 | targetElement, 31 | 0, 32 | 0, 33 | targetElement.offsetWidth, 34 | targetElement.offsetHeight 35 | ) 36 | } 37 | 38 | captureTarget.addEventListener('click', function () { 39 | clearCanvas(videoElement, canvasElement) 40 | drawOnCanvas(videoElement, canvasElement) 41 | }) 42 | ``` 43 | 44 | > More information: [CanvasRenderingContext2D.drawImage from MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage) 45 | -------------------------------------------------------------------------------- /src/page/test/publishImageCapture/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Image Capture Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 19 | 20 | 21 | {{> top-bar }} 22 |
    23 | {{> settings-link}} 24 | {{> test-info testTitle='Publish Image Capture Test'}} 25 |
    26 | {{> status-field-publisher}} 27 | {{> statistics-field packets_field='Packets Sent'}} 28 |
    29 |
    30 | 33 |
    34 |
    35 |
    36 |

    37 | 38 |

    39 | 40 |
    41 |
    42 |
    43 | {{> footer}} 44 | {{> body-scripts}} 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/page/test/publishMediaStreamCamera/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish MediaStream Swap Test (WebRTC)'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 15 | 16 | 17 | {{> top-bar }} 18 |
    19 | {{> settings-link}} 20 | {{> test-info testTitle='Publish MediaStream Swap Test (WebRTC)'}} 21 |
    22 | {{> status-field-publisher}} 23 | {{> statistics-field packets_field='Packets Sent'}} 24 |
    25 | 28 |
    29 |
    30 |

    31 | 32 | 33 |

    34 |
    35 |
    36 |
    37 | {{> footer}} 38 | {{> body-scripts}} 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/page/test/publishMute/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='WebRTC Publish Mute Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 32 | 33 | 34 | {{> top-bar }} 35 |
    36 | {{> settings-link}} 37 | {{> test-info testTitle='Publish Mute Test (WebRTC)'}} 38 |
    39 | {{> status-field-publisher}} 40 | {{> statistics-field packets_field='Packets Sent'}} 41 |
    42 | 45 |
    46 |
    47 | 48 |

    49 | 50 | 51 |

    52 |

    53 | 54 | 55 |

    56 |
    57 |
    58 |
    59 | {{> footer}} 60 | {{> body-scripts}} 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/page/test/publishRecord/README.md: -------------------------------------------------------------------------------- 1 | # Publish Stream Recording 2 | 3 | This example demonstrates recording the published stream to the server. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ### Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # Recording 13 | 14 | To record a published stream, modify the `streamMode` configuration attribute provided upon initialization of the Publisher: 15 | 16 | ```js 17 | var defaultConfiguration = { 18 | protocol: 'ws', 19 | port: 5080, 20 | app: 'live', 21 | streamMode: 'record', 22 | } 23 | ``` 24 | 25 | The following are accepted values for the `streamMode` configuration attribute: 26 | 27 | - **live** 28 | - **record** 29 | - **append** 30 | 31 | The default value is `live`. 32 | -------------------------------------------------------------------------------- /src/page/test/publishRecord/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Record Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
    12 | {{> settings-link}} 13 | {{> test-info testTitle='Publish Record Test'}} 14 |
    15 | {{> status-field-publisher}} 16 | {{> statistics-field packets_field='Packets Sent'}} 17 |
    18 | 21 |
    22 |
    23 |
    24 | {{> footer}} 25 | {{> body-scripts}} 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/page/test/publishRemoteCall/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Remote Call'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 19 | 20 | 21 | {{> top-bar }} 22 |
    23 | {{> settings-link}} 24 | {{> test-info testTitle='Publish Remote Call'}} 25 |
    26 | {{> status-field-publisher}} 27 | {{> statistics-field packets_field='Packets Sent'}} 28 |
    29 | 32 |
    33 |
    34 |

    35 | 36 | 37 |

    38 |

    39 |
    40 |
    41 |
    42 | {{> footer}} 43 | {{> body-scripts}} 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/page/test/publishSendLog/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Send Log'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 17 | 18 | 19 | {{> top-bar }} 20 |
    21 | {{> settings-link}} 22 | {{> test-info testTitle='Publish Send Log'}} 23 |
    24 | {{> status-field-publisher}} 25 | {{> statistics-field packets_field='Packets Sent'}} 26 |
    27 | 30 |
    31 |
    32 |

    33 | 34 | 35 |

    36 |

    37 |
    38 |
    39 |
    40 | {{> footer}} 41 | {{> body-scripts}} 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/page/test/publishSocialPusher/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 16 | 17 | 18 | {{> top-bar }} 19 |
    20 | {{> settings-link}} 21 | {{> test-info testTitle='Publish - Social Media Push Test'}} 22 |
    23 | {{> status-field-publisher}} 24 | {{> statistics-field packets_field='Packets Sent'}} 25 |
    26 | 29 | 30 | 31 |
    32 |

    33 | 34 | 35 |

    36 |

    37 | 38 | 39 |

    40 |

    41 | 42 | 43 |

    44 |

    45 |
    46 | 47 | 48 |
    49 |
    50 |
    51 | {{> footer}} 52 | {{> body-scripts}} 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/page/test/publishUnpublish/README.md: -------------------------------------------------------------------------------- 1 | # Unpublishing and optionally removing preview 2 | 3 | This is an example of removing the video preview and releasing Media browser access when using the `clearMediaOnUnpublish` configuration property of a broadcast stream. 4 | 5 | > **WebRTC Only** 6 | 7 | ## Example Code 8 | - **[index.html](index.html)** 9 | - **[index.js](index.js)** 10 | 11 | # clearMediaOnUnpublish 12 | 13 | The `clearMediaOnUnpublish` configuration property for a publisher is a `boolean` value that either retains Media capture and preview in a `video` element if left as default (`false`), or releases the Media (camera, microphone and tab indicator of a browser) and removes the preview from the `video` element if set to `true`. 14 | 15 | The default of `false` is by design for some frontends that require to maintain the Camera and Microphone connections between broadcasting sessions. 16 | 17 | However, this default design can be overriden by setting the `clearMediaOnUnpublish` config property value to `true`. When requesting to `unpublish`, this will affectively: 18 | 19 | * Removal of media video in the target `video` element 20 | * Release of the Camera from the browser 21 | * Release of the Microphone from the browser 22 | 23 | > To the end-user, this will turn off the camera light of the Camera being used. 24 | 25 | Internally, what the SDK does is: 26 | 27 | 1. Set the `srcObject` on the target `video` element to `null`. 28 | 2. Traverses and stops all the `MediaStreamTracks` of the underlying `MediaStream`. 29 | -------------------------------------------------------------------------------- /src/page/test/publishUnpublish/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 15 | 16 | 17 | {{> top-bar }} 18 |
    19 | {{> settings-link}} 20 | {{> test-info testTitle='Publish/Unpublish Test'}} 21 |
    22 | {{> status-field-publisher}} 23 | {{> statistics-field}} 24 |
    25 | 26 |
    27 |
    28 |

    29 | 33 | 34 |

    35 |
    36 |
    37 |
    38 | {{> footer}} 39 | {{> body-scripts}} 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/page/test/publishVP8/README.md: -------------------------------------------------------------------------------- 1 | # Specifying VP8 Encoder for Publisher 2 | 3 | This example demonstrates sending AMF Metadata on a Publisher stream connection. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # How to define VP8 Encoding 13 | 14 | The init configuration for a `WHIPClient` and `RTCPublisher` has the following attribute you can use to specify whether to use `VP8` or the default (`H264`) encoding: 15 | 16 | - `forceVP8`: If set to `true`, `VP8` encoding will be used. If `false` (default), it will use `H264`. 17 | -------------------------------------------------------------------------------- /src/page/test/publishVP8/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish V8 Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
    12 | {{> settings-link}} 13 | {{> test-info testTitle='Publish V8 Test'}} 14 |
    15 | {{> status-field-publisher}} 16 | {{> statistics-field packets_field='Packets Sent'}} 17 |
    18 | 21 |
    22 |
    23 |
    24 | {{> footer}} 25 | {{> body-scripts}} 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/page/test/publishValidation/README.md: -------------------------------------------------------------------------------- 1 | # Passing Validation parameters when Publishing 2 | 3 | **Validation Parameters** may be required for your current project. This is a way to additionally pass in query parameters when establishing a connection to the server. 4 | 5 | **Please refer to the [Basic Publisher Documentation](../publish/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # Setup 13 | 14 | The UI provides a form to allow for adding validation parameters. Once you have added the proper validation parameters, click the **Start Publishing** button Red5 Pro SDK will provide those parameters as key-value query parameters in its connection request to the server. 15 | 16 | The `getValidationParams` function just collects the parameter form fields and generates the key:value map. For example, if you entered in `foo` for the **Parameter Name** and `bar` for the **Parameter Value**, the `connectionParams` property would be: 17 | 18 | ```json 19 | { 20 | "foo": "bar" 21 | } 22 | ``` 23 | 24 | This is similar to the [Publish Round Trip Authentiation](../publishRoundTripAuth/) example of which a `username`, `password` and `token` are sent to be validated for credentials. 25 | 26 | This example allows you to additionally pass any other key-value pairs required for your application. 27 | -------------------------------------------------------------------------------- /src/page/test/publishValidation/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Publish Validation Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | 11 | {{> top-bar }} 12 |
    13 | {{> settings-link}} 14 | {{> test-info testTitle='Publish Validation Test'}} 15 |
    16 |
    17 |

    Validation Parameters

    18 |

    Provide validation parameters to be used in connection requests.

    19 |
    20 |
    21 |

    22 | 23 | 24 |

    25 |

    26 | 27 | 28 |

    29 | 30 |
    31 |
    32 | 33 |
    34 | {{> status-field-publisher}} 35 | {{> statistics-field packets_field='Packets Sent'}} 36 |
    37 | 40 |
    41 |
    42 |
    43 | {{> footer}} 44 | {{> body-scripts}} 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/page/test/subscribe/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
    12 | {{> settings-link}} 13 | {{> test-info testTitle='Subscriber Test'}} 14 |
    15 | {{> status-field-subscriber}} 16 | {{> statistics-field packets_field='Packets Received'}} 17 |
    18 | 23 |
    24 |
    25 |
    26 | {{> footer}} 27 | {{> body-scripts}} 28 | {{> mobile-subscriber-util}} 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/page/test/subscribe360/README.md: -------------------------------------------------------------------------------- 1 | # Subscribe to 360 Broadcast 2 | 3 | This is an example of subscribing the stream broadcast with a 360 camera. 4 | 5 | > For more detailed information on Configuring and Subscribing with the Red5 Pro SDK, please visit the [Red5 Pro Documentation](https://www.red5.net/docs/development/subscriber/webrtc). 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | -------------------------------------------------------------------------------- /src/page/test/subscribe360/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber 360 Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 52 | 53 | 54 | {{> top-bar }} 55 |
    56 | {{> settings-link}} 57 | {{> test-info testTitle='Subscriber 360 Test'}} 58 | {{> status-field-subscriber}} 59 | {{> statistics-field packets_field='Packets Received'}} 60 |
    61 | 66 |
    67 |
    68 | {{> footer}} 69 | {{> body-scripts}} 70 | {{> mobile-subscriber-util}} 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/page/test/subscribeAMFMetadata/README.md: -------------------------------------------------------------------------------- 1 | # Consuming AMF Metadata from RTC Streams 2 | 3 | AMF metadata can be ingested into source stream published to Red5 Pro and consumed on the client side in real time. The metadata is retrieved by processing the `Subscribe.Metadata` events for example using the following code: 4 | 5 | ```js 6 | function onSubscriberEvent(event) { 7 | console.log('[Red5ProSubsriber] ' + event.type + '.') 8 | if (event.type == 'Subscribe.Metadata') { 9 | processAMFData(event) 10 | } 11 | } 12 | 13 | function processAMFData(event) { 14 | const data = event.data 15 | console.log('received data: ', data) 16 | 17 | // process data 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /src/page/test/subscribeAMFMetadata/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | 6 | {{> meta title='Subscriber AMF Metadata Test'}} 7 | {{> header-scripts}} 8 | {{> header-stylesheets}} 9 | 10 | 11 | 12 | {{> top-bar }} 13 |
    14 | {{> settings-link}} 15 | {{> test-info testTitle='Subscriber AMF Metadata Test'}} 16 |
    17 | {{> status-field-subscriber}} 18 | {{> statistics-field packets_field='Packets Received'}} 19 |
    20 | 23 |
    24 |
    25 |
    26 |

    Received AMF Metadata:

    27 |
    28 |

    29 |
    30 |
    31 |
    32 | {{> footer}} 33 | {{> body-scripts}} 34 | {{> mobile-subscriber-util}} 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/page/test/subscribeAudioOnly/README.md: -------------------------------------------------------------------------------- 1 | # Subscribing with Audio Only 2 | 3 | This example demonstrates playback of a stream with audio only. 4 | 5 | **Please refer to the [Basic Subscriber Documentation](../subscribe/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # Audio Element 13 | 14 | The `audio` element is used for the assignment of the media stream blob: 15 | 16 | ```html 17 | 18 | ``` 19 | 20 | # Subscribing & Playback 21 | 22 | Initialization and playback of a Red5 Pro stream in an `audio` element is similar to one in a `video` element: 23 | 24 | ```js 25 | var subscriber = new WHEPClient() 26 | subscriber 27 | .init(config) 28 | .then(function () { 29 | return subscriber.subscribe() 30 | }) 31 | .then(function () { 32 | console.log('Successfully started a subscription session!') 33 | }) 34 | .catch(function (error) { 35 | console.error('Could not start a subscription session: ' + error) 36 | }) 37 | ``` 38 | -------------------------------------------------------------------------------- /src/page/test/subscribeAudioOnly/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='WebRTC Subscriber Audio-Only Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 13 | 14 | 15 | {{> top-bar }} 16 |
    17 | {{> settings-link}} 18 | {{> test-info testTitle='Subscriber Audio-Only Test (WebRTC)'}} 19 |
    20 | {{> status-field-subscriber}} 21 | {{> statistics-field packets_field='Packets Received'}} 22 |
    23 | 26 |
    27 |
    28 |
    29 | {{> footer}} 30 | {{> body-scripts}} 31 | {{> mobile-subscriber-util}} 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/page/test/subscribeAuth/README.md: -------------------------------------------------------------------------------- 1 | # Subscribe Authentication using Red5 Pro 2 | 3 | This is an example of authenticating a Subscription for stream playback. 4 | 5 | **Please refer to the [Basic Subscriber Documentation](../subscribe/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | > This example requires you to enable the `SimpleAuthentication` Plugin for the `live` webapp. More information: [Simple Authentication Plugin](https://www.red5.net/docs/special/authplugin/overview 13 | 14 | # Authenticating 15 | 16 | With the username and password known from the Red5 Pro Server `webapps/live/WEB-INF/simple-auth-plugin.credentials` file (if following the basic auth setup of the Red5 Pro Server), those values are provided to the `connectionParams` attribute of the subscriber configuration(s). 17 | 18 | For example, if you have defined the authorization of a user `foo` with a password `bar`, the configuration addition would look like the following: 19 | 20 | ```js 21 | connectionParms: { 22 | username: 'foo', 23 | password: 'bar' 24 | } 25 | ``` 26 | 27 | ## Example 28 | 29 | In the example, a login form is provided to allow the user to enter in their username and password. Those field values are added to the respective properties in the `connectionParms` attribute of the configuration(s) upon submit of the form, and the request to playback started: 30 | 31 | ```js 32 | submitButton.addEventListener('click', function () { 33 | configuration.connectionParams = { 34 | username: usernameField.value, 35 | password: passwordField.value, 36 | } 37 | start() 38 | }) 39 | ``` 40 | -------------------------------------------------------------------------------- /src/page/test/subscribeAuth/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Authentication Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 26 | 27 | 28 | {{> top-bar }} 29 |
    30 | {{> settings-link}} 31 | {{> test-info testTitle='Subscriber Authentication Test'}} 32 |
    33 |
    34 |

    Log In to begin your Playback:

    35 |
    36 |

    37 | 38 | 39 |

    40 |

    41 | 42 |

    43 | 44 |
    45 |
    46 | {{> status-field-subscriber}} 47 | {{> statistics-field}} 48 | 52 |
    53 |
    54 |
    55 | {{> footer}} 56 | {{> body-scripts}} 57 | {{> mobile-subscriber-util}} 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/page/test/subscribeCall/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Server Call Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 22 | 23 | 24 | {{> top-bar }} 25 |
    26 | {{> settings-link}} 27 | {{> test-info testTitle='Subscriber Server Call Test'}} 28 |
    29 | {{> status-field-subscriber}} 30 | {{> statistics-field packets_field='Packets Received'}} 31 |
    32 | 37 |
    38 |
    39 |

    40 |
      41 |
      42 |
      43 |
      44 | {{> footer}} 45 | {{> body-scripts}} 46 | {{> mobile-subscriber-util}} 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/page/test/subscribeCluster/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Cluster Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 15 | 16 | 17 | {{> top-bar }} 18 |
      19 | {{> settings-link}} 20 | {{> test-info testTitle='Subscriber Cluster Test'}} 21 |
      22 | {{> status-field-subscriber}} 23 | {{> statistics-field packets_field='Packets Received'}} 24 |

      Edge Address: N/A

      25 |
      26 | 31 |
      32 |
      33 |
      34 | {{> footer}} 35 | {{> body-scripts}} 36 | {{> mobile-subscriber-util}} 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/page/test/subscribeCodecSupport/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Codec Support'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | 11 | {{> top-bar }} 12 |
      13 | {{> settings-link}} 14 | {{> test-info testTitle='Subscriber Codec Support'}} 15 |
      16 |
      17 |

      18 | 19 | 20 |

      21 |

      22 | 23 | 24 |

      25 |

      26 | 27 |

      28 |
      29 | {{> status-field-subscriber}} 30 | {{> statistics-field packets_field='Packets Received'}} 31 |
      32 | 37 |
      38 |
      39 |
      40 | {{> footer}} 41 | {{> body-scripts}} 42 | {{> mobile-subscriber-util}} 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/page/test/subscribeDataChannel/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Data Channel Messaging'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | 11 | {{> top-bar }} 12 |
      13 | {{> settings-link}} 14 | {{> test-info testTitle='Subscriber Data Channel Messaging'}} 15 |
      16 |
      17 |

      18 | 19 | 20 |

      21 |

      22 | 23 |

      24 |
      25 | {{> status-field-subscriber}} 26 | {{> statistics-field packets_field='Packets Received'}} 27 |
      28 | 33 |
      34 |
      35 |
      36 | {{> footer}} 37 | {{> body-scripts}} 38 | {{> mobile-subscriber-util}} 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/page/test/subscribeHLS/README.md: -------------------------------------------------------------------------------- 1 | # Subscribe HLS Only 2 | 3 | This is an example of subscribing to a stream using HLS Only. By default the SDK support HLS failover support for browsers that support HLS natively (i.e., Desktop & Mobile Safari). 4 | 5 | In the event that HLS is not supported natively by the browser, the [hls.js](https://video-dev.github.io/hls.js/) 3rd-party library is utilized. 6 | 7 | ### Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | -------------------------------------------------------------------------------- /src/page/test/subscribeHLS/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='HLS Subscriber Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | 11 | {{> top-bar }} 12 |
      13 | {{> settings-link}} 14 | {{> test-info testTitle='HLS Subscriber Test'}} 15 |
      16 | {{> status-field-subscriber}} 17 |
      18 | 23 |
      24 |
      25 |
      26 | {{> footer}} 27 | {{> body-scripts}} 28 | {{> mobile-subscriber-util}} 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/page/test/subscribeImageCapture/README.md: -------------------------------------------------------------------------------- 1 | # Subscribe Image Capture 2 | 3 | This example demonstrates capturing a still of the playback by using the `drawImage` API of `CanvasRenderingContext2D`. 4 | 5 | **Please refer to the [Basic Subscriber Documentation](../subscribe/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # Running the Example 13 | 14 | Click on the video playback to generate a still image of the video and display it below the video preview. 15 | 16 | ## Using drawImage 17 | 18 | ```js 19 | function clearCanvas(targetElement, canvasElement) { 20 | var context = canvasElement.getContext('2d') 21 | context.fillStyle = '#a1a1a1' 22 | context.fillRect(0, 0, targetElement.offsetWidth, targetElement.offsetHeight) 23 | } 24 | 25 | function drawOnCanvas(targetElement, canvasElement) { 26 | var context = canvasElement.getContext('2d') 27 | canvasElement.width = targetElement.offsetWidth 28 | canvasElement.height = targetElement.offsetHeight 29 | context.drawImage( 30 | targetElement, 31 | 0, 32 | 0, 33 | targetElement.offsetWidth, 34 | targetElement.offsetHeight 35 | ) 36 | } 37 | 38 | captureTarget.addEventListener('click', function () { 39 | clearCanvas(videoElement, canvasElement) 40 | drawOnCanvas(videoElement, canvasElement) 41 | }) 42 | ``` 43 | 44 | > More information: [CanvasRenderingContext2D.drawImage from MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage) 45 | -------------------------------------------------------------------------------- /src/page/test/subscribeImageCapture/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='WebRTC Subscriber Image Capture Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 19 | 20 | 21 | {{> top-bar }} 22 |
      23 | {{> settings-link}} 24 | {{> test-info testTitle='Subscriber Image Capture Test (WebRTC)'}} 25 |
      26 | {{> status-field-subscriber}} 27 | {{> statistics-field packets_field='Packets Received'}} 28 |
      29 | 34 |
      35 |
      36 |

      37 | 38 |

      39 | 40 |
      41 |
      42 |
      43 | {{> footer}} 44 | {{> body-scripts}} 45 | {{> mobile-subscriber-util}} 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/page/test/subscribeMobile/README.md: -------------------------------------------------------------------------------- 1 | # Subscriber Page Optimized for Mobile 2 | 3 | This example uses some element attributes for Mobile optimization - mostly the inclusion of `playsinline` to the media element and lowering the display dimensions. 4 | 5 | **Please refer to the [Basic Subscriber Documentation](../subscribe/README.md) to learn more about the basic setup.** 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/page/test/subscribeMobile/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 |
      11 | {{> status-field-subscriber}} 12 | {{> statistics-field packets_field='Packets Received'}} 13 | {{> test-info testTitle='Subscriber Mobile Optimized Test'}} 14 |
      15 | 20 |
      21 | {{> settings-link}} 22 |
      23 | {{> footer}} 24 | {{> body-scripts}} 25 | {{> mobile-subscriber-util}} 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/page/test/subscribeMute/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='WebRTC Subscriber Mute API Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 20 | 21 | 22 | {{> top-bar }} 23 |
      24 | {{> settings-link}} 25 | {{> test-info testTitle='Subscriber Mute API Test (WebRTC)'}} 26 |
      27 | {{> status-field-subscriber}} 28 | {{> statistics-field packets_field='Packets Received'}} 29 |
      30 | 35 |
      36 |
      37 |

      38 | 39 | 40 |

      41 |
      42 |
      43 |
      44 | {{> footer}} 45 | {{> body-scripts}} 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/page/test/subscribeReconnect/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Reconnect Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
      12 | {{> settings-link}} 13 | {{> test-info testTitle='Subscriber Reconnect Test'}} 14 |
      15 | {{> status-field-subscriber}} 16 | {{> statistics-field packets_field='Packets Received'}} 17 |
      18 | 23 |
      24 |
      25 |
      26 | {{> footer}} 27 | {{> body-scripts}} 28 | {{> mobile-subscriber-util}} 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/page/test/subscribeRemoteCall/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Remote Call'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 21 | 22 | 23 | {{> top-bar }} 24 |
      25 | {{> settings-link}} 26 | {{> test-info testTitle='Subscriber Remote Call'}} 27 |
      28 | {{> status-field-subscriber}} 29 | {{> statistics-field packets_field='Packets Received'}} 30 |
      31 | 36 | 37 |
      38 |
      39 |
      40 | {{> footer}} 41 | {{> body-scripts}} 42 | {{> mobile-subscriber-util}} 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/page/test/subscribeRetryOnInvalidName/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='WebRTC Subscriber Retry On Connection'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 15 | 16 | 17 | {{> top-bar }} 18 |
      19 | {{> settings-link}} 20 | {{> test-info testTitle='Subscriber Retry On Connection (WebRTC)'}} 21 |
      22 | {{> status-field-subscriber}} 23 | {{> statistics-field packets_field='Packets Received'}} 24 |
      25 | 30 |
      31 |
      32 | 33 |
      34 |
      35 |
      36 | {{> footer}} 37 | {{> body-scripts}} 38 | {{> mobile-subscriber-util}} 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/page/test/subscribeScreenShare/README.md: -------------------------------------------------------------------------------- 1 | # Subscribe Screen Share using Red5 Pro 2 | 3 | This is an example subscribing to a broadcast with screen sharing. It is very similar to how you would subscribe to a video broadcast. However, this example makes to consumer connections: one for the screen share and one for the audio. This is due to the fact that is it not possible at the time of this writing (_November 30th, 2017_) to provide a valid media constraint with both audio an screen sharing. 4 | 5 | **Please refer to the [Basic Subscriber Documentation](../subscribe/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | - **[index.html](index.html)** 9 | - **[index.js](index.js)** 10 | 11 | # How to Subscribe 12 | 13 | First launch the [Publisher Screen Share Test](../publishScreenShare) in a separate window/tab and follow the extension installation requirements (depending on your browser). 14 | -------------------------------------------------------------------------------- /src/page/test/subscribeScreenShare/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Screen Share Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | {{> top-bar }} 11 |
      12 | {{> settings-link}} 13 |
      14 |
      15 |

      This example attempts to make two connections:
      One for ScreenShare & One for Audio from the Broadcaster.

      Start a screen share broadcast using the Publisher Screen Share.

      16 |
      17 |
      18 | {{> test-info testTitle='Subscriber Screen Share Test'}} 19 |
      20 | {{> status-field-subscriber}} 21 | {{> statistics-field packets_field='Packets Received'}} 22 |
      23 | 28 |
      29 |
      30 | {{> footer}} 31 | {{> body-scripts}} 32 | {{> mobile-subscriber-util}} 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/page/test/subscribeSendLog/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Send Log'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 20 | 21 | 22 | {{> top-bar }} 23 |
      24 | {{> settings-link}} 25 | {{> test-info testTitle='Subscriber Send Log'}} 26 |
      27 | {{> status-field-subscriber}} 28 | {{> statistics-field packets_field='Packets Received'}} 29 |
      30 | 35 |
      36 |
      37 |

      38 | 39 | 40 |

      41 |

      42 |
      43 |
      44 |
      45 | {{> footer}} 46 | {{> body-scripts}} 47 | {{> mobile-subscriber-util}} 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/page/test/subscribeStandby/README.md: -------------------------------------------------------------------------------- 1 | # Subscribe and Standby using Red5 Pro 2 | 3 | This is an example of using the Standby API to request a "pause" in receiving video and audio data on the MediaStream while also maintaining a connection of the client to the server; this would be considered "Enabling Standby". Additionally, the video and audio data can be requested to continue by "Disabling Standby" again. 4 | 5 | > For more detailed information on Configuring and Subscribing with the Red5 Pro SDK, please visit the [Red5 Pro Documentation](https://www.red5.net/docs/development/subscriber/webrtc). 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # How to use the Standby API 13 | 14 | Exposed on the WebRTC-based Subscriber are the following methods for the Standby API: 15 | 16 | - `enableStandby` 17 | - `disableStandby` 18 | 19 | By calling `enableStandby`, a socket request will be made for the server to temporarily "pause" the sending of audio and video data on the `MediaStream`. Calling `disableStandby` while in "standby" mode will make a request on the server to start sending the media data again. 20 | 21 | ```javascript 22 | function allowStandby() { 23 | var inStandby = false 24 | standbyButton.removeAttribute('disabled') 25 | standbyButton.addEventListener('click', function () { 26 | if (!inStandby && targetSubscriber) { 27 | targetSubscriber.enableStandby() 28 | standbyButton.innerText = 'Disable Standby' 29 | inStandby = !inStandby 30 | } else if (inStandby && targetSubscriber) { 31 | targetSubscriber.disableStandby() 32 | standbyButton.innerText = 'Enable Standby' 33 | inStandby = !inStandby 34 | } 35 | }) 36 | } 37 | ``` 38 | -------------------------------------------------------------------------------- /src/page/test/subscribeStandby/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='WebRTC Subscriber Standby Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 15 | 16 | 17 | {{> top-bar }} 18 |
      19 | {{> settings-link}} 20 | {{> test-info testTitle='Subscriber Standby Test (WebRTC)'}} 21 |
      22 | {{> status-field-subscriber}} 23 | {{> statistics-field packets_field='Packets Received'}} 24 |
      25 | 30 |
      31 |
      32 | 33 |
      34 |
      35 |
      36 | {{> footer}} 37 | {{> body-scripts}} 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/page/test/subscribeSwitch/Readme.md: -------------------------------------------------------------------------------- 1 | # WebRTC Subscriber Switch 2 | 3 | Through WebRTC, the current subscriber's stream may be switched to another live stream. This example demonstrates. 4 | 5 | This example is based on the _subscriber_ example. See that example's [README](../subscriber/README.md) for details on subscribing. Like the subscriber example, this example assumes there is a live stream by default named "stream1". 6 | 7 | This example demonstrates using the `callServer` API to invoke a method on the Application Adapter of the target app. The `callServer` method returns a `Promise`-like object that can additional deliver return data from the server. 8 | 9 | ### Example Code 10 | 11 | - **[index.html](index.html)** 12 | - **[index.js](index.js)** 13 | 14 | # Calling the server 15 | 16 | The `switchStreams` server call requires two pieces of data: 17 | 18 | - **`path`** to the live stream. This includes the context path and stream name, e.g., "live/stream1". 19 | - **`isImmediate`** -- if **true**, the audio will switch immediately and the original stream's video will freeze, and the video will switch to the new stream at the next keyframe. If **false**, the original continues uninterrupted until a new keyframe is received on the new stream, at which point audio and video switch simultaneously. 20 | 21 | The server call then contains a JSON array with a single entry containing these two parameters: 22 | 23 | ```javascript 24 | targetSubscriber.callServer('switchStreams', [ 25 | { 26 | path: streamPath.value, 27 | isImmediate: true, 28 | }, 29 | ]) 30 | ``` 31 | 32 | The server responds with a message: 33 | 34 | ```javascript 35 | { 36 | "data": { 37 | "type": "result", 38 | "message": "Stream switch: Success" 39 | } 40 | } 41 | ``` 42 | -------------------------------------------------------------------------------- /src/page/test/subscribeSwitch/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 14 | 15 | 16 | {{> top-bar }} 17 |
      18 | {{> settings-link}} 19 | {{> test-info testTitle='Subscriber Stream Switch Test'}} 20 |
      21 | {{> status-field-subscriber}} 22 | {{> statistics-field packets_field='Packets Received'}} 23 |
      24 | 29 | 30 | 31 |
      32 |

      33 | 34 | 35 |

      36 |

      37 |
      38 | 39 | 40 |
      41 |
      42 |
      43 | {{> footer}} 44 | {{> body-scripts}} 45 | {{> mobile-subscriber-util}} 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/page/test/subscribeValidation/README.md: -------------------------------------------------------------------------------- 1 | # Passing Validation parameters when Subscribing 2 | 3 | **Validation Parameters** may be required for your current project. This is a way to additionally pass in query parameters when establishing a connection to the server. 4 | 5 | **Please refer to the [Basic Subscriber Documentation](../subscribe/README.md) to learn more about the basic setup.** 6 | 7 | ## Example Code 8 | 9 | - **[index.html](index.html)** 10 | - **[index.js](index.js)** 11 | 12 | # Setup 13 | 14 | The UI provides a form to allow for adding validation parameters. Once you have added the proper validation parameters, click the **Start Subscribing** button Red5 Pro SDK will provide those parameters as key-value query parameters in its connection request to the server. 15 | 16 | The `getValidationParams` function just collects the parameter form fields and generates the key:value map. For example, if you entered in `foo` for the **Parameter Name** and `bar` for the **Parameter Value**, the `connectionParams` property would be: 17 | 18 | ```json 19 | { 20 | "foo": "bar" 21 | } 22 | ``` 23 | 24 | This is similar to the [Subscribe Round Trip Authentiation](../subscribeRoundTripAuth/) example of which a `username`, `password` and `token` are sent to be validated for credentials. 25 | 26 | This example allows you to additionally pass any other key-value pairs required for your application. 27 | -------------------------------------------------------------------------------- /src/page/test/subscribeValidation/index.html: -------------------------------------------------------------------------------- 1 | 2 | {{> license}} 3 | 4 | 5 | {{> meta title='Subscriber Validation Test'}} 6 | {{> header-scripts}} 7 | {{> header-stylesheets}} 8 | 9 | 10 | 11 | {{> top-bar }} 12 |
      13 | {{> settings-link}} 14 | {{> test-info testTitle='Subscriber Validation Test'}} 15 |
      16 |
      17 |

      Validation Parameters

      18 |

      Provide validation parameters to be used in connection requests.

      19 |
      20 |
      21 |

      22 | 23 | 24 |

      25 |

      26 | 27 | 28 |

      29 | 30 |
      31 |
      32 | 33 |
      34 | {{> status-field-subscriber}} 35 | {{> statistics-field packets_field='Packets Received'}} 36 |
      37 | 42 |
      43 |
      44 |
      45 | {{> footer}} 46 | {{> body-scripts}} 47 | {{> mobile-subscriber-util}} 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/page/test/subscribeVideoMute/README.md: -------------------------------------------------------------------------------- 1 | # Subscribe Video Mute 2 | 3 | The intent of this test is to demonstrate subscribing to a broadcast which has its video stream "muted". We have noticed that in Chrome and Safari browsers, when trying to play back a stream that has both Audio and Video tracks, but the Video tracks are empty - because the broadcaster has turned off their Camera - that no playback occurs when assigning the `MediaStream` source to a `