This app demonstrates ant-media-server capabilities.
Project also provides reusable Web Components for building WebRTC applications with Ant Media Server.
Sample demonstrations using these components can be found in the src/main/webapp/samples/ directory.
- Just download latest release of
StreamApp.war, install it on AMS instance form web panel, and enjoy!
- The HTML & JS source for web examples and re-usable components is located in
/src/main/webapp/ - While developing, you can use run dev web-server to quickly preview changes. See: /src/main/webapp/start_server.sh
Components can be styled by setting css-override-config.js configuration, or by overriding CSS paths directly on top of HTML file. See samples/css-customization.html for examples.
- Setup custom styling based on exmaple
- Import components as ES6 modules:
import { ComponentName } from './components/component-name.js' - Most components require a WebRTC adaptor instance via
setup(adaptor)method. See projects in/samples/for examples - Many components are self-managing and listen to adaptor events automatically (check individual component source files for specific behavior)
All components use CSS that can be overriden. Default CSS files are stored in ./components/styles/. You can always override those like shown in example below. The code responsible for managing this is in ./components/component-common.js
<!-- Load config first -->
<script src="src/main/webapp/js/css-override-config.js"></script>
<!-- Override default paths, or create your own custom css-override-config based on exisitng exmaple-->
<script>
window.AntMediaConfig.componentStyles['stream-controls'] = './my-custom.css';
</script>
<!-- Load components -->
<script type="module" src="src/main/webapp/components/stream-controls.js"></script>More details about individual component, see the component source files in the /components directory.
stream-controls- Stream ID input with start/stop togglestream-simple-state- Stream status and role display [BROKEN]video-view- Video player component
input-audio-selector- Audio device selectioninput-video-selector- Video device and screen sharing selectiontoggle-camera- Camera enable/disable buttontoggle-microphone- Microphone mute/unmute buttonresolution-selector- Stream resolution quality selection dropdown for play
advanced-audio-publisher-settings- Audio processing controls (noise suppression, gain)advanced-video-publisher-settings- Video configuration (bitrate configuration)virtual-background-manager- Background blur and custom imagesdeepar-effects-manager- DeepAR effects selection
stream-play-analytics- Real-time play statistics with chartsstream-publish-analytics- Real-time publish statistics with chartsmsg-display- WebRTC event logging and debugging
broadcast-browser- Live broadcast browsing with filtersvod-browser- VOD file browsing with paginationvod-uploader- File upload with drag-and-drop
data-channel-messaging- WebRTC data channel chatdata-channel-file-share- File sharing over WebRTC data channels with image previewcollaborative-canvas- Real-time collaborative drawing
component-common- CSS configuration utilities and common stuff
- Improve 'stream-simple-state' component
- Custom selector instead of <select> for dropdowns, So that it can be customised