Audio Streaming Player Component
This component is an Angular 2 (6.0+) WebRTC-based player component for audio streaming against Kurento Streaming Server. It uses WebRTC and WebSocket to play audio not keeping any data in memory.
Chrome (58+), Firefox (63+)
npm i c3-player
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { C3playerModule } from 'c3-player';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
C3playerModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
<c3-player audio="xxxx" image="xxxx" wsUrl="xxxx" duration="xxxx"></c3-player>
Where:
Input Name | Required | Definition | Default Value | Example |
---|---|---|---|---|
audio | ✅ | URL of the audio | None | https://example.com/audio1.ogg |
image | ✅ | URL of the wave image | None | https://example.com/wave1.png |
wsUrl | ✅ | WS URL | None | https://kurento.example.com/ws |
duration | ✅ | Duration in millis | None | 60000 (1min) |
width | ❌ | Width of the player | 100% | 50% |
margin | ❌ | Margin of the player | auto | 25% |
img-dim | ❌ | Relation width/height | 5 | 3 |