mirror of https://github.com/OpenVidu/openvidu.git
HTTPS and shared certificate with openvidu-server
parent
88ff95e24f
commit
d96750d4f8
|
@ -50,6 +50,8 @@ export class VideoSessionComponent implements OnInit {
|
|||
|
||||
// 2) Specify the actions when events take place
|
||||
this.session.on('streamCreated', (event) => {
|
||||
console.warn("STREAM CREATED!");
|
||||
console.warn(event.stream);
|
||||
this.session.subscribe(event.stream, 'subscriber', {
|
||||
insertMode: 'append',
|
||||
width: '100%',
|
||||
|
@ -68,12 +70,12 @@ export class VideoSessionComponent implements OnInit {
|
|||
} else {
|
||||
console.warn("OTHER USER'S CONNECTION CREATED!");
|
||||
}
|
||||
console.warn(event);
|
||||
console.warn(event.connection);
|
||||
});
|
||||
|
||||
this.session.on('connectionDestroyed', (event) => {
|
||||
console.warn("OTHER USER'S CONNECTION DESTROYED!");
|
||||
console.warn(event);
|
||||
console.warn(event.connection);
|
||||
});
|
||||
|
||||
|
||||
|
@ -89,6 +91,17 @@ export class VideoSessionComponent implements OnInit {
|
|||
// 4) Get your own camera stream with the desired resolution and publish it, only if the user is supposed to do so
|
||||
this.publisher = this.OV.initPublisher('publisher', this.cameraOptions);
|
||||
|
||||
this.publisher.on('accessAllowed', () => {
|
||||
console.warn("CAMERA ACCESS ALLOWED!");
|
||||
});
|
||||
this.publisher.on('accessDenied', () => {
|
||||
console.warn("CAMERA ACCESS DENIED!");
|
||||
});
|
||||
this.publisher.on('streamCreated', (event) => {
|
||||
console.warn("STREAM CREATED BY PUBLISHER!");
|
||||
console.warn(event.stream);
|
||||
})
|
||||
|
||||
// 5) Publish your stream
|
||||
this.session.publish(this.publisher);
|
||||
|
||||
|
@ -112,11 +125,9 @@ export class VideoSessionComponent implements OnInit {
|
|||
// If the user is the teacher: creates the session and gets a token (with PUBLISHER role)
|
||||
this.videoSessionService.createSession(this.lesson.id).subscribe(
|
||||
sessionId => { // {0: sessionId}
|
||||
console.warn(sessionId);
|
||||
this.sessionId = sessionId[0];
|
||||
this.videoSessionService.generateToken(this.lesson.id).subscribe(
|
||||
sessionIdAndToken => {
|
||||
console.warn(sessionIdAndToken);
|
||||
this.token = sessionIdAndToken[1];
|
||||
console.warn("Token: " + this.token);
|
||||
console.warn("SessionId: " + this.sessionId);
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
|
||||
export const environment = {
|
||||
production: false,
|
||||
URL_BACK: 'http://localhost:5000'
|
||||
URL_BACK: 'https://localhost:5000'
|
||||
};
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
spring.profiles.active=container
|
||||
|
||||
server.port: 5000
|
||||
server.ssl.enabled: true
|
||||
server.ssl.key-store: classpath:openvidu-selfsigned.jks
|
||||
server.ssl.key-store-password: openvidu
|
||||
server.ssl.key-store-type: JKS
|
||||
server.ssl.key-alias: openvidu-selfsigned
|
||||
|
||||
spring.datasource.url: jdbc:mysql://mysql:3306/openvidu_sample_app
|
||||
spring.datasource.username: op-root
|
||||
|
|
Loading…
Reference in New Issue