AngularJS
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
import { WebRTCClient } from '@arcware/webrtc-plugin';
@Component({
selector: 'app-my-component',
template: `
<div #sizeContainerRef>
<div #videoContainerRef>
<video #videoEl></video>
<audio #audioEl></audio>
</div>
</div>
`,
})
export class VideoComponent implements OnInit {
@ViewChild('sizeContainerRef') sizeContainerRef!: ElementRef;
@ViewChild('videoContainerRef') videoContainerRef!: ElementRef;
@ViewChild('videoRef') videoRef!: ElementRef;
@ViewChild('audioRef') audioRef!: ElementRef;
ngOnInit() {
const newWebRTC = WebRTCClient ({
address: 'wss://signalling-client.ragnarok.arcware.cloud/',
shareId: 'share-afedf133-571e-48bb-85f7-38a62e1ffb4',
settings: { /* object with settings */ },
playOverlay: false,
loader: (val) => { /* handle loader */ },
applicationResponse: (response) => { /* handle application response */ },
sizeContainer: this.sizeContainerRef.nativeElement,
container: this.videoContainerRef.nativeElement,
videoRef: this.videoRef.nativeElement,
audioRef: this.audioRef.nativeElement,
});
}
}
Last updated