mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server dashboard improved
parent
e073601036
commit
3641e323e3
|
@ -27,7 +27,7 @@
|
||||||
"hammerjs": "^2.0.8",
|
"hammerjs": "^2.0.8",
|
||||||
"rxjs": "^5.1.0",
|
"rxjs": "^5.1.0",
|
||||||
"zone.js": "^0.8.4",
|
"zone.js": "^0.8.4",
|
||||||
"openvidu-browser": "1.0.3-beta.1"
|
"openvidu-browser": "1.0.5-beta.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular/cli": "1.0.2",
|
"@angular/cli": "1.0.2",
|
||||||
|
|
|
@ -34,7 +34,7 @@ md-card-title button.yellow {
|
||||||
|
|
||||||
md-spinner {
|
md-spinner {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 55%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ md-spinner {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 55%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,10 @@ md-spinner {
|
||||||
stroke-dashoffset: 0;
|
stroke-dashoffset: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#mirrored-video {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Pure CSS loader */
|
/* Pure CSS loader */
|
||||||
|
|
||||||
|
@ -90,7 +94,7 @@ md-spinner {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 55%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
-webkit-transform: translate(-50%, -50%);
|
-webkit-transform: translate(-50%, -50%);
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="msg-chain"><p *ngFor="let msg of msgChain">{{msg}}</p></div>
|
||||||
</md-card-content>
|
</md-card-content>
|
||||||
</md-card>
|
</md-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,6 +28,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||||
testButton = 'Test';
|
testButton = 'Test';
|
||||||
tickClass = 'trigger';
|
tickClass = 'trigger';
|
||||||
showSpinner = false;
|
showSpinner = false;
|
||||||
|
msgChain = [];
|
||||||
|
|
||||||
constructor(private infoService: InfoService, public dialog: MdDialog) {
|
constructor(private infoService: InfoService, public dialog: MdDialog) {
|
||||||
// Subscription to info updated event raised by InfoService
|
// Subscription to info updated event raised by InfoService
|
||||||
|
@ -78,12 +79,10 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
connectToSession(mySessionId: string) {
|
connectToSession(mySessionId: string) {
|
||||||
let OV = new OpenVidu();
|
this.msgChain = [];
|
||||||
this.session = OV.initSession(mySessionId);
|
|
||||||
|
|
||||||
this.session.on('streamCreated', (event) => {
|
const OV = new OpenVidu();
|
||||||
this.session.subscribe(event.stream, 'mirrored-video');
|
this.session = OV.initSession(mySessionId);
|
||||||
});
|
|
||||||
|
|
||||||
this.testStatus = 'CONNECTING';
|
this.testStatus = 'CONNECTING';
|
||||||
this.testButton = 'Testing...';
|
this.testButton = 'Testing...';
|
||||||
|
@ -99,19 +98,28 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||||
quality: 'MEDIUM'
|
quality: 'MEDIUM'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
publisherRemote.on('accessAllowed', () => {
|
||||||
|
this.msgChain.push('Camera access allowed');
|
||||||
|
});
|
||||||
|
|
||||||
|
publisherRemote.on('accessDenied', () => {
|
||||||
|
this.endTestVideo();
|
||||||
|
this.msgChain.push('Camera access denied');
|
||||||
|
});
|
||||||
|
|
||||||
publisherRemote.on('videoElementCreated', (video) => {
|
publisherRemote.on('videoElementCreated', (video) => {
|
||||||
|
|
||||||
this.showSpinner = true;
|
this.showSpinner = true;
|
||||||
|
this.msgChain.push('Video element created');
|
||||||
|
});
|
||||||
|
|
||||||
video.element.addEventListener('playing', () => {
|
publisherRemote.on('remoteVideoPlaying', (video) => {
|
||||||
console.warn('PLAYING!!');
|
this.msgChain.push('Remote video playing');
|
||||||
this.testButton = 'End test';
|
this.testButton = 'End test';
|
||||||
this.testStatus = 'PLAYING';
|
this.testStatus = 'PLAYING';
|
||||||
this.showSpinner = false;
|
this.showSpinner = false;
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
publisherRemote.stream.subscribeToMyRemote();
|
publisherRemote.subscribeToRemote();
|
||||||
this.session.publish(publisherRemote);
|
this.session.publish(publisherRemote);
|
||||||
} else {
|
} else {
|
||||||
if (error.code === 401) { // User unauthorized error. OpenVidu security is active
|
if (error.code === 401) { // User unauthorized error. OpenVidu security is active
|
||||||
|
@ -139,6 +147,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||||
this.testButton = 'Test';
|
this.testButton = 'Test';
|
||||||
this.showSpinner = false;
|
this.showSpinner = false;
|
||||||
this.info = [];
|
this.info = [];
|
||||||
|
this.msgChain = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollToBottom(): void {
|
scrollToBottom(): void {
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue