diff --git a/openvidu-client-js/.bowerrc b/openvidu-browser/.bowerrc similarity index 100% rename from openvidu-client-js/.bowerrc rename to openvidu-browser/.bowerrc diff --git a/openvidu-client-js/.gitignore b/openvidu-browser/.gitignore similarity index 100% rename from openvidu-client-js/.gitignore rename to openvidu-browser/.gitignore diff --git a/openvidu-client-js/README.md b/openvidu-browser/README.md similarity index 100% rename from openvidu-client-js/README.md rename to openvidu-browser/README.md diff --git a/openvidu-client-js/pom.xml b/openvidu-browser/pom.xml similarity index 97% rename from openvidu-client-js/pom.xml rename to openvidu-browser/pom.xml index 6740637a..1bcb2282 100644 --- a/openvidu-client-js/pom.xml +++ b/openvidu-browser/pom.xml @@ -5,10 +5,10 @@ org.openvidu openvidu - 6.6.1-SNAPSHOT + 0.0.1-SNAPSHOT - openvidu-client-js + openvidu-browser jar Kurento Room Client JS diff --git a/openvidu-browser/src/main/resources/static/.vscode/tasks.json b/openvidu-browser/src/main/resources/static/.vscode/tasks.json new file mode 100644 index 00000000..dbb12dd6 --- /dev/null +++ b/openvidu-browser/src/main/resources/static/.vscode/tasks.json @@ -0,0 +1,11 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "0.1.0", + "command": "tsc", + "isShellCommand": true, + "args": ["-w", "-p", "."], + "showOutput": "silent", + "isWatching": true, + "problemMatcher": "$tsc-watch" +} \ No newline at end of file diff --git a/openvidu-client-js/src/main/resources/static/img/spinner.gif b/openvidu-browser/src/main/resources/static/img/spinner.gif similarity index 100% rename from openvidu-client-js/src/main/resources/static/img/spinner.gif rename to openvidu-browser/src/main/resources/static/img/spinner.gif diff --git a/openvidu-client-js/src/main/resources/static/js/KurentoRoom.js b/openvidu-browser/src/main/resources/static/js/OpenVidu.js similarity index 97% rename from openvidu-client-js/src/main/resources/static/js/KurentoRoom.js rename to openvidu-browser/src/main/resources/static/js/OpenVidu.js index 0da89f14..10906034 100644 --- a/openvidu-client-js/src/main/resources/static/js/KurentoRoom.js +++ b/openvidu-browser/src/main/resources/static/js/OpenVidu.js @@ -1,5 +1,5 @@ /* - * (C) Copyright 2016 Kurento (http://kurento.org/) + * (C) Copyright 2016 OpenVidu (http://kurento.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -458,6 +458,7 @@ function Stream(kurento, local, room, options) { var wrStream; var wp; var id; + if (options.id) { id = options.id; } else { @@ -713,18 +714,18 @@ function Stream(kurento, local, room, options) { options.dataChannels = true; } if (that.displayMyRemote()) { - wp = new kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function (error) { + this.wp = new kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function (error) { if (error) { return console.error(error); } - this.generateOffer(sdpOfferCallback.bind(that)); + this.wp.generateOffer(sdpOfferCallback.bind(that)); }); } else { - wp = new kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function (error) { + this.wp = new kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function (error) { if (error) { return console.error(error); } - this.generateOffer(sdpOfferCallback.bind(that)); + this.wp.generateOffer(sdpOfferCallback.bind(that)); }); } } else { @@ -882,11 +883,11 @@ function Stream(kurento, local, room, options) { } } -// KurentoRoom -------------------------------- +// OpenVidu -------------------------------- -function KurentoRoom(wsUri, callback) { - if (!(this instanceof KurentoRoom)) - return new KurentoRoom(wsUri, callback); +function OpenVidu(wsUri, callback) { + if (!(this instanceof OpenVidu)) + return new OpenVidu(wsUri, callback); var that = this; @@ -944,7 +945,6 @@ function KurentoRoom(wsUri, callback) { function isRoomAvailable() { if (room !== undefined && room instanceof Room) { return true; - º } else { console.warn('Room instance not found'); return false; @@ -1059,6 +1059,13 @@ function KurentoRoom(wsUri, callback) { } this.Stream = function (room, options) { + + options = options || { + audio : true, + video : true, + data : true + } + options.participant = room.getLocalParticipant(); return new Stream(that, true, room, options); }; diff --git a/openvidu-browser/src/main/resources/static/ts/Main.ts b/openvidu-browser/src/main/resources/static/ts/Main.ts new file mode 100644 index 00000000..2f8e0a33 --- /dev/null +++ b/openvidu-browser/src/main/resources/static/ts/Main.ts @@ -0,0 +1,4 @@ +export { Room } from './Room'; +export { Participant } from './Participant'; +export { Stream } from './Stream'; +export { OpenVidu } from './OpenVidu'; \ No newline at end of file diff --git a/openvidu-browser/src/main/resources/static/ts/OpenVidu.ts b/openvidu-browser/src/main/resources/static/ts/OpenVidu.ts new file mode 100644 index 00000000..9270eddd --- /dev/null +++ b/openvidu-browser/src/main/resources/static/ts/OpenVidu.ts @@ -0,0 +1,247 @@ +/* + * (C) Copyright 2016 OpenVidu (http://kurento.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { Room } from './Room'; +import { Stream } from './Stream'; + +declare var RpcBuilder: any; + +type Callback = ( error?: any, openVidu?: T ) => void; + +export class OpenVidu { + + private room: Room; + private userName: string; + private jsonRpcClient: any; + private rpcParams: any; + private callback: Callback; + + constructor( private wsUri: string ) { } + + getRoom() { + return this.room; + } + + connect( callback: Callback ): void { + + this.callback = callback; + + this.initJsonRpcClient( this.wsUri ); + } + + private initJsonRpcClient( wsUri: string ): void { + + let config = { + heartbeat: 3000, + sendCloseMessage: false, + ws: { + uri: wsUri, + useSockJS: false, + onconnected: this.connectCallback.bind( this ), + ondisconnect: this.disconnectCallback.bind( this ), + onreconnecting: this.reconnectingCallback.bind( this ), + onreconnected: this.reconnectedCallback.bind( this ) + }, + rpc: { + requestTimeout: 15000, + //notifications + participantJoined: this.onParticipantJoined.bind( this ), + participantPublished: this.onParticipantPublished.bind( this ), + participantUnpublished: this.onParticipantLeft.bind( this ), + participantLeft: this.onParticipantLeft.bind( this ), + participantEvicted: this.onParticipantEvicted.bind( this ), + sendMessage: this.onNewMessage.bind( this ), + iceCandidate: this.iceCandidateEvent.bind( this ), + mediaError: this.onMediaError.bind( this ), + custonNotification: this.customNotification.bind( this ) + } + }; + + this.jsonRpcClient = new RpcBuilder.clients.JsonRpcClient( config ); + } + + + private customNotification( params ) { + if ( this.isRoomAvailable() ) { + this.room.emitEvent( "custom-message-received", [{ params: params }] ); + } + } + + private connectCallback( error ) { + if ( error ) { + this.callback( error ); + } else { + this.callback( null, this ); + } + } + + private isRoomAvailable() { + if ( this.room !== undefined && this.room instanceof Room ) { + return true; + } else { + console.warn( 'Room instance not found' ); + return false; + } + } + + private disconnectCallback() { + console.log( 'Websocket connection lost' ); + if ( this.isRoomAvailable() ) { + this.room.onLostConnection(); + } else { + alert( 'Connection error. Please reload page.' ); + } + } + + private reconnectingCallback() { + console.log( 'Websocket connection lost (reconnecting)' ); + if ( this.isRoomAvailable() ) { + this.room.onLostConnection(); + } else { + alert( 'Connection error. Please reload page.' ); + } + } + + private reconnectedCallback() { + console.log( 'Websocket reconnected' ); + } + + private onParticipantJoined( params ) { + if ( this.isRoomAvailable() ) { + this.room.onParticipantJoined( params ); + } + } + + private onParticipantPublished( params ) { + if ( this.isRoomAvailable() ) { + this.room.onParticipantPublished( params ); + } + } + + private onParticipantLeft( params ) { + if ( this.isRoomAvailable() ) { + this.room.onParticipantLeft( params ); + } + } + + private onParticipantEvicted( params ) { + if ( this.isRoomAvailable() ) { + this.room.onParticipantEvicted( params ); + } + } + + private onNewMessage( params ) { + if ( this.isRoomAvailable() ) { + this.room.onNewMessage( params ); + } + } + + private iceCandidateEvent( params ) { + if ( this.isRoomAvailable() ) { + this.room.recvIceCandidate( params ); + } + } + + private onRoomClosed( params ) { + if ( this.isRoomAvailable() ) { + this.room.onRoomClosed( params ); + } + } + + private onMediaError( params ) { + if ( this.isRoomAvailable() ) { + this.room.onMediaError( params ); + } + } + + + setRpcParams( params: any ) { + this.rpcParams = params; + } + + sendRequest( method, params, callback?) { + + if ( params && params instanceof Function ) { + callback = params; + params = undefined; + } + + params = params || {}; + + if ( this.rpcParams && this.rpcParams !== null && this.rpcParams !== undefined ) { + for ( let index in this.rpcParams ) { + if ( this.rpcParams.hasOwnProperty( index ) ) { + params[index] = this.rpcParams[index]; + console.log( 'RPC param added to request {' + index + ': ' + this.rpcParams[index] + '}' ); + } + } + } + + console.log( 'Sending request: { method:"' + method + '", params: ' + JSON.stringify( params ) + ' }' ); + + this.jsonRpcClient.send( method, params, callback ); + } + + close( forced ) { + if ( this.isRoomAvailable() ) { + this.room.leave( forced, this.jsonRpcClient ); + } + }; + + disconnectParticipant( stream ) { + if ( this.isRoomAvailable() ) { + this.room.disconnect( stream ); + } + } + + Stream( room, options ) { + + options = options || { + audio: true, + video: true, + data: true + } + + options.participant = room.getLocalParticipant(); + return new Stream( this, true, room, options ); + }; + + Room( options ) { + let room = new Room( this, options ); + return room; + }; + + //CHAT + sendMessage( room, user, message ) { + this.sendRequest( 'sendMessage', { + message: message, + userMessage: user, + roomMessage: room + }, function( error, response ) { + if ( error ) { + console.error( error ); + } + }); + }; + + sendCustomRequest( params, callback ) { + this.sendRequest( 'customRequest', params, callback ); + }; + + + +} diff --git a/openvidu-browser/src/main/resources/static/ts/Participant.ts b/openvidu-browser/src/main/resources/static/ts/Participant.ts new file mode 100644 index 00000000..559ff162 --- /dev/null +++ b/openvidu-browser/src/main/resources/static/ts/Participant.ts @@ -0,0 +1,89 @@ +// Participant -------------------------------- +import { Stream, StreamOptions } from './Stream'; +import { OpenVidu } from './OpenVidu'; +import { Room } from './Room'; + +type ObjMap = { [s: string]: T; } + +export interface ParticipantOptions { + id: string; + streams?: StreamOptions[]; +} + +export class Participant { + + private id: string; + private streams: ObjMap = {}; + private streamsOpts: StreamOptions[] = []; + + constructor( private openVidu: OpenVidu, private local: boolean, private room: Room, private options: ParticipantOptions ) { + + this.id = options.id; + + if ( options.streams ) { + + for ( let streamOptions of options.streams ) { + + let streamOpts = { + id: streamOptions.id, + participant: this, + recvVideo: ( streamOptions.recvVideo == undefined ? true : streamOptions.recvVideo ), + recvAudio: ( streamOptions.recvAudio == undefined ? true : streamOptions.recvAudio ), + audio: streamOptions.audio, + video: streamOptions.video, + data: streamOptions.data + } + let stream = new Stream( openVidu, false, room, streamOpts ); + + this.addStream( stream ); + this.streamsOpts.push( streamOpts ); + } + } + + console.log( "New " + ( local ? "local " : "remote " ) + "participant " + this.id + + ", streams opts: ", this.streamsOpts ); + + + } + + setId( newId ) { + this.id = newId; + } + + addStream( stream ) { + this.streams[stream.getID()] = stream; + this.room.getStreams()[stream.getID()] = stream; + } + + getStreams() { + return this.streams; + } + + dispose() { + for ( let key in this.streams ) { + this.streams[key].dispose(); + } + } + + getID() { + return this.id; + } + + sendIceCandidate( candidate ) { + + console.debug(( this.local ? "Local" : "Remote" ), "candidate for", + this.getID(), JSON.stringify( candidate ) ); + + this.openVidu.sendRequest( "onIceCandidate", { + endpointName: this.getID(), + candidate: candidate.candidate, + sdpMid: candidate.sdpMid, + sdpMLineIndex: candidate.sdpMLineIndex + }, function( error, response ) { + if ( error ) { + console.error( "Error sending ICE candidate: " + + JSON.stringify( error ) ); + } + }); + } +} \ No newline at end of file diff --git a/openvidu-browser/src/main/resources/static/ts/Room.ts b/openvidu-browser/src/main/resources/static/ts/Room.ts new file mode 100644 index 00000000..17516ce6 --- /dev/null +++ b/openvidu-browser/src/main/resources/static/ts/Room.ts @@ -0,0 +1,386 @@ +import { Stream } from './Stream'; +import { OpenVidu } from './OpenVidu'; +import { Participant, ParticipantOptions } from './Participant'; + +declare let EventEmitter; + +export interface RoomOptions { + room: string; + user: string; + subscribeToStreams: boolean; + updateSpeakerInterval: number; + thresholdSpeaker: number; +} + +export class Room { + + private name: string; + private ee = new EventEmitter(); + private streams = {}; + private participants = {}; + private participantsSpeaking: Participant[] = []; + private connected = false; + private localParticipant; + private subscribeToStreams: boolean; + private updateSpeakerInterval: number; + public thresholdSpeaker: number; + + constructor( private openVidu: OpenVidu, private options: RoomOptions ) { + + this.name = options.room; + this.subscribeToStreams = options.subscribeToStreams || true; + this.updateSpeakerInterval = options.updateSpeakerInterval || 1500; + this.thresholdSpeaker = options.thresholdSpeaker || -50; + + this.activateUpdateMainSpeaker(); + this.localParticipant = new Participant(openVidu, true, this, { id: options.user }); + this.participants[options.user] = this.localParticipant; + } + + private activateUpdateMainSpeaker() { + + setInterval(() => { + if ( this.participantsSpeaking.length > 0 ) { + this.ee.emitEvent( 'update-main-speaker', [{ + participantId: this.participantsSpeaking[this.participantsSpeaking.length - 1] + }] ); + } + }, this.updateSpeakerInterval ); + } + + getLocalParticipant() { + return this.localParticipant; + } + + addEventListener( eventName, listener ) { + this.ee.addListener( eventName, listener ); + } + + emitEvent( eventName, eventsArray ) { + this.ee.emitEvent( eventName, eventsArray ); + } + + connect() { + + let joinParams = { + user: this.options.user, + room: this.options.room, + dataChannels: false + } + + if ( this.localParticipant ) { + if ( Object.keys( this.localParticipant.getStreams() ).some( streamId => + this.streams[streamId].isDataChannelEnabled() ) ) { + joinParams.dataChannels = true; + } + } + + this.openVidu.sendRequest( 'joinRoom', joinParams, ( error, response ) => { + + if ( error ) { + + console.warn( 'Unable to join room', error ); + this.ee.emitEvent( 'error-room', [{ + error: error + }] ); + + } else { + + this.connected = true; + + let exParticipants = response.value; + + let roomEvent = { + participants: new Array(), + streams: new Array() + } + + let length = exParticipants.length; + for ( let i = 0; i < length; i++ ) { + + let participant = new Participant( this.openVidu, false, this, + exParticipants[i] ); + + this.participants[participant.getID()] = participant; + + roomEvent.participants.push( participant ); + + let streams = participant.getStreams(); + for ( let key in streams ) { + roomEvent.streams.push( streams[key] ); + if ( this.subscribeToStreams ) { + streams[key].subscribe(); + } + } + } + + this.ee.emitEvent( 'room-connected', [roomEvent] ); + } + }); + } + + + subscribe( stream ) { + stream.subscribe(); + } + + onParticipantPublished( options ) { + + let participant = new Participant( this.openVidu, false, this, options ); + + let pid = participant.getID(); + if ( !( pid in this.participants ) ) { + console.info( "Publisher not found in participants list by its id", pid ); + } else { + console.log( "Publisher found in participants list by its id", pid ); + } + //replacing old participant (this one has streams) + this.participants[pid] = participant; + + this.ee.emitEvent( 'participant-published', [{ + participant: participant + }] ); + + let streams = participant.getStreams(); + for ( let key in streams ) { + let stream = streams[key]; + + if ( this.subscribeToStreams ) { + stream.subscribe(); + this.ee.emitEvent( 'stream-added', [{ + stream: stream + }] ); + } + } + } + + onParticipantJoined( msg ) { + + let participant = new Participant( this.openVidu, false, this, msg ); + + let pid = participant.getID(); + if ( !( pid in this.participants ) ) { + console.log( "New participant to participants list with id", pid ); + this.participants[pid] = participant; + } else { + //use existing so that we don't lose streams info + console.info( "Participant already exists in participants list with " + + "the same id, old:", this.participants[pid], ", joined now:", participant ); + participant = this.participants[pid]; + } + + this.ee.emitEvent( 'participant-joined', [{ + participant: participant + }] ); + } + + onParticipantLeft( msg ) { + + let participant = this.participants[msg.name]; + + if ( participant !== undefined ) { + delete this.participants[msg.name]; + + this.ee.emitEvent( 'participant-left', [{ + participant: participant + }] ); + + let streams = participant.getStreams(); + for ( let key in streams ) { + this.ee.emitEvent( 'stream-removed', [{ + stream: streams[key] + }] ); + } + + participant.dispose(); + + } else { + console.warn( "Participant " + msg.name + + " unknown. Participants: " + + JSON.stringify( this.participants ) ); + } + }; + + onParticipantEvicted( msg ) { + this.ee.emitEvent( 'participant-evicted', [{ + localParticipant: this.localParticipant + }] ); + }; + + onNewMessage( msg ) { + + console.log( "New message: " + JSON.stringify( msg ) ); + let room = msg.room; + let user = msg.user; + let message = msg.message; + + if ( user !== undefined ) { + this.ee.emitEvent( 'newMessage', [{ + room: room, + user: user, + message: message + }] ); + } else { + console.error( "User undefined in new message:", msg ); + } + } + + recvIceCandidate( msg ) { + + let candidate = { + candidate: msg.candidate, + sdpMid: msg.sdpMid, + sdpMLineIndex: msg.sdpMLineIndex + } + + let participant = this.participants[msg.endpointName]; + if ( !participant ) { + console.error( "Participant not found for endpoint " + + msg.endpointName + ". Ice candidate will be ignored.", + candidate ); + return; + } + + let streams = participant.getStreams(); + for ( let key in streams ) { + let stream = streams[key]; + stream.getWebRtcPeer().addIceCandidate( candidate, function( error ) { + if ( error ) { + console.error( "Error adding candidate for " + key + + " stream of endpoint " + msg.endpointName + + ": " + error ); + } + }); + } + } + + onRoomClosed( msg ) { + + console.log( "Room closed: " + JSON.stringify( msg ) ); + let room = msg.room; + if ( room !== undefined ) { + this.ee.emitEvent( 'room-closed', [{ + room: room + }] ); + } else { + console.error( "Room undefined in on room closed", msg ); + } + } + + onLostConnection() { + + if ( !this.connected ) { + console.warn( 'Not connected to room, ignoring lost connection notification' ); + return; + } + + console.log( 'Lost connection in room ' + this.name ); + let room = this.name; + if ( room !== undefined ) { + this.ee.emitEvent( 'lost-connection', [{room}] ); + } else { + console.error( 'Room undefined when lost connection' ); + } + } + + onMediaError( params ) { + + console.error( "Media error: " + JSON.stringify( params ) ); + let error = params.error; + if ( error ) { + this.ee.emitEvent( 'error-media', [{ + error: error + }] ); + } else { + console.error( "Received undefined media error. Params:", params ); + } + } + + /* + * forced means the user was evicted, no need to send the 'leaveRoom' request + */ + leave( forced, jsonRpcClient ) { + + forced = !!forced; + + console.log( "Leaving room (forced=" + forced + ")" ); + + if ( this.connected && !forced ) { + this.openVidu.sendRequest( 'leaveRoom', function( error, response ) { + if ( error ) { + console.error( error ); + } + jsonRpcClient.close(); + }); + } else { + jsonRpcClient.close(); + } + this.connected = false; + if ( this.participants ) { + for ( let pid in this.participants ) { + this.participants[pid].dispose(); + delete this.participants[pid]; + } + } + } + + disconnect( stream ) { + + let participant = stream.getParticipant(); + if ( !participant ) { + console.error( "Stream to disconnect has no participant", stream ); + return; + } + + delete this.participants[participant.getID()]; + participant.dispose(); + + if ( participant === this.localParticipant ) { + + console.log( "Unpublishing my media (I'm " + participant.getID() + ")" ); + delete this.localParticipant; + this.openVidu.sendRequest( 'unpublishVideo', function( error, response ) { + if ( error ) { + console.error( error ); + } else { + console.info( "Media unpublished correctly" ); + } + }); + + } else { + + console.log( "Unsubscribing from " + stream.getGlobalID() ); + this.openVidu.sendRequest( 'unsubscribeFromVideo', { + sender: stream.getGlobalID() + }, + function( error, response ) { + if ( error ) { + console.error( error ); + } else { + console.info( "Unsubscribed correctly from " + stream.getGlobalID() ); + } + }); + } + } + + getStreams() { + return this.streams; + } + + addParticipantSpeaking( participantId ) { + this.participantsSpeaking.push( participantId ); + } + + removeParticipantSpeaking( participantId ) { + let pos = -1; + for ( let i = 0; i < this.participantsSpeaking.length; i++ ) { + if ( this.participantsSpeaking[i] == participantId ) { + pos = i; + break; + } + } + if ( pos != -1 ) { + this.participantsSpeaking.splice( pos, 1 ); + } + } +} diff --git a/openvidu-browser/src/main/resources/static/ts/Stream.ts b/openvidu-browser/src/main/resources/static/ts/Stream.ts new file mode 100644 index 00000000..865ff54b --- /dev/null +++ b/openvidu-browser/src/main/resources/static/ts/Stream.ts @@ -0,0 +1,495 @@ +/* + * options: name: XXX data: true (Maybe this is based on webrtc) audio: true, + * video: true, url: "file:///..." > Player screen: true > Desktop (implicit + * video:true, audio:false) audio: true, video: true > Webcam + * + * stream.hasAudio(); stream.hasVideo(); stream.hasData(); + */ +import { Participant } from './Participant'; +import { Room } from './Room'; +import { OpenVidu } from './OpenVidu'; + +declare type JQuery = any; +declare var $: JQuery; +declare var kurentoUtils: any; +declare var getUserMedia: any; +declare var RTCSessionDescription: any; +declare var EventEmitter: any; + +function jq(id: string) { + return "#" + id.replace(/(@|:|\.|\[|\]|,)/g, "\\$1"); +} + +export interface StreamOptions { + id: string; + participant: Participant; + recvVideo: any; + recvAudio: any; + video: boolean; + audio: boolean; + data: boolean; +} + +export interface VideoOptions { + thumb: string; + video: HTMLVideoElement; +} + +export class Stream { + + private ee = new EventEmitter(); + private wrStream: any; + private wp: any; + private id: string; + private video: HTMLVideoElement; + private videoElements: VideoOptions[] = []; + private elements: HTMLDivElement[] = []; + private participant: Participant; + private speechEvent: any; + private recvVideo: any; + private recvAudio: any; + private showMyRemote = false; + private localMirrored = false; + private chanId = 0; + private dataChannel: boolean; + private dataChannelOpened = false; + + constructor( private openVidu: OpenVidu, private local: boolean, private room: Room, options: StreamOptions ) { + + if ( options.id ) { + this.id = options.id; + } else { + this.id = "webcam"; + } + + this.participant = options.participant; + this.recvVideo = options.recvVideo; + this.recvAudio = options.recvAudio; + this.dataChannel = options.data || false; + } + + getRecvVideo() { + return this.recvVideo; + } + + getRecvAudio() { + return this.recvAudio; + } + + + subscribeToMyRemote() { + this.showMyRemote = true; + } + + displayMyRemote() { + return this.showMyRemote; + } + + mirrorLocalStream( wr ) { + this.showMyRemote = true; + this.localMirrored = true; + if ( wr ) { + this.wrStream = wr; + } + } + + isLocalMirrored() { + return this.localMirrored; + } + + getChannelName() { + return this.getGlobalID() + '_' + this.chanId++; + } + + + isDataChannelEnabled() { + return this.dataChannel; + } + + + isDataChannelOpened() { + return this.dataChannelOpened; + } + + onDataChannelOpen( event ) { + console.log( 'Data channel is opened' ); + this.dataChannelOpened = true; + } + + onDataChannelClosed( event ) { + console.log( 'Data channel is closed' ); + this.dataChannelOpened = false; + } + + sendData( data ) { + if ( this.wp === undefined ) { + throw new Error( 'WebRTC peer has not been created yet' ); + } + if ( !this.dataChannelOpened ) { + throw new Error( 'Data channel is not opened' ); + } + console.log( "Sending through data channel: " + data ); + this.wp.send( data ); + } + + getWrStream() { + return this.wrStream; + } + + getWebRtcPeer() { + return this.wp; + } + + addEventListener( eventName: string, listener: any ) { + this.ee.addListener( eventName, listener ); + } + + showSpinner( spinnerParentId: string ) { + let progress = document.createElement( 'div' ); + progress.id = 'progress-' + this.getGlobalID(); + progress.style.background = "center transparent url('img/spinner.gif') no-repeat"; + let spinnerParent = document.getElementById( spinnerParentId ); + if(spinnerParent){ + spinnerParent.appendChild( progress ); + } + } + + hideSpinner( spinnerId?: string ) { + spinnerId = ( spinnerId === undefined ) ? this.getGlobalID() : spinnerId; + $( jq( 'progress-' + spinnerId ) ).hide(); + } + + playOnlyVideo( parentElement, thumbnailId ) { + this.video = document.createElement( 'video' ); + + this.video.id = 'native-video-' + this.getGlobalID(); + this.video.autoplay = true; + this.video.controls = false; + if ( this.wrStream ) { + this.video.src = URL.createObjectURL( this.wrStream ); + $( jq( thumbnailId ) ).show(); + this.hideSpinner(); + } else { + console.log( "No wrStream yet for", this.getGlobalID() ); + } + + this.videoElements.push( { + thumb: thumbnailId, + video: this.video + }); + + if ( this.local ) { + this.video.muted = true; + } + + if ( typeof parentElement === "string" ) { + let parentElementDom = document.getElementById( parentElement ); + if(parentElementDom){ + parentElementDom.appendChild( this.video ); + } + } else { + parentElement.appendChild( this.video ); + } + + return this.video; + } + + playThumbnail( thumbnailId ) { + + let container = document.createElement( 'div' ); + container.className = "participant"; + container.id = this.getGlobalID(); + let thumbnail = document.getElementById( thumbnailId ); + if(thumbnail){ + thumbnail.appendChild( container ); + } + + this.elements.push( container ); + + let name = document.createElement( 'div' ); + container.appendChild( name ); + let userName = this.getGlobalID().replace( '_webcam', '' ); + if ( userName.length >= 16 ) { + userName = userName.substring( 0, 16 ) + "..."; + } + name.appendChild( document.createTextNode( userName ) ); + name.id = "name-" + this.getGlobalID(); + name.className = "name"; + name.title = this.getGlobalID(); + + this.showSpinner( thumbnailId ); + + return this.playOnlyVideo( container, thumbnailId ); + } + + getID() { + return this.id; + } + + getParticipant() { + return this.participant; + } + + getGlobalID() { + if ( this.participant ) { + return this.participant.getID() + "_" + this.id; + } else { + return this.id + "_webcam"; + } + } + + init() { + + this.participant.addStream( this ); + + let constraints = { + audio: true, + video: { + width: { + ideal: 1280 + }, + frameRate: { + ideal: 15 + } + } + }; + + getUserMedia( constraints, userStream => { + this.wrStream = userStream; + this.ee.emitEvent( 'access-accepted', null ); + }, error => { + console.error( "Access denied", error ); + this.ee.emitEvent( 'access-denied', null ); + }); + } + + publishVideoCallback( error, sdpOfferParam, wp ) { + if ( error ) { + return console.error( "(publish) SDP offer error: " + + JSON.stringify( error ) ); + } + + console.log( "Sending SDP offer to publish as " + + this.getGlobalID(), sdpOfferParam ); + + this.openVidu.sendRequest( "publishVideo", { + sdpOffer: sdpOfferParam, + doLoopback: this.displayMyRemote() || false + }, ( error, response ) => { + if ( error ) { + console.error( "Error on publishVideo: " + JSON.stringify( error ) ); + } else { + this.room.emitEvent( 'stream-published', [{ + stream: this + }] ) + this.processSdpAnswer( response.sdpAnswer ); + } + }); + } + + startVideoCallback( error, sdpOfferParam, wp ) { + if ( error ) { + return console.error( "(subscribe) SDP offer error: " + + JSON.stringify( error ) ); + } + console.log( "Sending SDP offer to subscribe to " + + this.getGlobalID(), sdpOfferParam ); + this.openVidu.sendRequest( "receiveVideoFrom", { + sender: this.getGlobalID(), + sdpOffer: sdpOfferParam + }, ( error, response ) => { + if ( error ) { + console.error( "Error on recvVideoFrom: " + JSON.stringify( error ) ); + } else { + this.processSdpAnswer( response.sdpAnswer ); + } + }); + } + + private initWebRtcPeer( sdpOfferCallback ) { + if ( this.local ) { + + let options: any = { + videoStream: this.wrStream, + onicecandidate: this.participant.sendIceCandidate.bind( this.participant ), + } + + if ( this.dataChannel ) { + options.dataChannelConfig = { + id: this.getChannelName(), + onopen: this.onDataChannelOpen, + onclose: this.onDataChannelClosed + }; + options.dataChannels = true; + } + + if ( this.displayMyRemote() ) { + this.wp = new kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv( options, error => { + if ( error ) { + return console.error( error ); + } + this.wp.generateOffer( sdpOfferCallback.bind( this ) ); + }); + } else { + this.wp = new kurentoUtils.WebRtcPeer.WebRtcPeerSendonly( options, error => { + if ( error ) { + return console.error( error ); + } + this.wp.generateOffer( sdpOfferCallback.bind( this ) ); + }); + } + } else { + let offerConstraints = { + mandatory: { + OfferToReceiveVideo: this.recvVideo, + OfferToReceiveAudio: this.recvAudio + } + }; + console.log( "Constraints of generate SDP offer (subscribing)", + offerConstraints ); + let options = { + onicecandidate: this.participant.sendIceCandidate.bind( this.participant ), + connectionConstraints: offerConstraints + } + this.wp = new kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly( options, error => { + if ( error ) { + return console.error( error ); + } + this.wp.generateOffer( sdpOfferCallback.bind( this ) ); + }); + } + console.log( "Waiting for SDP offer to be generated (" + + ( this.local ? "local" : "remote" ) + " peer: " + this.getGlobalID() + ")" ); + } + + publish() { + + // FIXME: Throw error when stream is not local + + this.initWebRtcPeer( this.publishVideoCallback ); + + // FIXME: Now we have coupled connecting to a room and adding a + // stream to this room. But in the new API, there are two steps. + // This is the second step. For now, it do nothing. + + } + + subscribe() { + + // FIXME: In the current implementation all participants are subscribed + // automatically to all other participants. We use this method only to + // negotiate SDP + + this.initWebRtcPeer( this.startVideoCallback ); + } + + processSdpAnswer( sdpAnswer ) { + + let answer = new RTCSessionDescription( { + type: 'answer', + sdp: sdpAnswer, + }); + console.log( this.getGlobalID() + ": set peer connection with recvd SDP answer", + sdpAnswer ); + let participantId = this.getGlobalID(); + let pc = this.wp.peerConnection; + pc.setRemoteDescription( answer, () => { + // Avoids to subscribe to your own stream remotely + // except when showMyRemote is true + if ( !this.local || this.displayMyRemote() ) { + this.wrStream = pc.getRemoteStreams()[0]; + console.log( "Peer remote stream", this.wrStream ); + + if ( this.wrStream != undefined ) { + + this.speechEvent = kurentoUtils.WebRtcPeer.hark( this.wrStream, { threshold: this.room.thresholdSpeaker }); + + this.speechEvent.on( 'speaking', () => { + this.room.addParticipantSpeaking( participantId ); + this.room.emitEvent( 'stream-speaking', [{ + participantId: participantId + }] ); + }); + + this.speechEvent.on( 'stopped_speaking', () => { + this.room.removeParticipantSpeaking( participantId ); + this.room.emitEvent( 'stream-stopped-speaking', [{ + participantId: participantId + }] ); + }); + } + for (let videoElement of this.videoElements) { + let thumbnailId = videoElement.thumb; + let video = videoElement.video; + video.src = URL.createObjectURL( this.wrStream ); + video.onplay = () => { + console.log( this.getGlobalID() + ': ' + 'Video playing' ); + $( jq( thumbnailId ) ).show(); + this.hideSpinner( this.getGlobalID() ); + }; + } + this.room.emitEvent( 'stream-subscribed', [{ + stream: this + }] ); + } + }, error => { + console.error( this.getGlobalID() + ": Error setting SDP to the peer connection: " + + JSON.stringify( error ) ); + }); + } + + unpublish() { + if ( this.wp ) { + this.wp.dispose(); + } else { + if ( this.wrStream ) { + this.wrStream.getAudioTracks().forEach( function( track ) { + track.stop && track.stop() + }) + this.wrStream.getVideoTracks().forEach( function( track ) { + track.stop && track.stop() + }) + } + } + + if ( this.speechEvent ) { + this.speechEvent.stop(); + } + + console.log( this.getGlobalID() + ": Stream '" + this.id + "' unpublished" ); + } + + dispose() { + + function disposeElement( element ) { + if ( element && element.parentNode ) { + element.parentNode.removeChild( element ); + } + } + + this.elements.forEach( e => disposeElement( e ) ); + + this.videoElements.forEach( ve => disposeElement( ve ) ); + + disposeElement( "progress-" + this.getGlobalID() ); + + if ( this.wp ) { + this.wp.dispose(); + } else { + if ( this.wrStream ) { + this.wrStream.getAudioTracks().forEach( function( track ) { + track.stop && track.stop() + }) + this.wrStream.getVideoTracks().forEach( function( track ) { + track.stop && track.stop() + }) + } + } + + if ( this.speechEvent ) { + this.speechEvent.stop(); + } + + console.log( this.getGlobalID() + ": Stream '" + this.id + "' disposed" ); + } +} diff --git a/openvidu-browser/src/main/resources/static/ts/tsconfig.json b/openvidu-browser/src/main/resources/static/ts/tsconfig.json new file mode 100644 index 00000000..5b2a5660 --- /dev/null +++ b/openvidu-browser/src/main/resources/static/ts/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "system", + //"noImplicitAny": true, + "noImplicitThis": true, + //"noUnusedLocals": true, + //"noUnusedParameters": true, + "skipDefaultLibCheck": true, + "skipLibCheck": true, + "suppressExcessPropertyErrors": true, + "suppressImplicitAnyIndexErrors": true, + //"allowUnusedLabels": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + //"allowUnreachableCode": true, + "forceConsistentCasingInFileNames": true, + "allowSyntheticDefaultImports": true, + "strictNullChecks": true, + "outFile": "../ts_js/OpenVidu.js", + "emitBOM": false, + "preserveConstEnums": true, + "sourceMap": true + }, + //"buildOnSave": true, + "compileOnSave":true +} \ No newline at end of file diff --git a/openvidu-browser/src/main/resources/static/ts_js/OpenVidu.js b/openvidu-browser/src/main/resources/static/ts_js/OpenVidu.js new file mode 100644 index 00000000..44ed80c3 --- /dev/null +++ b/openvidu-browser/src/main/resources/static/ts_js/OpenVidu.js @@ -0,0 +1,1066 @@ +/* + * (C) Copyright 2016 OpenVidu (http://kurento.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +System.register("OpenVidu", ["Room", "Stream"], function(exports_1, context_1) { + "use strict"; + var __moduleName = context_1 && context_1.id; + var Room_1, Stream_1; + var OpenVidu; + return { + setters:[ + function (Room_1_1) { + Room_1 = Room_1_1; + }, + function (Stream_1_1) { + Stream_1 = Stream_1_1; + }], + execute: function() { + OpenVidu = (function () { + function OpenVidu(wsUri) { + this.wsUri = wsUri; + } + OpenVidu.prototype.getRoom = function () { + return this.room; + }; + OpenVidu.prototype.connect = function (callback) { + this.callback = callback; + this.initJsonRpcClient(this.wsUri); + }; + OpenVidu.prototype.initJsonRpcClient = function (wsUri) { + var config = { + heartbeat: 3000, + sendCloseMessage: false, + ws: { + uri: wsUri, + useSockJS: false, + onconnected: this.connectCallback.bind(this), + ondisconnect: this.disconnectCallback.bind(this), + onreconnecting: this.reconnectingCallback.bind(this), + onreconnected: this.reconnectedCallback.bind(this) + }, + rpc: { + requestTimeout: 15000, + //notifications + participantJoined: this.onParticipantJoined.bind(this), + participantPublished: this.onParticipantPublished.bind(this), + participantUnpublished: this.onParticipantLeft.bind(this), + participantLeft: this.onParticipantLeft.bind(this), + participantEvicted: this.onParticipantEvicted.bind(this), + sendMessage: this.onNewMessage.bind(this), + iceCandidate: this.iceCandidateEvent.bind(this), + mediaError: this.onMediaError.bind(this), + custonNotification: this.customNotification.bind(this) + } + }; + this.jsonRpcClient = new RpcBuilder.clients.JsonRpcClient(config); + }; + OpenVidu.prototype.customNotification = function (params) { + if (this.isRoomAvailable()) { + this.room.emitEvent("custom-message-received", [{ params: params }]); + } + }; + OpenVidu.prototype.connectCallback = function (error) { + if (error) { + this.callback(error); + } + else { + this.callback(null, this); + } + }; + OpenVidu.prototype.isRoomAvailable = function () { + if (this.room !== undefined && this.room instanceof Room_1.Room) { + return true; + } + else { + console.warn('Room instance not found'); + return false; + } + }; + OpenVidu.prototype.disconnectCallback = function () { + console.log('Websocket connection lost'); + if (this.isRoomAvailable()) { + this.room.onLostConnection(); + } + else { + alert('Connection error. Please reload page.'); + } + }; + OpenVidu.prototype.reconnectingCallback = function () { + console.log('Websocket connection lost (reconnecting)'); + if (this.isRoomAvailable()) { + this.room.onLostConnection(); + } + else { + alert('Connection error. Please reload page.'); + } + }; + OpenVidu.prototype.reconnectedCallback = function () { + console.log('Websocket reconnected'); + }; + OpenVidu.prototype.onParticipantJoined = function (params) { + if (this.isRoomAvailable()) { + this.room.onParticipantJoined(params); + } + }; + OpenVidu.prototype.onParticipantPublished = function (params) { + if (this.isRoomAvailable()) { + this.room.onParticipantPublished(params); + } + }; + OpenVidu.prototype.onParticipantLeft = function (params) { + if (this.isRoomAvailable()) { + this.room.onParticipantLeft(params); + } + }; + OpenVidu.prototype.onParticipantEvicted = function (params) { + if (this.isRoomAvailable()) { + this.room.onParticipantEvicted(params); + } + }; + OpenVidu.prototype.onNewMessage = function (params) { + if (this.isRoomAvailable()) { + this.room.onNewMessage(params); + } + }; + OpenVidu.prototype.iceCandidateEvent = function (params) { + if (this.isRoomAvailable()) { + this.room.recvIceCandidate(params); + } + }; + OpenVidu.prototype.onRoomClosed = function (params) { + if (this.isRoomAvailable()) { + this.room.onRoomClosed(params); + } + }; + OpenVidu.prototype.onMediaError = function (params) { + if (this.isRoomAvailable()) { + this.room.onMediaError(params); + } + }; + OpenVidu.prototype.setRpcParams = function (params) { + this.rpcParams = params; + }; + OpenVidu.prototype.sendRequest = function (method, params, callback) { + if (params && params instanceof Function) { + callback = params; + params = undefined; + } + params = params || {}; + if (this.rpcParams && this.rpcParams !== null && this.rpcParams !== undefined) { + for (var index in this.rpcParams) { + if (this.rpcParams.hasOwnProperty(index)) { + params[index] = this.rpcParams[index]; + console.log('RPC param added to request {' + index + ': ' + this.rpcParams[index] + '}'); + } + } + } + console.log('Sending request: { method:"' + method + '", params: ' + JSON.stringify(params) + ' }'); + this.jsonRpcClient.send(method, params, callback); + }; + OpenVidu.prototype.close = function (forced) { + if (this.isRoomAvailable()) { + this.room.leave(forced, this.jsonRpcClient); + } + }; + ; + OpenVidu.prototype.disconnectParticipant = function (stream) { + if (this.isRoomAvailable()) { + this.room.disconnect(stream); + } + }; + OpenVidu.prototype.Stream = function (room, options) { + options = options || { + audio: true, + video: true, + data: true + }; + options.participant = room.getLocalParticipant(); + return new Stream_1.Stream(this, true, room, options); + }; + ; + OpenVidu.prototype.Room = function (options) { + var room = new Room_1.Room(this, options); + return room; + }; + ; + //CHAT + OpenVidu.prototype.sendMessage = function (room, user, message) { + this.sendRequest('sendMessage', { + message: message, + userMessage: user, + roomMessage: room + }, function (error, response) { + if (error) { + console.error(error); + } + }); + }; + ; + OpenVidu.prototype.sendCustomRequest = function (params, callback) { + this.sendRequest('customRequest', params, callback); + }; + ; + return OpenVidu; + }()); + exports_1("OpenVidu", OpenVidu); + } + } +}); +System.register("Participant", ["Stream"], function(exports_2, context_2) { + "use strict"; + var __moduleName = context_2 && context_2.id; + var Stream_2; + var Participant; + return { + setters:[ + function (Stream_2_1) { + Stream_2 = Stream_2_1; + }], + execute: function() { + Participant = (function () { + function Participant(openVidu, local, room, options) { + this.openVidu = openVidu; + this.local = local; + this.room = room; + this.options = options; + this.streams = {}; + this.streamsOpts = []; + this.id = options.id; + if (options.streams) { + for (var _i = 0, _a = options.streams; _i < _a.length; _i++) { + var streamOptions = _a[_i]; + var streamOpts = { + id: streamOptions.id, + participant: this, + recvVideo: (streamOptions.recvVideo == undefined ? true : streamOptions.recvVideo), + recvAudio: (streamOptions.recvAudio == undefined ? true : streamOptions.recvAudio), + audio: streamOptions.audio, + video: streamOptions.video, + data: streamOptions.data + }; + var stream = new Stream_2.Stream(openVidu, false, room, streamOpts); + this.addStream(stream); + this.streamsOpts.push(streamOpts); + } + } + console.log("New " + (local ? "local " : "remote ") + "participant " + this.id + + ", streams opts: ", this.streamsOpts); + } + Participant.prototype.setId = function (newId) { + this.id = newId; + }; + Participant.prototype.addStream = function (stream) { + this.streams[stream.getID()] = stream; + this.room.getStreams()[stream.getID()] = stream; + }; + Participant.prototype.getStreams = function () { + return this.streams; + }; + Participant.prototype.dispose = function () { + for (var key in this.streams) { + this.streams[key].dispose(); + } + }; + Participant.prototype.getID = function () { + return this.id; + }; + Participant.prototype.sendIceCandidate = function (candidate) { + console.debug((this.local ? "Local" : "Remote"), "candidate for", this.getID(), JSON.stringify(candidate)); + this.openVidu.sendRequest("onIceCandidate", { + endpointName: this.getID(), + candidate: candidate.candidate, + sdpMid: candidate.sdpMid, + sdpMLineIndex: candidate.sdpMLineIndex + }, function (error, response) { + if (error) { + console.error("Error sending ICE candidate: " + + JSON.stringify(error)); + } + }); + }; + return Participant; + }()); + exports_2("Participant", Participant); + } + } +}); +System.register("Stream", [], function(exports_3, context_3) { + "use strict"; + var __moduleName = context_3 && context_3.id; + var Stream; + function jq(id) { + return "#" + id.replace(/(@|:|\.|\[|\]|,)/g, "\\$1"); + } + return { + setters:[], + execute: function() { + Stream = (function () { + function Stream(openVidu, local, room, options) { + this.openVidu = openVidu; + this.local = local; + this.room = room; + this.ee = new EventEmitter(); + this.videoElements = []; + this.elements = []; + this.showMyRemote = false; + this.localMirrored = false; + this.chanId = 0; + this.dataChannelOpened = false; + if (options.id) { + this.id = options.id; + } + else { + this.id = "webcam"; + } + this.participant = options.participant; + this.recvVideo = options.recvVideo; + this.recvAudio = options.recvAudio; + this.dataChannel = options.data || false; + } + Stream.prototype.getRecvVideo = function () { + return this.recvVideo; + }; + Stream.prototype.getRecvAudio = function () { + return this.recvAudio; + }; + Stream.prototype.subscribeToMyRemote = function () { + this.showMyRemote = true; + }; + Stream.prototype.displayMyRemote = function () { + return this.showMyRemote; + }; + Stream.prototype.mirrorLocalStream = function (wr) { + this.showMyRemote = true; + this.localMirrored = true; + if (wr) { + this.wrStream = wr; + } + }; + Stream.prototype.isLocalMirrored = function () { + return this.localMirrored; + }; + Stream.prototype.getChannelName = function () { + return this.getGlobalID() + '_' + this.chanId++; + }; + Stream.prototype.isDataChannelEnabled = function () { + return this.dataChannel; + }; + Stream.prototype.isDataChannelOpened = function () { + return this.dataChannelOpened; + }; + Stream.prototype.onDataChannelOpen = function (event) { + console.log('Data channel is opened'); + this.dataChannelOpened = true; + }; + Stream.prototype.onDataChannelClosed = function (event) { + console.log('Data channel is closed'); + this.dataChannelOpened = false; + }; + Stream.prototype.sendData = function (data) { + if (this.wp === undefined) { + throw new Error('WebRTC peer has not been created yet'); + } + if (!this.dataChannelOpened) { + throw new Error('Data channel is not opened'); + } + console.log("Sending through data channel: " + data); + this.wp.send(data); + }; + Stream.prototype.getWrStream = function () { + return this.wrStream; + }; + Stream.prototype.getWebRtcPeer = function () { + return this.wp; + }; + Stream.prototype.addEventListener = function (eventName, listener) { + this.ee.addListener(eventName, listener); + }; + Stream.prototype.showSpinner = function (spinnerParentId) { + var progress = document.createElement('div'); + progress.id = 'progress-' + this.getGlobalID(); + progress.style.background = "center transparent url('img/spinner.gif') no-repeat"; + var spinnerParent = document.getElementById(spinnerParentId); + if (spinnerParent) { + spinnerParent.appendChild(progress); + } + }; + Stream.prototype.hideSpinner = function (spinnerId) { + spinnerId = (spinnerId === undefined) ? this.getGlobalID() : spinnerId; + $(jq('progress-' + spinnerId)).hide(); + }; + Stream.prototype.playOnlyVideo = function (parentElement, thumbnailId) { + this.video = document.createElement('video'); + this.video.id = 'native-video-' + this.getGlobalID(); + this.video.autoplay = true; + this.video.controls = false; + if (this.wrStream) { + this.video.src = URL.createObjectURL(this.wrStream); + $(jq(thumbnailId)).show(); + this.hideSpinner(); + } + else { + console.log("No wrStream yet for", this.getGlobalID()); + } + this.videoElements.push({ + thumb: thumbnailId, + video: this.video + }); + if (this.local) { + this.video.muted = true; + } + if (typeof parentElement === "string") { + var parentElementDom = document.getElementById(parentElement); + if (parentElementDom) { + parentElementDom.appendChild(this.video); + } + } + else { + parentElement.appendChild(this.video); + } + return this.video; + }; + Stream.prototype.playThumbnail = function (thumbnailId) { + var container = document.createElement('div'); + container.className = "participant"; + container.id = this.getGlobalID(); + var thumbnail = document.getElementById(thumbnailId); + if (thumbnail) { + thumbnail.appendChild(container); + } + this.elements.push(container); + var name = document.createElement('div'); + container.appendChild(name); + var userName = this.getGlobalID().replace('_webcam', ''); + if (userName.length >= 16) { + userName = userName.substring(0, 16) + "..."; + } + name.appendChild(document.createTextNode(userName)); + name.id = "name-" + this.getGlobalID(); + name.className = "name"; + name.title = this.getGlobalID(); + this.showSpinner(thumbnailId); + return this.playOnlyVideo(container, thumbnailId); + }; + Stream.prototype.getID = function () { + return this.id; + }; + Stream.prototype.getParticipant = function () { + return this.participant; + }; + Stream.prototype.getGlobalID = function () { + if (this.participant) { + return this.participant.getID() + "_" + this.id; + } + else { + return this.id + "_webcam"; + } + }; + Stream.prototype.init = function () { + var _this = this; + this.participant.addStream(this); + var constraints = { + audio: true, + video: { + width: { + ideal: 1280 + }, + frameRate: { + ideal: 15 + } + } + }; + getUserMedia(constraints, function (userStream) { + _this.wrStream = userStream; + _this.ee.emitEvent('access-accepted', null); + }, function (error) { + console.error("Access denied", error); + _this.ee.emitEvent('access-denied', null); + }); + }; + Stream.prototype.publishVideoCallback = function (error, sdpOfferParam, wp) { + var _this = this; + if (error) { + return console.error("(publish) SDP offer error: " + + JSON.stringify(error)); + } + console.log("Sending SDP offer to publish as " + + this.getGlobalID(), sdpOfferParam); + this.openVidu.sendRequest("publishVideo", { + sdpOffer: sdpOfferParam, + doLoopback: this.displayMyRemote() || false + }, function (error, response) { + if (error) { + console.error("Error on publishVideo: " + JSON.stringify(error)); + } + else { + _this.room.emitEvent('stream-published', [{ + stream: _this + }]); + _this.processSdpAnswer(response.sdpAnswer); + } + }); + }; + Stream.prototype.startVideoCallback = function (error, sdpOfferParam, wp) { + var _this = this; + if (error) { + return console.error("(subscribe) SDP offer error: " + + JSON.stringify(error)); + } + console.log("Sending SDP offer to subscribe to " + + this.getGlobalID(), sdpOfferParam); + this.openVidu.sendRequest("receiveVideoFrom", { + sender: this.getGlobalID(), + sdpOffer: sdpOfferParam + }, function (error, response) { + if (error) { + console.error("Error on recvVideoFrom: " + JSON.stringify(error)); + } + else { + _this.processSdpAnswer(response.sdpAnswer); + } + }); + }; + Stream.prototype.initWebRtcPeer = function (sdpOfferCallback) { + var _this = this; + if (this.local) { + var options = { + videoStream: this.wrStream, + onicecandidate: this.participant.sendIceCandidate.bind(this.participant), + }; + if (this.dataChannel) { + options.dataChannelConfig = { + id: this.getChannelName(), + onopen: this.onDataChannelOpen, + onclose: this.onDataChannelClosed + }; + options.dataChannels = true; + } + if (this.displayMyRemote()) { + this.wp = new kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function (error) { + if (error) { + return console.error(error); + } + _this.wp.generateOffer(sdpOfferCallback.bind(_this)); + }); + } + else { + this.wp = new kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function (error) { + if (error) { + return console.error(error); + } + _this.wp.generateOffer(sdpOfferCallback.bind(_this)); + }); + } + } + else { + var offerConstraints = { + mandatory: { + OfferToReceiveVideo: this.recvVideo, + OfferToReceiveAudio: this.recvAudio + } + }; + console.log("Constraints of generate SDP offer (subscribing)", offerConstraints); + var options = { + onicecandidate: this.participant.sendIceCandidate.bind(this.participant), + connectionConstraints: offerConstraints + }; + this.wp = new kurentoUtils.WebRtcPeer.WebRtcPeerRecvonly(options, function (error) { + if (error) { + return console.error(error); + } + _this.wp.generateOffer(sdpOfferCallback.bind(_this)); + }); + } + console.log("Waiting for SDP offer to be generated (" + + (this.local ? "local" : "remote") + " peer: " + this.getGlobalID() + ")"); + }; + Stream.prototype.publish = function () { + // FIXME: Throw error when stream is not local + this.initWebRtcPeer(this.publishVideoCallback); + // FIXME: Now we have coupled connecting to a room and adding a + // stream to this room. But in the new API, there are two steps. + // This is the second step. For now, it do nothing. + }; + Stream.prototype.subscribe = function () { + // FIXME: In the current implementation all participants are subscribed + // automatically to all other participants. We use this method only to + // negotiate SDP + this.initWebRtcPeer(this.startVideoCallback); + }; + Stream.prototype.processSdpAnswer = function (sdpAnswer) { + var _this = this; + var answer = new RTCSessionDescription({ + type: 'answer', + sdp: sdpAnswer, + }); + console.log(this.getGlobalID() + ": set peer connection with recvd SDP answer", sdpAnswer); + var participantId = this.getGlobalID(); + var pc = this.wp.peerConnection; + pc.setRemoteDescription(answer, function () { + // Avoids to subscribe to your own stream remotely + // except when showMyRemote is true + if (!_this.local || _this.displayMyRemote()) { + _this.wrStream = pc.getRemoteStreams()[0]; + console.log("Peer remote stream", _this.wrStream); + if (_this.wrStream != undefined) { + _this.speechEvent = kurentoUtils.WebRtcPeer.hark(_this.wrStream, { threshold: _this.room.thresholdSpeaker }); + _this.speechEvent.on('speaking', function () { + _this.room.addParticipantSpeaking(participantId); + _this.room.emitEvent('stream-speaking', [{ + participantId: participantId + }]); + }); + _this.speechEvent.on('stopped_speaking', function () { + _this.room.removeParticipantSpeaking(participantId); + _this.room.emitEvent('stream-stopped-speaking', [{ + participantId: participantId + }]); + }); + } + var _loop_1 = function(videoElement) { + var thumbnailId = videoElement.thumb; + var video = videoElement.video; + video.src = URL.createObjectURL(_this.wrStream); + video.onplay = function () { + console.log(_this.getGlobalID() + ': ' + 'Video playing'); + $(jq(thumbnailId)).show(); + _this.hideSpinner(_this.getGlobalID()); + }; + }; + for (var _i = 0, _a = _this.videoElements; _i < _a.length; _i++) { + var videoElement = _a[_i]; + _loop_1(videoElement); + } + _this.room.emitEvent('stream-subscribed', [{ + stream: _this + }]); + } + }, function (error) { + console.error(_this.getGlobalID() + ": Error setting SDP to the peer connection: " + + JSON.stringify(error)); + }); + }; + Stream.prototype.unpublish = function () { + if (this.wp) { + this.wp.dispose(); + } + else { + if (this.wrStream) { + this.wrStream.getAudioTracks().forEach(function (track) { + track.stop && track.stop(); + }); + this.wrStream.getVideoTracks().forEach(function (track) { + track.stop && track.stop(); + }); + } + } + if (this.speechEvent) { + this.speechEvent.stop(); + } + console.log(this.getGlobalID() + ": Stream '" + this.id + "' unpublished"); + }; + Stream.prototype.dispose = function () { + function disposeElement(element) { + if (element && element.parentNode) { + element.parentNode.removeChild(element); + } + } + this.elements.forEach(function (e) { return disposeElement(e); }); + this.videoElements.forEach(function (ve) { return disposeElement(ve); }); + disposeElement("progress-" + this.getGlobalID()); + if (this.wp) { + this.wp.dispose(); + } + else { + if (this.wrStream) { + this.wrStream.getAudioTracks().forEach(function (track) { + track.stop && track.stop(); + }); + this.wrStream.getVideoTracks().forEach(function (track) { + track.stop && track.stop(); + }); + } + } + if (this.speechEvent) { + this.speechEvent.stop(); + } + console.log(this.getGlobalID() + ": Stream '" + this.id + "' disposed"); + }; + return Stream; + }()); + exports_3("Stream", Stream); + } + } +}); +System.register("Room", ["Participant"], function(exports_4, context_4) { + "use strict"; + var __moduleName = context_4 && context_4.id; + var Participant_1; + var Room; + return { + setters:[ + function (Participant_1_1) { + Participant_1 = Participant_1_1; + }], + execute: function() { + Room = (function () { + function Room(openVidu, options) { + this.openVidu = openVidu; + this.options = options; + this.ee = new EventEmitter(); + this.streams = {}; + this.participants = {}; + this.participantsSpeaking = []; + this.connected = false; + this.name = options.room; + this.subscribeToStreams = options.subscribeToStreams || true; + this.updateSpeakerInterval = options.updateSpeakerInterval || 1500; + this.thresholdSpeaker = options.thresholdSpeaker || -50; + this.activateUpdateMainSpeaker(); + this.localParticipant = new Participant_1.Participant(openVidu, true, this, { id: options.user }); + this.participants[options.user] = this.localParticipant; + } + Room.prototype.activateUpdateMainSpeaker = function () { + var _this = this; + setInterval(function () { + if (_this.participantsSpeaking.length > 0) { + _this.ee.emitEvent('update-main-speaker', [{ + participantId: _this.participantsSpeaking[_this.participantsSpeaking.length - 1] + }]); + } + }, this.updateSpeakerInterval); + }; + Room.prototype.getLocalParticipant = function () { + return this.localParticipant; + }; + Room.prototype.addEventListener = function (eventName, listener) { + this.ee.addListener(eventName, listener); + }; + Room.prototype.emitEvent = function (eventName, eventsArray) { + this.ee.emitEvent(eventName, eventsArray); + }; + Room.prototype.connect = function () { + var _this = this; + var joinParams = { + user: this.options.user, + room: this.options.room, + dataChannels: false + }; + if (this.localParticipant) { + if (Object.keys(this.localParticipant.getStreams()).some(function (streamId) { + return _this.streams[streamId].isDataChannelEnabled(); + })) { + joinParams.dataChannels = true; + } + } + this.openVidu.sendRequest('joinRoom', joinParams, function (error, response) { + if (error) { + console.warn('Unable to join room', error); + _this.ee.emitEvent('error-room', [{ + error: error + }]); + } + else { + _this.connected = true; + var exParticipants = response.value; + var roomEvent = { + participants: new Array(), + streams: new Array() + }; + var length_1 = exParticipants.length; + for (var i = 0; i < length_1; i++) { + var participant = new Participant_1.Participant(_this.openVidu, false, _this, exParticipants[i]); + _this.participants[participant.getID()] = participant; + roomEvent.participants.push(participant); + var streams = participant.getStreams(); + for (var key in streams) { + roomEvent.streams.push(streams[key]); + if (_this.subscribeToStreams) { + streams[key].subscribe(); + } + } + } + _this.ee.emitEvent('room-connected', [roomEvent]); + } + }); + }; + Room.prototype.subscribe = function (stream) { + stream.subscribe(); + }; + Room.prototype.onParticipantPublished = function (options) { + var participant = new Participant_1.Participant(this.openVidu, false, this, options); + var pid = participant.getID(); + if (!(pid in this.participants)) { + console.info("Publisher not found in participants list by its id", pid); + } + else { + console.log("Publisher found in participants list by its id", pid); + } + //replacing old participant (this one has streams) + this.participants[pid] = participant; + this.ee.emitEvent('participant-published', [{ + participant: participant + }]); + var streams = participant.getStreams(); + for (var key in streams) { + var stream = streams[key]; + if (this.subscribeToStreams) { + stream.subscribe(); + this.ee.emitEvent('stream-added', [{ + stream: stream + }]); + } + } + }; + Room.prototype.onParticipantJoined = function (msg) { + var participant = new Participant_1.Participant(this.openVidu, false, this, msg); + var pid = participant.getID(); + if (!(pid in this.participants)) { + console.log("New participant to participants list with id", pid); + this.participants[pid] = participant; + } + else { + //use existing so that we don't lose streams info + console.info("Participant already exists in participants list with " + + "the same id, old:", this.participants[pid], ", joined now:", participant); + participant = this.participants[pid]; + } + this.ee.emitEvent('participant-joined', [{ + participant: participant + }]); + }; + Room.prototype.onParticipantLeft = function (msg) { + var participant = this.participants[msg.name]; + if (participant !== undefined) { + delete this.participants[msg.name]; + this.ee.emitEvent('participant-left', [{ + participant: participant + }]); + var streams = participant.getStreams(); + for (var key in streams) { + this.ee.emitEvent('stream-removed', [{ + stream: streams[key] + }]); + } + participant.dispose(); + } + else { + console.warn("Participant " + msg.name + + " unknown. Participants: " + + JSON.stringify(this.participants)); + } + }; + ; + Room.prototype.onParticipantEvicted = function (msg) { + this.ee.emitEvent('participant-evicted', [{ + localParticipant: this.localParticipant + }]); + }; + ; + Room.prototype.onNewMessage = function (msg) { + console.log("New message: " + JSON.stringify(msg)); + var room = msg.room; + var user = msg.user; + var message = msg.message; + if (user !== undefined) { + this.ee.emitEvent('newMessage', [{ + room: room, + user: user, + message: message + }]); + } + else { + console.error("User undefined in new message:", msg); + } + }; + Room.prototype.recvIceCandidate = function (msg) { + var candidate = { + candidate: msg.candidate, + sdpMid: msg.sdpMid, + sdpMLineIndex: msg.sdpMLineIndex + }; + var participant = this.participants[msg.endpointName]; + if (!participant) { + console.error("Participant not found for endpoint " + + msg.endpointName + ". Ice candidate will be ignored.", candidate); + return; + } + var streams = participant.getStreams(); + var _loop_2 = function(key) { + var stream = streams[key]; + stream.getWebRtcPeer().addIceCandidate(candidate, function (error) { + if (error) { + console.error("Error adding candidate for " + key + + " stream of endpoint " + msg.endpointName + + ": " + error); + } + }); + }; + for (var key in streams) { + _loop_2(key); + } + }; + Room.prototype.onRoomClosed = function (msg) { + console.log("Room closed: " + JSON.stringify(msg)); + var room = msg.room; + if (room !== undefined) { + this.ee.emitEvent('room-closed', [{ + room: room + }]); + } + else { + console.error("Room undefined in on room closed", msg); + } + }; + Room.prototype.onLostConnection = function () { + if (!this.connected) { + console.warn('Not connected to room, ignoring lost connection notification'); + return; + } + console.log('Lost connection in room ' + this.name); + var room = this.name; + if (room !== undefined) { + this.ee.emitEvent('lost-connection', [{ room: room }]); + } + else { + console.error('Room undefined when lost connection'); + } + }; + Room.prototype.onMediaError = function (params) { + console.error("Media error: " + JSON.stringify(params)); + var error = params.error; + if (error) { + this.ee.emitEvent('error-media', [{ + error: error + }]); + } + else { + console.error("Received undefined media error. Params:", params); + } + }; + /* + * forced means the user was evicted, no need to send the 'leaveRoom' request + */ + Room.prototype.leave = function (forced, jsonRpcClient) { + forced = !!forced; + console.log("Leaving room (forced=" + forced + ")"); + if (this.connected && !forced) { + this.openVidu.sendRequest('leaveRoom', function (error, response) { + if (error) { + console.error(error); + } + jsonRpcClient.close(); + }); + } + else { + jsonRpcClient.close(); + } + this.connected = false; + if (this.participants) { + for (var pid in this.participants) { + this.participants[pid].dispose(); + delete this.participants[pid]; + } + } + }; + Room.prototype.disconnect = function (stream) { + var participant = stream.getParticipant(); + if (!participant) { + console.error("Stream to disconnect has no participant", stream); + return; + } + delete this.participants[participant.getID()]; + participant.dispose(); + if (participant === this.localParticipant) { + console.log("Unpublishing my media (I'm " + participant.getID() + ")"); + delete this.localParticipant; + this.openVidu.sendRequest('unpublishVideo', function (error, response) { + if (error) { + console.error(error); + } + else { + console.info("Media unpublished correctly"); + } + }); + } + else { + console.log("Unsubscribing from " + stream.getGlobalID()); + this.openVidu.sendRequest('unsubscribeFromVideo', { + sender: stream.getGlobalID() + }, function (error, response) { + if (error) { + console.error(error); + } + else { + console.info("Unsubscribed correctly from " + stream.getGlobalID()); + } + }); + } + }; + Room.prototype.getStreams = function () { + return this.streams; + }; + Room.prototype.addParticipantSpeaking = function (participantId) { + this.participantsSpeaking.push(participantId); + }; + Room.prototype.removeParticipantSpeaking = function (participantId) { + var pos = -1; + for (var i = 0; i < this.participantsSpeaking.length; i++) { + if (this.participantsSpeaking[i] == participantId) { + pos = i; + break; + } + } + if (pos != -1) { + this.participantsSpeaking.splice(pos, 1); + } + }; + return Room; + }()); + exports_4("Room", Room); + } + } +}); +System.register("Main", ["Room", "Participant", "Stream", "OpenVidu"], function(exports_5, context_5) { + "use strict"; + var __moduleName = context_5 && context_5.id; + return { + setters:[ + function (Room_2_1) { + exports_5({ + "Room": Room_2_1["Room"] + }); + }, + function (Participant_2_1) { + exports_5({ + "Participant": Participant_2_1["Participant"] + }); + }, + function (Stream_3_1) { + exports_5({ + "Stream": Stream_3_1["Stream"] + }); + }, + function (OpenVidu_1_1) { + exports_5({ + "OpenVidu": OpenVidu_1_1["OpenVidu"] + }); + }], + execute: function() { + } + } +}); +//# sourceMappingURL=OpenVidu.js.map \ No newline at end of file diff --git a/openvidu-browser/src/main/resources/static/ts_js/OpenVidu.js.map b/openvidu-browser/src/main/resources/static/ts_js/OpenVidu.js.map new file mode 100644 index 00000000..d960445f --- /dev/null +++ b/openvidu-browser/src/main/resources/static/ts_js/OpenVidu.js.map @@ -0,0 +1 @@ +{"version":3,"file":"OpenVidu.js","sourceRoot":"","sources":["../ts/OpenVidu.ts","../ts/Participant.ts","../ts/Stream.ts","../ts/Room.ts","../ts/Main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;YASH;gBAQI,kBAAqB,KAAa;oBAAb,UAAK,GAAL,KAAK,CAAQ;gBAAK,CAAC;gBAExC,0BAAO,GAAP;oBACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;gBACrB,CAAC;gBAED,0BAAO,GAAP,UAAS,QAA4B;oBAEjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;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CAAC;oBACX,CAAC;gBACL,CAAC;gBAED,yBAAU,GAAV;oBACI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;gBACxB,CAAC;gBAED,qCAAsB,GAAtB,UAAwB,aAAa;oBACjC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAE,aAAa,CAAE,CAAC;gBACpD,CAAC;gBAED,wCAAyB,GAAzB,UAA2B,aAAa;oBACpC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC;oBACb,GAAG,CAAC,CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAG,CAAC;wBAC1D,EAAE,CAAC,CAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,aAAc,CAAC,CAAC,CAAC;4BAClD,GAAG,GAAG,CAAC,CAAC;4BACR,KAAK,CAAC;wBACV,CAAC;oBACL,CAAC;oBACD,EAAE,CAAC,CAAE,GAAG,IAAI,CAAC,CAAE,CAAC,CAAC,CAAC;wBACd,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAE,GAAG,EAAE,CAAC,CAAE,CAAC;oBAC/C,CAAC;gBACL,CAAC;gBACL,WAAC;YAAD,CAAC,AAnXD,IAmXC;YAnXD,uBAmXC,CAAA"} \ No newline at end of file diff --git a/openvidu-client-js/.classpath b/openvidu-client-js/.classpath deleted file mode 100644 index 6d7587a8..00000000 --- a/openvidu-client-js/.classpath +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/openvidu-client-js/.project b/openvidu-client-js/.project deleted file mode 100644 index 0eaf3933..00000000 --- a/openvidu-client-js/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - kurento-room-client-js - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/openvidu-client-js/.settings/org.eclipse.core.resources.prefs b/openvidu-client-js/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index db326978..00000000 --- a/openvidu-client-js/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/resources=UTF-8 -encoding/=UTF-8 diff --git a/openvidu-client-js/.settings/org.eclipse.jdt.core.prefs b/openvidu-client-js/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351ae..00000000 --- a/openvidu-client-js/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/openvidu-client-js/.settings/org.eclipse.m2e.core.prefs b/openvidu-client-js/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1..00000000 --- a/openvidu-client-js/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.bower.json b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.bower.json deleted file mode 100644 index dfa1b268..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.bower.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "webrtc-adapter", - "version": "0.2.3", - "description": "A shim to insulate apps from WebRTC spec changes and prefix differences", - "repository": { - "type": "git", - "url": "https://github.com/webrtc/adapter.git" - }, - "authors": [ - "The WebRTC project authors (http://www.webrtc.org/)" - ], - "main": "adapter.js", - "moduleType": [ - "globals" - ], - "ignore": [ - "test/*" - ], - "keywords": [ - "WebRTC", - "PeerConnection", - "RTCPeerConnection", - "getUserMedia", - "Chrome", - "Chromium", - "Firefox" - ], - "license": "BSD-3-Clause", - "homepage": "https://github.com/webrtc/adapter", - "_release": "0.2.3", - "_resolution": { - "type": "version", - "tag": "v0.2.3", - "commit": "c51190130048443ec853f95d0a89362c4c79931a" - }, - "_source": "git://github.com/webrtc/adapter.git", - "_target": "*", - "_originalSource": "adapter.js" -} \ No newline at end of file diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.gitignore b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.gitignore deleted file mode 100644 index ef09aa3b..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -browsers/ -node_modules/ -*~ diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.jscsrc b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.jscsrc deleted file mode 100644 index 4b5fa835..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.jscsrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "preset": "google" -} diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.jshintrc b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.jshintrc deleted file mode 100644 index 6ed7cddc..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.jshintrc +++ /dev/null @@ -1,53 +0,0 @@ -{ - "browser": true, - "camelcase": true, - "curly": true, - "devel": true, - "eqeqeq": true, - "forin": false, - "globalstrict": true, - "quotmark": "single", - "undef": true, - "unused": "strict", - "globals": { - "addExplicitTest": true, - "addTest": true, - "arrayAverage": true, - "arrayMax": true, - "arrayMin": true, - "attachMediaStream": true, - "attachMediaStream": true, - "audioContext": true, - "AudioContext": true, - "Call": true, - "createIceServers": true, - "createIceServer": true, - "createLineChart": true, - "define": true, - "doGetUserMedia": true, - "expectEquals": true, - "getUserMedia": true, - "getUserMedia": true, - "ga": true, - "GumHandler": true, - "MediaStreamTrack": true, - "reattachMediaStream": true, - "report": true, - "reportBug": true, - "reportError": true, - "reportFatal": true, - "reportInfo": true, - "reportSuccess": true, - "RTCIceCandidate": true, - "RTCPeerConnection": true, - "RTCSessionDescription": true, - "setTestProgress": true, - "setTimeoutWithProgressBar": true, - "Ssim": true, - "StatisticsAggregate": true, - "testFinished": true, - "trace": true, - "webrtcDetectedBrowser": true, - "webrtcDetectedVersion": true - } -} diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.travis.yml b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.travis.yml deleted file mode 100644 index 2083d9e7..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -sudo: false -language: node_js -node_js: -- 0.10 - -env: - matrix: - - BROWSER=chrome BVER=stable - - BROWSER=chrome BVER=beta - - BROWSER=chrome BVER=unstable - - BROWSER=firefox BVER=stable - - BROWSER=firefox BVER=beta - - BROWSER=firefox BVER=unstable - - BROWSER=firefox BVER=esr - -matrix: - fast_finish: true - - allow_failures: - - env: BROWSER=chrome BVER=unstable - - env: BROWSER=firefox BVER=unstable - -before_script: - - ./node_modules/travis-multirunner/setup.sh - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start - -script: - - node_modules/.bin/grunt - - npm test - -after_failure: - - for file in *.log; do echo $file; echo "======================"; cat $file; done || true - diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/CONTRIBUTING.md b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/CONTRIBUTING.md deleted file mode 100644 index c86d36e4..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/CONTRIBUTING.md +++ /dev/null @@ -1,15 +0,0 @@ -WebRTC welcomes patches/pulls for features and bug fixes. - -For contributors external to Google, follow the instructions given in the [Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual). - -In all cases, contributors must sign a contributor license agreement before a contribution can be accepted. Please complete the agreement for an [individual](https://developers.google.com/open-source/cla/individual) or a [corporation](https://developers.google.com/open-source/cla/corporate) as appropriate. - -If you plan to add a significant component or large chunk of code, we recommend you bring this up on the [webrtc-discuss group](https://groups.google.com/forum/#!forum/discuss-webrtc) for a design discussion before writing code. - -If appropriate, write a unit test which demonstrates that your code functions as expected. Tests are the best way to ensure that future contributors do not break your code accidentally. - -To request a change or addition, you must [submit a pull request](https://help.github.com/categories/collaborating/). - -WebRTC developers monitor outstanding pull requests. They may request changes to the pull request before accepting. They will also verify that a CLA has been signed. - -The [Developer's Guide](https://bit.ly/webrtcdevguide) for this repo has more detailed information about code style, structure and validation. diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/Gruntfile.js b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/Gruntfile.js deleted file mode 100644 index f0a9a606..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/Gruntfile.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -/* For jshint: */ -/* globals module, require */ - -module.exports = function(grunt) { - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - githooks: { - all: { - 'pre-commit': 'jshint jscs' - } - }, - jshint: { - options: { - jshintrc: '.jshintrc' - }, - files: ['adapter.js', 'test/*.js'] - }, - jscs: { - src: ['adapter.js', 'test/*.js'], - options: { - config: '.jscsrc', - 'excludeFiles': [ - ] - } - }, - testling: { - files: 'test/test.js' - } - }); - - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-jscs'); - grunt.loadNpmTasks('grunt-githooks'); - grunt.registerTask('verify-require', 'Verifies the script can be required in a node context', function () { - require('./adapter'); - }); - grunt.registerTask('default', ['jshint', 'jscs', 'verify-require']); -}; diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/LICENSE.md b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/LICENSE.md deleted file mode 100644 index c768cfb8..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/LICENSE.md +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 2014, The WebRTC project authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - * Neither the name of Google nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/README-w3c-tests.md b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/README-w3c-tests.md deleted file mode 100644 index 81e37916..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/README-w3c-tests.md +++ /dev/null @@ -1,14 +0,0 @@ -How to use adapter with W3C tests ---------------------------------- - -If you want to test that the adapter works with the W3C tests, execute -the following (where TESTDIR is the root of the web-platform-tests repo): - -- (cd $TESTDIR; git checkout master; git checkout -b some-unused-branch-name) -- cat adapter.js > $TESTDIR/common/vendor-prefix.js -- Run the tests according to $TESTDIR/README.md - -WebRTC-specific tests are found in "mediacapture-streams" and "webrtc". -With the adapter installed, the tests should run *without* vendor prefixes. - -Note: Not all of the W3C tests are updated to be spec-conformant. diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/README.md b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/README.md deleted file mode 100644 index 1adbbc1f..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/README.md +++ /dev/null @@ -1,65 +0,0 @@ -[![Build Status](https://travis-ci.org/webrtc/adapter.svg)](https://travis-ci.org/webrtc/adapter) - -# WebRTC adapter # -[adapter.js] is a shim to insulate apps from spec changes and prefix differences. In fact, the standards and protocols used for WebRTC implementations are highly stable, and there are only a few prefixed names. For full interop information, see [webrtc.org/web-apis/interop](http://www.webrtc.org/web-apis/interop). - -## Install ## - -#### Bower -```bash -bower install webrtc-adapter -``` - -#### NPM -```bash -npm install webrtc-adapter-test -``` - -## Inclusion on Browser ## - -#### Bower -```html - -``` - -#### NPM -Copy to desired location in your src tree or use a minify/vulcanize tool (node_modules is usually not published with the code). -See [webrtc/samples repo](https://github.com/webrtc/samples/blob/master/package.json) as an example on how you can do this. - -## Development ## -Detailed information on developing in the [webrtc](https://github.com/webrtc) github repo can be found in the [WebRTC GitHub repo developer's guide](https://docs.google.com/document/d/1tn1t6LW2ffzGuYTK3366w1fhTkkzsSvHsBnOHoDfRzY/edit?pli=1#heading=h.e3366rrgmkdk). - -This guide assumes you are running a Debian based Linux distribution (travis-multirunner currently fetches .deb browser packages). - -#### Clone the repo in desired folder -```bash -git clone https://github.com/webrtc/adapter.git -``` - -#### Install npm dependencies -```bash -sudo npm install -``` - -#### Run tests -Runs the tests in test/tests.js using testling. -```bash -npm test -``` - -#### Change browser and channel/version for testing -Chrome stable is currently installed as the default browser for the tests. - -Currently Chrome and Firefox are supported, check [travis-multirunner](https://github.com/DamonOehlman/travis-multirunner/blob/master/) repo for updates around this. -Firefox channels supported are stable, beta and nightly. -Chrome channels supported on Linux are stable, beta and unstable. - -To select a different browser and/or channel version, change environment variables BROWSER and BVER, then you can rerun the tests with the new browser. -```bash -export BROWSER=firefox BVER=nightly -``` - -Alternatively you can also do it without changing environment variables. -```bash -BROWSER=firefox BVER=nightly npm test -``` diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/bower.json b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/bower.json deleted file mode 100644 index 06bc2633..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/bower.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "webrtc-adapter", - "version": "0.2.3", - "description": "A shim to insulate apps from WebRTC spec changes and prefix differences", - "repository": { - "type": "git", - "url": "https://github.com/webrtc/adapter.git" - }, - "authors": [ - "The WebRTC project authors (http://www.webrtc.org/)" - ], - "main": "adapter.js", - "moduleType": [ - "globals" - ], - "ignore": [ - "test/*" - ], - "keywords": [ - "WebRTC", - "PeerConnection", - "RTCPeerConnection", - "getUserMedia", - "Chrome", - "Chromium", - "Firefox" - ], - "license": "BSD-3-Clause" -} diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/package.json b/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/package.json deleted file mode 100644 index 815ac696..00000000 --- a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "webrtc-adapter-test", - "version": "0.2.3", - "description": "Hide browser differences in WebRTC APIs (test package name)", - "license": "BSD-3-Clause", - "main": "adapter.js", - "repository": { - "type": "git", - "url": "https://github.com/webrtc/adapter.git" - }, - "scripts": { - "test": "test/run-tests" - }, - "testling": { - "files": "test/test.js" - }, - "devDependencies": { - "browserify": "^10.2.1", - "grunt": "^0.4.5", - "grunt-cli": ">=0.1.9", - "grunt-contrib-jshint": "^0.11.2", - "grunt-contrib-nodeunit": "~0.4.1", - "grunt-contrib-uglify": "^0.9.1", - "grunt-githooks": "^0.3.1", - "grunt-jscs": "^2.0.0", - "tape": "^4.0.0", - "testling": "^1.7.1", - "travis-multirunner": "^2.6.0" - } -} diff --git a/openvidu-client/pom.xml b/openvidu-client/pom.xml index b0ae6de4..50b8d0f3 100644 --- a/openvidu-client/pom.xml +++ b/openvidu-client/pom.xml @@ -5,7 +5,7 @@ org.openvidu openvidu - 6.6.1-SNAPSHOT + 0.0.1-SNAPSHOT openvidu-client diff --git a/openvidu-demo/pom.xml b/openvidu-demo/pom.xml index 64205024..03449ca5 100644 --- a/openvidu-demo/pom.xml +++ b/openvidu-demo/pom.xml @@ -5,8 +5,9 @@ org.openvidu openvidu - 6.6.1-SNAPSHOT + 0.0.1-SNAPSHOT + openvidu-demo jar @@ -61,7 +62,7 @@ org.openvidu - openvidu-client-js + openvidu-browser org.openvidu diff --git a/openvidu-demo/src/main/resources/static/angular/app.js b/openvidu-demo/src/main/resources/static/angular/app.js index d79e3e47..43a004bb 100644 --- a/openvidu-demo/src/main/resources/static/angular/app.js +++ b/openvidu-demo/src/main/resources/static/angular/app.js @@ -1,6 +1,6 @@ -var kurento_room = angular.module('kurento_room', ['ngRoute', 'FBAngular', 'lumx', 'angular-clipboard']); +var openVidu_room = angular.module('openVidu_room', ['ngRoute', 'FBAngular', 'lumx', 'angular-clipboard']); -kurento_room.config(['$routeProvider', function ($routeProvider) { +openVidu_room.config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/', { templateUrl: 'angular/login/login.html', diff --git a/openvidu-demo/src/main/resources/static/angular/call/callController.js b/openvidu-demo/src/main/resources/static/angular/call/callController.js index 497d7741..f0931805 100644 --- a/openvidu-demo/src/main/resources/static/angular/call/callController.js +++ b/openvidu-demo/src/main/resources/static/angular/call/callController.js @@ -3,17 +3,17 @@ * @author Raquel Díaz González */ -kurento_room.controller('callController', function ($scope, $window, ServiceParticipant, ServiceRoom, Fullscreen, LxNotificationService) { +openVidu_room.controller('callController', function ($scope, $window, ServiceParticipant, ServiceRoom, Fullscreen, LxNotificationService) { $scope.roomName = ServiceRoom.getRoomName(); $scope.userName = ServiceRoom.getUserName(); $scope.participants = ServiceParticipant.getParticipants(); - $scope.kurento = ServiceRoom.getKurento(); + $scope.openVidu = ServiceRoom.getOpenVidu(); $scope.filter = ServiceRoom.getFilterRequestParam(); $scope.leaveRoom = function () { - ServiceRoom.closeKurento(); + ServiceRoom.closeOpenVidu(); ServiceParticipant.removeParticipants(); @@ -24,14 +24,14 @@ kurento_room.controller('callController', function ($scope, $window, ServicePart window.onbeforeunload = function () { //not necessary if not connected if (ServiceParticipant.isConnected()) { - ServiceRoom.closeKurento(); + ServiceRoom.closeOpenVidu(); } }; $scope.$on("$locationChangeStart", function () { console.log("Changed location to: " + document.location); if (ServiceParticipant.isConnected()) { - ServiceRoom.closeKurento(); + ServiceRoom.closeOpenVidu(); ServiceParticipant.removeParticipants(); } }); @@ -97,7 +97,7 @@ kurento_room.controller('callController', function ($scope, $window, ServicePart return false; } ServiceParticipant.disconnectParticipant(participant); - ServiceRoom.getKurento().disconnectParticipant(participant.getStream()); + ServiceRoom.getOpenVidu().disconnectParticipant(participant.getStream()); } //chat @@ -105,8 +105,8 @@ kurento_room.controller('callController', function ($scope, $window, ServicePart $scope.sendMessage = function () { console.log("Sending message", $scope.message); - var kurento = ServiceRoom.getKurento(); - kurento.sendMessage($scope.roomName, $scope.userName, $scope.message); + var openVidu = ServiceRoom.getOpenVidu(); + openVidu.sendMessage($scope.roomName, $scope.userName, $scope.message); $scope.message = ""; }; @@ -160,7 +160,7 @@ kurento_room.controller('callController', function ($scope, $window, ServicePart } } - ServiceRoom.getKurento().sendCustomRequest(reqParams, function (error, response) { + ServiceRoom.getOpenVidu().sendCustomRequest(reqParams, function (error, response) { if (error) { console.error("Unable to toggle filter, currently " + $scope.filterState, error); diff --git a/openvidu-demo/src/main/resources/static/angular/login/loginController.js b/openvidu-demo/src/main/resources/static/angular/login/loginController.js index dedaa709..fad4fd57 100644 --- a/openvidu-demo/src/main/resources/static/angular/login/loginController.js +++ b/openvidu-demo/src/main/resources/static/angular/login/loginController.js @@ -3,7 +3,7 @@ * @author Radu Tom Vlad */ -kurento_room.controller('loginController', function($scope, $rootScope, $http, +openVidu_room.controller('loginController', function($scope, $rootScope, $http, $window, $routeParams, ServiceParticipant, ServiceRoom, LxNotificationService) { $scope.existingRoomName = false; @@ -68,23 +68,23 @@ kurento_room.controller('loginController', function($scope, $rootScope, $http, //also show local stream when display my remote var mirrorLocal = $scope.clientConfig.loopbackAndLocal || false; - var kurento = KurentoRoom(wsUri, function(error, kurento) { + var openVidu = OpenVidu(wsUri, function(error, openVidu) { if (error) { - return console.error('Error in KurentoRoom client', error); + return console.error('Error in OpenVidu client', error); } //TODO token should be generated by the server or a 3rd-party component - //kurento.setRpcParams({token : "securityToken"}); + //openVidu.setRpcParams({token : "securityToken"}); - room = kurento.Room({ + room = openVidu.Room({ room: $scope.roomName, user: $scope.userName, updateSpeakerInterval: $scope.updateSpeakerInterval, thresholdSpeaker: $scope.thresholdSpeaker }); - var localStream = kurento.Stream(room, { + var localStream = openVidu.Stream(room, { audio: true, video: true, data: false @@ -106,7 +106,7 @@ kurento_room.controller('loginController', function($scope, $rootScope, $http, room.addEventListener("stream-published", function(streamEvent) { ServiceParticipant.addLocalParticipant(localStream); if (mirrorLocal && localStream.displayMyRemote()) { - var localVideo = kurento.Stream(room, { + var localVideo = openVidu.Stream(room, { video: true, id: "localStream" }); @@ -135,7 +135,7 @@ kurento_room.controller('loginController', function($scope, $rootScope, $http, ServiceParticipant.alertMediaError($window, LxNotificationService, msg.error, contextPath, function(answer) { console.warn("Leave room because of error: " + answer); if (answer) { - kurento.close(true); + openVidu.close(true); } }); }); @@ -145,14 +145,14 @@ kurento_room.controller('loginController', function($scope, $rootScope, $http, console.error("Closed room name doesn't match this room's name", msg.room, $scope.roomName); } else { - kurento.close(true); + openVidu.close(true); ServiceParticipant.forceClose($window, LxNotificationService, 'Room ' + msg.room + ' has been forcibly closed from server', contextpath); } }); room.addEventListener("lost-connection", function(msg) { - kurento.close(true); + openVidu.close(true); ServiceParticipant.forceClose($window, LxNotificationService, 'Lost connection with room "' + msg.room + '". Please try reloading the webpage...'); @@ -189,8 +189,8 @@ kurento_room.controller('loginController', function($scope, $rootScope, $http, localStream.init(); }); - //save kurento & roomName & userName in service - ServiceRoom.setKurento(kurento); + //save openVidu & roomName & userName in service + ServiceRoom.setOpenVidu(openVidu); ServiceRoom.setRoomName($scope.roomName); ServiceRoom.setUserName($scope.userName); ServiceRoom.setFilterRequestParam($scope.clientConfig.filterRequestParam); diff --git a/openvidu-demo/src/main/resources/static/angular/services/Participants.js b/openvidu-demo/src/main/resources/static/angular/services/Participants.js index d4d1e7a0..d4738bc1 100644 --- a/openvidu-demo/src/main/resources/static/angular/services/Participants.js +++ b/openvidu-demo/src/main/resources/static/angular/services/Participants.js @@ -1,5 +1,5 @@ /* - * (C) Copyright 2016 Kurento (http://kurento.org/) + * (C) Copyright 2016 OpenVidu (http://openVidu.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -362,7 +362,7 @@ function Participants() { }; function relogin($window, contextPath) { - //TODO call leaveRoom() in kurento + //TODO call leaveRoom() in openVidu contextPath = contextPath || '/'; $window.location.href = contextPath; //'#/login'; } diff --git a/openvidu-demo/src/main/resources/static/angular/services/serviceParticipant.js b/openvidu-demo/src/main/resources/static/angular/services/serviceParticipant.js index 8545fdbe..025915d8 100644 --- a/openvidu-demo/src/main/resources/static/angular/services/serviceParticipant.js +++ b/openvidu-demo/src/main/resources/static/angular/services/serviceParticipant.js @@ -2,7 +2,7 @@ * @author Raquel Díaz González */ -kurento_room.factory('ServiceParticipant', function () { +openVidu_room.factory('ServiceParticipant', function () { return new Participants(); diff --git a/openvidu-demo/src/main/resources/static/angular/services/serviceRoom.js b/openvidu-demo/src/main/resources/static/angular/services/serviceRoom.js index a0a6599b..64590808 100644 --- a/openvidu-demo/src/main/resources/static/angular/services/serviceRoom.js +++ b/openvidu-demo/src/main/resources/static/angular/services/serviceRoom.js @@ -2,24 +2,24 @@ * @author Raquel Díaz González */ -kurento_room.service('ServiceRoom', function () { +openVidu_room.service('ServiceRoom', function () { - var kurento; + var openVidu; var roomName; var userName; var localStream; var filterRequestParam; - this.getKurento = function () { - return kurento; + this.getOpenVidu = function () { + return openVidu; }; this.getRoomName = function () { return roomName; }; - this.setKurento = function (value) { - kurento = value; + this.setOpenVidu = function (value) { + openVidu = value; }; this.setRoomName = function (value) { @@ -42,11 +42,11 @@ kurento_room.service('ServiceRoom', function () { userName = value; }; - this.closeKurento = function () { - if (kurento && kurento instanceof KurentoRoom) { - kurento.close(); + this.closeOpenVidu = function () { + if (openVidu && openVidu instanceof OpenVidu) { + openVidu.close(); } else { - console.log('KurentoRoom instance is not set'); + console.log('OpenVidu instance is not set'); } }; diff --git a/openvidu-demo/src/main/resources/static/index.html b/openvidu-demo/src/main/resources/static/index.html index 465c4f60..5da4835f 100644 --- a/openvidu-demo/src/main/resources/static/index.html +++ b/openvidu-demo/src/main/resources/static/index.html @@ -34,7 +34,7 @@ - + @@ -45,7 +45,7 @@ - +
diff --git a/openvidu-sampleapp-minimal/.classpath b/openvidu-sampleapp-minimal/.classpath deleted file mode 100644 index fae1a2b3..00000000 --- a/openvidu-sampleapp-minimal/.classpath +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/openvidu-sampleapp-minimal/.project b/openvidu-sampleapp-minimal/.project deleted file mode 100644 index 7a152f8c..00000000 --- a/openvidu-sampleapp-minimal/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - openvidu-sampleapp-minimal - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/openvidu-sampleapp-minimal/.settings/org.eclipse.core.resources.prefs b/openvidu-sampleapp-minimal/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 29abf999..00000000 --- a/openvidu-sampleapp-minimal/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,6 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding//src/main/resources=UTF-8 -encoding//src/test/java=UTF-8 -encoding//src/test/resources=UTF-8 -encoding/=UTF-8 diff --git a/openvidu-sampleapp-minimal/.settings/org.eclipse.jdt.core.prefs b/openvidu-sampleapp-minimal/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351ae..00000000 --- a/openvidu-sampleapp-minimal/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/openvidu-sampleapp-minimal/.settings/org.eclipse.m2e.core.prefs b/openvidu-sampleapp-minimal/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1..00000000 --- a/openvidu-sampleapp-minimal/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/openvidu-sampleapp-minimal/src/main/resources/static/js/adapter.js b/openvidu-sampleapp-minimal/src/main/resources/static/js/adapter.js deleted file mode 100644 index d9d5e708..00000000 --- a/openvidu-sampleapp-minimal/src/main/resources/static/js/adapter.js +++ /dev/null @@ -1,536 +0,0 @@ -/* - * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ - -/* More information about these options at jshint.com/docs/options */ -/* jshint browser: true, camelcase: true, curly: true, devel: true, - eqeqeq: true, forin: false, globalstrict: true, node: true, - quotmark: single, undef: true, unused: strict */ -/* global mozRTCIceCandidate, mozRTCPeerConnection, Promise, -mozRTCSessionDescription, webkitRTCPeerConnection, MediaStreamTrack */ -/* exported trace,requestUserMedia */ - -'use strict'; - -var getUserMedia = null; -var attachMediaStream = null; -var reattachMediaStream = null; -var webrtcDetectedBrowser = null; -var webrtcDetectedVersion = null; -var webrtcMinimumVersion = null; -var webrtcUtils = { - log: function() { - // suppress console.log output when being included as a module. - if (typeof module !== 'undefined' || - typeof require === 'function' && typeof define === 'function') { - return; - } - console.log.apply(console, arguments); - } -}; - -function trace(text) { - // This function is used for logging. - if (text[text.length - 1] === '\n') { - text = text.substring(0, text.length - 1); - } - if (window.performance) { - var now = (window.performance.now() / 1000).toFixed(3); - webrtcUtils.log(now + ': ' + text); - } else { - webrtcUtils.log(text); - } -} - -if (typeof window === 'object') { - if (window.HTMLMediaElement && - !('srcObject' in window.HTMLMediaElement.prototype)) { - // Shim the srcObject property, once, when HTMLMediaElement is found. - Object.defineProperty(window.HTMLMediaElement.prototype, 'srcObject', { - get: function() { - // If prefixed srcObject property exists, return it. - // Otherwise use the shimmed property, _srcObject - return 'mozSrcObject' in this ? this.mozSrcObject : this._srcObject; - }, - set: function(stream) { - if ('mozSrcObject' in this) { - this.mozSrcObject = stream; - } else { - // Use _srcObject as a private property for this shim - this._srcObject = stream; - // TODO: revokeObjectUrl(this.src) when !stream to release resources? - this.src = URL.createObjectURL(stream); - } - } - }); - } - // Proxy existing globals - getUserMedia = window.navigator && window.navigator.getUserMedia; -} - -// Attach a media stream to an element. -attachMediaStream = function(element, stream) { - element.srcObject = stream; -}; - -reattachMediaStream = function(to, from) { - to.srcObject = from.srcObject; -}; - -if (typeof window === 'undefined' || !window.navigator) { - webrtcUtils.log('This does not appear to be a browser'); - webrtcDetectedBrowser = 'not a browser'; -} else if (navigator.mozGetUserMedia && window.mozRTCPeerConnection) { - webrtcUtils.log('This appears to be Firefox'); - - webrtcDetectedBrowser = 'firefox'; - - // the detected firefox version. - webrtcDetectedVersion = - parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10); - - // the minimum firefox version still supported by adapter. - webrtcMinimumVersion = 31; - - // The RTCPeerConnection object. - window.RTCPeerConnection = function(pcConfig, pcConstraints) { - if (webrtcDetectedVersion < 38) { - // .urls is not supported in FF < 38. - // create RTCIceServers with a single url. - if (pcConfig && pcConfig.iceServers) { - var newIceServers = []; - for (var i = 0; i < pcConfig.iceServers.length; i++) { - var server = pcConfig.iceServers[i]; - if (server.hasOwnProperty('urls')) { - for (var j = 0; j < server.urls.length; j++) { - var newServer = { - url: server.urls[j] - }; - if (server.urls[j].indexOf('turn') === 0) { - newServer.username = server.username; - newServer.credential = server.credential; - } - newIceServers.push(newServer); - } - } else { - newIceServers.push(pcConfig.iceServers[i]); - } - } - pcConfig.iceServers = newIceServers; - } - } - return new mozRTCPeerConnection(pcConfig, pcConstraints); // jscs:ignore requireCapitalizedConstructors - }; - - // The RTCSessionDescription object. - window.RTCSessionDescription = mozRTCSessionDescription; - - // The RTCIceCandidate object. - window.RTCIceCandidate = mozRTCIceCandidate; - - // getUserMedia constraints shim. - getUserMedia = function(constraints, onSuccess, onError) { - var constraintsToFF37 = function(c) { - if (typeof c !== 'object' || c.require) { - return c; - } - var require = []; - Object.keys(c).forEach(function(key) { - if (key === 'require' || key === 'advanced' || key === 'mediaSource') { - return; - } - var r = c[key] = (typeof c[key] === 'object') ? - c[key] : {ideal: c[key]}; - if (r.min !== undefined || - r.max !== undefined || r.exact !== undefined) { - require.push(key); - } - if (r.exact !== undefined) { - if (typeof r.exact === 'number') { - r.min = r.max = r.exact; - } else { - c[key] = r.exact; - } - delete r.exact; - } - if (r.ideal !== undefined) { - c.advanced = c.advanced || []; - var oc = {}; - if (typeof r.ideal === 'number') { - oc[key] = {min: r.ideal, max: r.ideal}; - } else { - oc[key] = r.ideal; - } - c.advanced.push(oc); - delete r.ideal; - if (!Object.keys(r).length) { - delete c[key]; - } - } - }); - if (require.length) { - c.require = require; - } - return c; - }; - if (webrtcDetectedVersion < 38) { - webrtcUtils.log('spec: ' + JSON.stringify(constraints)); - if (constraints.audio) { - constraints.audio = constraintsToFF37(constraints.audio); - } - if (constraints.video) { - constraints.video = constraintsToFF37(constraints.video); - } - webrtcUtils.log('ff37: ' + JSON.stringify(constraints)); - } - return navigator.mozGetUserMedia(constraints, onSuccess, onError); - }; - - navigator.getUserMedia = getUserMedia; - - // Shim for mediaDevices on older versions. - if (!navigator.mediaDevices) { - navigator.mediaDevices = {getUserMedia: requestUserMedia, - addEventListener: function() { }, - removeEventListener: function() { } - }; - } - navigator.mediaDevices.enumerateDevices = - navigator.mediaDevices.enumerateDevices || function() { - return new Promise(function(resolve) { - var infos = [ - {kind: 'audioinput', deviceId: 'default', label: '', groupId: ''}, - {kind: 'videoinput', deviceId: 'default', label: '', groupId: ''} - ]; - resolve(infos); - }); - }; - - if (webrtcDetectedVersion < 41) { - // Work around http://bugzil.la/1169665 - var orgEnumerateDevices = - navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices); - navigator.mediaDevices.enumerateDevices = function() { - return orgEnumerateDevices().catch(function(e) { - if (e.name === 'NotFoundError') { - return []; - } - throw e; - }); - }; - } -} else if (navigator.webkitGetUserMedia && !!window.chrome) { - webrtcUtils.log('This appears to be Chrome'); - - webrtcDetectedBrowser = 'chrome'; - - // the detected chrome version. - webrtcDetectedVersion = - parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10); - - // the minimum chrome version still supported by adapter. - webrtcMinimumVersion = 38; - - // The RTCPeerConnection object. - window.RTCPeerConnection = function(pcConfig, pcConstraints) { - // Translate iceTransportPolicy to iceTransports, - // see https://code.google.com/p/webrtc/issues/detail?id=4869 - if (pcConfig && pcConfig.iceTransportPolicy) { - pcConfig.iceTransports = pcConfig.iceTransportPolicy; - } - - var pc = new webkitRTCPeerConnection(pcConfig, pcConstraints); // jscs:ignore requireCapitalizedConstructors - var origGetStats = pc.getStats.bind(pc); - pc.getStats = function(selector, successCallback, errorCallback) { // jshint ignore: line - var self = this; - var args = arguments; - - // If selector is a function then we are in the old style stats so just - // pass back the original getStats format to avoid breaking old users. - if (arguments.length > 0 && typeof selector === 'function') { - return origGetStats(selector, successCallback); - } - - var fixChromeStats = function(response) { - var standardReport = {}; - var reports = response.result(); - reports.forEach(function(report) { - var standardStats = { - id: report.id, - timestamp: report.timestamp, - type: report.type - }; - report.names().forEach(function(name) { - standardStats[name] = report.stat(name); - }); - standardReport[standardStats.id] = standardStats; - }); - - return standardReport; - }; - - if (arguments.length >= 2) { - var successCallbackWrapper = function(response) { - args[1](fixChromeStats(response)); - }; - - return origGetStats.apply(this, [successCallbackWrapper, arguments[0]]); - } - - // promise-support - return new Promise(function(resolve, reject) { - if (args.length === 1 && selector === null) { - origGetStats.apply(self, [ - function(response) { - resolve.apply(null, [fixChromeStats(response)]); - }, reject]); - } else { - origGetStats.apply(self, [resolve, reject]); - } - }); - }; - - return pc; - }; - - // add promise support - ['createOffer', 'createAnswer'].forEach(function(method) { - var nativeMethod = webkitRTCPeerConnection.prototype[method]; - webkitRTCPeerConnection.prototype[method] = function() { - var self = this; - if (arguments.length < 1 || (arguments.length === 1 && - typeof(arguments[0]) === 'object')) { - var opts = arguments.length === 1 ? arguments[0] : undefined; - return new Promise(function(resolve, reject) { - nativeMethod.apply(self, [resolve, reject, opts]); - }); - } else { - return nativeMethod.apply(this, arguments); - } - }; - }); - - ['setLocalDescription', 'setRemoteDescription', - 'addIceCandidate'].forEach(function(method) { - var nativeMethod = webkitRTCPeerConnection.prototype[method]; - webkitRTCPeerConnection.prototype[method] = function() { - var args = arguments; - var self = this; - return new Promise(function(resolve, reject) { - nativeMethod.apply(self, [args[0], - function() { - resolve(); - if (args.length >= 2) { - args[1].apply(null, []); - } - }, - function(err) { - reject(err); - if (args.length >= 3) { - args[2].apply(null, [err]); - } - }] - ); - }); - }; - }); - - // getUserMedia constraints shim. - var constraintsToChrome = function(c) { - if (typeof c !== 'object' || c.mandatory || c.optional) { - return c; - } - var cc = {}; - Object.keys(c).forEach(function(key) { - if (key === 'require' || key === 'advanced' || key === 'mediaSource') { - return; - } - var r = (typeof c[key] === 'object') ? c[key] : {ideal: c[key]}; - if (r.exact !== undefined && typeof r.exact === 'number') { - r.min = r.max = r.exact; - } - var oldname = function(prefix, name) { - if (prefix) { - return prefix + name.charAt(0).toUpperCase() + name.slice(1); - } - return (name === 'deviceId') ? 'sourceId' : name; - }; - if (r.ideal !== undefined) { - cc.optional = cc.optional || []; - var oc = {}; - if (typeof r.ideal === 'number') { - oc[oldname('min', key)] = r.ideal; - cc.optional.push(oc); - oc = {}; - oc[oldname('max', key)] = r.ideal; - cc.optional.push(oc); - } else { - oc[oldname('', key)] = r.ideal; - cc.optional.push(oc); - } - } - if (r.exact !== undefined && typeof r.exact !== 'number') { - cc.mandatory = cc.mandatory || {}; - cc.mandatory[oldname('', key)] = r.exact; - } else { - ['min', 'max'].forEach(function(mix) { - if (r[mix] !== undefined) { - cc.mandatory = cc.mandatory || {}; - cc.mandatory[oldname(mix, key)] = r[mix]; - } - }); - } - }); - if (c.advanced) { - cc.optional = (cc.optional || []).concat(c.advanced); - } - return cc; - }; - - getUserMedia = function(constraints, onSuccess, onError) { - if (constraints.audio) { - constraints.audio = constraintsToChrome(constraints.audio); - } - if (constraints.video) { - constraints.video = constraintsToChrome(constraints.video); - } - webrtcUtils.log('chrome: ' + JSON.stringify(constraints)); - return navigator.webkitGetUserMedia(constraints, onSuccess, onError); - }; - navigator.getUserMedia = getUserMedia; - - if (!navigator.mediaDevices) { - navigator.mediaDevices = {getUserMedia: requestUserMedia, - enumerateDevices: function() { - return new Promise(function(resolve) { - var kinds = {audio: 'audioinput', video: 'videoinput'}; - return MediaStreamTrack.getSources(function(devices) { - resolve(devices.map(function(device) { - return {label: device.label, - kind: kinds[device.kind], - deviceId: device.id, - groupId: ''}; - })); - }); - }); - }}; - } - - // A shim for getUserMedia method on the mediaDevices object. - // TODO(KaptenJansson) remove once implemented in Chrome stable. - if (!navigator.mediaDevices.getUserMedia) { - navigator.mediaDevices.getUserMedia = function(constraints) { - return requestUserMedia(constraints); - }; - } else { - // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia - // function which returns a Promise, it does not accept spec-style - // constraints. - var origGetUserMedia = navigator.mediaDevices.getUserMedia. - bind(navigator.mediaDevices); - navigator.mediaDevices.getUserMedia = function(c) { - webrtcUtils.log('spec: ' + JSON.stringify(c)); // whitespace for alignment - c.audio = constraintsToChrome(c.audio); - c.video = constraintsToChrome(c.video); - webrtcUtils.log('chrome: ' + JSON.stringify(c)); - return origGetUserMedia(c); - }; - } - - // Dummy devicechange event methods. - // TODO(KaptenJansson) remove once implemented in Chrome stable. - if (typeof navigator.mediaDevices.addEventListener === 'undefined') { - navigator.mediaDevices.addEventListener = function() { - webrtcUtils.log('Dummy mediaDevices.addEventListener called.'); - }; - } - if (typeof navigator.mediaDevices.removeEventListener === 'undefined') { - navigator.mediaDevices.removeEventListener = function() { - webrtcUtils.log('Dummy mediaDevices.removeEventListener called.'); - }; - } - - // Attach a media stream to an element. - attachMediaStream = function(element, stream) { - if (webrtcDetectedVersion >= 43) { - element.srcObject = stream; - } else if (typeof element.src !== 'undefined') { - element.src = URL.createObjectURL(stream); - } else { - webrtcUtils.log('Error attaching stream to element.'); - } - }; - reattachMediaStream = function(to, from) { - if (webrtcDetectedVersion >= 43) { - to.srcObject = from.srcObject; - } else { - to.src = from.src; - } - }; - -} else if (navigator.mediaDevices && navigator.userAgent.match( - /Edge\/(\d+).(\d+)$/)) { - webrtcUtils.log('This appears to be Edge'); - webrtcDetectedBrowser = 'edge'; - - webrtcDetectedVersion = - parseInt(navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)[2], 10); - - // the minimum version still supported by adapter. - webrtcMinimumVersion = 12; -} else { - webrtcUtils.log('Browser does not appear to be WebRTC-capable'); -} - -// Returns the result of getUserMedia as a Promise. -function requestUserMedia(constraints) { - return new Promise(function(resolve, reject) { - getUserMedia(constraints, resolve, reject); - }); -} - -var webrtcTesting = {}; -Object.defineProperty(webrtcTesting, 'version', { - set: function(version) { - webrtcDetectedVersion = version; - } -}); - -if (typeof module !== 'undefined') { - var RTCPeerConnection; - if (typeof window !== 'undefined') { - RTCPeerConnection = window.RTCPeerConnection; - } - module.exports = { - RTCPeerConnection: RTCPeerConnection, - getUserMedia: getUserMedia, - attachMediaStream: attachMediaStream, - reattachMediaStream: reattachMediaStream, - webrtcDetectedBrowser: webrtcDetectedBrowser, - webrtcDetectedVersion: webrtcDetectedVersion, - webrtcMinimumVersion: webrtcMinimumVersion, - webrtcTesting: webrtcTesting - //requestUserMedia: not exposed on purpose. - //trace: not exposed on purpose. - }; -} else if ((typeof require === 'function') && (typeof define === 'function')) { - // Expose objects and functions when RequireJS is doing the loading. - define([], function() { - return { - RTCPeerConnection: window.RTCPeerConnection, - getUserMedia: getUserMedia, - attachMediaStream: attachMediaStream, - reattachMediaStream: reattachMediaStream, - webrtcDetectedBrowser: webrtcDetectedBrowser, - webrtcDetectedVersion: webrtcDetectedVersion, - webrtcMinimumVersion: webrtcMinimumVersion, - webrtcTesting: webrtcTesting - //requestUserMedia: not exposed on purpose. - //trace: not exposed on purpose. - }; - }); -} diff --git a/openvidu-server/pom.xml b/openvidu-server/pom.xml index 7f3a0e38..7425c7a2 100644 --- a/openvidu-server/pom.xml +++ b/openvidu-server/pom.xml @@ -5,7 +5,7 @@ org.openvidu openvidu - 6.6.1-SNAPSHOT + 0.0.1-SNAPSHOT openvidu-server diff --git a/openvidu-test/pom.xml b/openvidu-test/pom.xml index 96fdf106..79cf7786 100644 --- a/openvidu-test/pom.xml +++ b/openvidu-test/pom.xml @@ -5,7 +5,7 @@ org.openvidu openvidu - 6.6.1-SNAPSHOT + 0.0.1-SNAPSHOT openvidu-test diff --git a/openvidu-sampleapp-minimal/.gitignore b/openvidu-testapp/.gitignore similarity index 100% rename from openvidu-sampleapp-minimal/.gitignore rename to openvidu-testapp/.gitignore diff --git a/openvidu-sampleapp-minimal/LICENSE b/openvidu-testapp/LICENSE similarity index 100% rename from openvidu-sampleapp-minimal/LICENSE rename to openvidu-testapp/LICENSE diff --git a/openvidu-sampleapp-minimal/NOTICE b/openvidu-testapp/NOTICE similarity index 100% rename from openvidu-sampleapp-minimal/NOTICE rename to openvidu-testapp/NOTICE diff --git a/openvidu-sampleapp-minimal/README.md b/openvidu-testapp/README.md similarity index 100% rename from openvidu-sampleapp-minimal/README.md rename to openvidu-testapp/README.md diff --git a/openvidu-sampleapp-minimal/pom.xml b/openvidu-testapp/pom.xml similarity index 95% rename from openvidu-sampleapp-minimal/pom.xml rename to openvidu-testapp/pom.xml index 71df52f3..de88981c 100644 --- a/openvidu-sampleapp-minimal/pom.xml +++ b/openvidu-testapp/pom.xml @@ -5,10 +5,11 @@ org.openvidu openvidu - 6.6.1-SNAPSHOT + 0.0.1-SNAPSHOT ../ - openvidu-sampleapp-minimal + + openvidu-testapp jar OpenVidu Sample App "Minimal" @@ -202,7 +203,7 @@
org.openvidu - openvidu-client-js + openvidu-browser org.springframework.boot @@ -213,6 +214,11 @@ openvidu-test test + + org.webjars.bower + system.js + 0.19.17 + diff --git a/openvidu-sampleapp-minimal/src/assembly/bin.xml b/openvidu-testapp/src/assembly/bin.xml similarity index 100% rename from openvidu-sampleapp-minimal/src/assembly/bin.xml rename to openvidu-testapp/src/assembly/bin.xml diff --git a/openvidu-sampleapp-minimal/src/main/java/org/openvidu/sampleapp/minimal/OpenViduSampleApp.java b/openvidu-testapp/src/main/java/org/openvidu/testapp/OpenViduTestApp.java similarity index 90% rename from openvidu-sampleapp-minimal/src/main/java/org/openvidu/sampleapp/minimal/OpenViduSampleApp.java rename to openvidu-testapp/src/main/java/org/openvidu/testapp/OpenViduTestApp.java index 110ee2c6..51153a06 100644 --- a/openvidu-sampleapp-minimal/src/main/java/org/openvidu/sampleapp/minimal/OpenViduSampleApp.java +++ b/openvidu-testapp/src/main/java/org/openvidu/testapp/OpenViduTestApp.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.openvidu.sampleapp.minimal; +package org.openvidu.testapp; import org.kurento.commons.ConfigFileManager; import org.openvidu.server.OpenViduServer; @@ -28,7 +28,7 @@ import org.springframework.context.annotation.Import; * @since 5.0.0 */ @Import(OpenViduServer.class) -public class OpenViduSampleApp { +public class OpenViduTestApp { private final static String BASICAPP_CFG_FILENAME = "kroombasic.conf.json"; @@ -37,6 +37,6 @@ public class OpenViduSampleApp { } public static void main(String[] args) { - SpringApplication.run(OpenViduSampleApp.class, args); + SpringApplication.run(OpenViduTestApp.class, args); } } diff --git a/openvidu-sampleapp-minimal/src/main/resources/application.properties b/openvidu-testapp/src/main/resources/application.properties similarity index 100% rename from openvidu-sampleapp-minimal/src/main/resources/application.properties rename to openvidu-testapp/src/main/resources/application.properties diff --git a/openvidu-sampleapp-minimal/src/main/resources/banner.txt b/openvidu-testapp/src/main/resources/banner.txt similarity index 100% rename from openvidu-sampleapp-minimal/src/main/resources/banner.txt rename to openvidu-testapp/src/main/resources/banner.txt diff --git a/openvidu-sampleapp-minimal/src/main/resources/keystore.jks b/openvidu-testapp/src/main/resources/keystore.jks similarity index 100% rename from openvidu-sampleapp-minimal/src/main/resources/keystore.jks rename to openvidu-testapp/src/main/resources/keystore.jks diff --git a/openvidu-sampleapp-minimal/src/main/resources/kroombasic.conf.json b/openvidu-testapp/src/main/resources/kroombasic.conf.json similarity index 100% rename from openvidu-sampleapp-minimal/src/main/resources/kroombasic.conf.json rename to openvidu-testapp/src/main/resources/kroombasic.conf.json diff --git a/openvidu-sampleapp-minimal/src/main/resources/log4j.properties b/openvidu-testapp/src/main/resources/log4j.properties similarity index 100% rename from openvidu-sampleapp-minimal/src/main/resources/log4j.properties rename to openvidu-testapp/src/main/resources/log4j.properties diff --git a/openvidu-sampleapp-minimal/src/main/resources/static/index.html b/openvidu-testapp/src/main/resources/static/index.html similarity index 83% rename from openvidu-sampleapp-minimal/src/main/resources/static/index.html rename to openvidu-testapp/src/main/resources/static/index.html index eef0c61a..c074d2f0 100644 --- a/openvidu-sampleapp-minimal/src/main/resources/static/index.html +++ b/openvidu-testapp/src/main/resources/static/index.html @@ -11,11 +11,16 @@ - - + + + + +
diff --git a/openvidu-sampleapp-minimal/src/main/resources/static/js/EventEmitter.js b/openvidu-testapp/src/main/resources/static/js/EventEmitter.js similarity index 100% rename from openvidu-sampleapp-minimal/src/main/resources/static/js/EventEmitter.js rename to openvidu-testapp/src/main/resources/static/js/EventEmitter.js diff --git a/openvidu-client-js/src/main/resources/static/bower_components/adapter.js/adapter.js b/openvidu-testapp/src/main/resources/static/js/adapter.js similarity index 100% rename from openvidu-client-js/src/main/resources/static/bower_components/adapter.js/adapter.js rename to openvidu-testapp/src/main/resources/static/js/adapter.js diff --git a/openvidu-sampleapp-minimal/src/main/resources/static/js/color.js b/openvidu-testapp/src/main/resources/static/js/color.js similarity index 97% rename from openvidu-sampleapp-minimal/src/main/resources/static/js/color.js rename to openvidu-testapp/src/main/resources/static/js/color.js index 1c8285e0..30f2bb53 100644 --- a/openvidu-sampleapp-minimal/src/main/resources/static/js/color.js +++ b/openvidu-testapp/src/main/resources/static/js/color.js @@ -1,5 +1,5 @@ /* - * (C) Copyright 2016 Kurento (http://kurento.org/) + * (C) Copyright 2016 OpenVidu (http://kurento.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/openvidu-sampleapp-minimal/src/main/resources/static/js/console.js b/openvidu-testapp/src/main/resources/static/js/console.js similarity index 95% rename from openvidu-sampleapp-minimal/src/main/resources/static/js/console.js rename to openvidu-testapp/src/main/resources/static/js/console.js index c109e251..e9d45cdb 100644 --- a/openvidu-sampleapp-minimal/src/main/resources/static/js/console.js +++ b/openvidu-testapp/src/main/resources/static/js/console.js @@ -1,5 +1,5 @@ /* - * (C) Copyright 2013 Kurento (http://kurento.org/) + * (C) Copyright 2013 OpenVidu (http://kurento.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -88,6 +88,6 @@ function Console(id, console) { */ this.debug = function(msg) { console.log(msg); - // this._append(createMessage(msg, "#0000FF")); + this._append(createMessage(msg, "#0000FF")); }; } diff --git a/openvidu-sampleapp-minimal/src/main/resources/static/js/jquery-2.1.1.min.js b/openvidu-testapp/src/main/resources/static/js/jquery-2.1.1.min.js similarity index 100% rename from openvidu-sampleapp-minimal/src/main/resources/static/js/jquery-2.1.1.min.js rename to openvidu-testapp/src/main/resources/static/js/jquery-2.1.1.min.js diff --git a/openvidu-sampleapp-minimal/src/main/resources/static/js/kurento-jsonrpc.js b/openvidu-testapp/src/main/resources/static/js/kurento-jsonrpc.js similarity index 99% rename from openvidu-sampleapp-minimal/src/main/resources/static/js/kurento-jsonrpc.js rename to openvidu-testapp/src/main/resources/static/js/kurento-jsonrpc.js index 090907f5..38a3a6f9 100644 --- a/openvidu-sampleapp-minimal/src/main/resources/static/js/kurento-jsonrpc.js +++ b/openvidu-testapp/src/main/resources/static/js/kurento-jsonrpc.js @@ -1,5 +1,5 @@ /* - * (C) Copyright 2016 Kurento (http://kurento.org/) + * (C) Copyright 2016 OpenVidu (http://kurento.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,7 +82,7 @@ module.exports = Mapper; },{}],2:[function(_dereq_,module,exports){ /* - * (C) Copyright 2014 Kurento (http://kurento.org/) + * (C) Copyright 2014 OpenVidu (http://kurento.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -105,7 +105,7 @@ exports.JsonRpcClient = JsonRpcClient; },{"./jsonrpcclient":3}],3:[function(_dereq_,module,exports){ /* - * (C) Copyright 2014 Kurento (http://kurento.org/) + * (C) Copyright 2014 OpenVidu (http://kurento.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -142,7 +142,7 @@ module.exports = JsonRpcClient; },{"../..":4,"ws":10}],4:[function(_dereq_,module,exports){ /* - * (C) Copyright 2014 Kurento (http://kurento.org/) + * (C) Copyright 2014 OpenVidu (http://kurento.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/openvidu-sampleapp-minimal/src/main/resources/static/js/stats.js b/openvidu-testapp/src/main/resources/static/js/stats.js similarity index 98% rename from openvidu-sampleapp-minimal/src/main/resources/static/js/stats.js rename to openvidu-testapp/src/main/resources/static/js/stats.js index 26e16ecd..2554dfaa 100644 --- a/openvidu-sampleapp-minimal/src/main/resources/static/js/stats.js +++ b/openvidu-testapp/src/main/resources/static/js/stats.js @@ -1,5 +1,5 @@ /* - * (C) Copyright 2016 Kurento (http://kurento.org/) + * (C) Copyright 2016 OpenVidu (http://kurento.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/openvidu-sampleapp-minimal/src/main/resources/static/js/demo.js b/openvidu-testapp/src/main/resources/static/js/testapp.js similarity index 69% rename from openvidu-sampleapp-minimal/src/main/resources/static/js/demo.js rename to openvidu-testapp/src/main/resources/static/js/testapp.js index 2ad2e492..878203d8 100644 --- a/openvidu-sampleapp-minimal/src/main/resources/static/js/demo.js +++ b/openvidu-testapp/src/main/resources/static/js/testapp.js @@ -1,5 +1,5 @@ /* - * (C) Copyright 2016 Kurento (http://kurento.org/) + * (C) Copyright 2016 OpenVidu (http://kurento.org/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,13 +14,29 @@ * limitations under the License. * */ -var kurento; +var openVidu; var room; window.onload = function() { console = new Console('console', console); } +function playVideo(stream) { + + var elementId = "video-" + stream.getGlobalID(); + var div = document.createElement('div'); + div.setAttribute("id", elementId); + document.getElementById("participants").appendChild(div); + + stream.playThumbnail(elementId); + + // Check color + var videoTag = document.getElementById("native-" + elementId); + var userId = stream.getGlobalID(); + var canvas = document.createElement('CANVAS'); + checkColor(videoTag, canvas, userId); +} + function register() { var userId = document.getElementById('name').value; @@ -28,38 +44,22 @@ function register() { var wsUri = 'wss://' + location.host + '/room'; - kurento = KurentoRoom(wsUri, function(error, kurento) { + openVidu = new Main.OpenVidu(wsUri); + + openVidu.connect(function(error, openVidu) { if (error) return console.log(error); - room = kurento.Room({ + room = openVidu.Room({ room : roomId, user : userId, subscribeToStreams : true }); - var localStream = kurento.Stream(room, { - audio : true, - video : true, - data : true - }); + var camera = openVidu.Stream(room); - localStream.addEventListener("access-accepted", function() { - - var playVideo = function(stream) { - var elementId = "video-" + stream.getGlobalID(); - var div = document.createElement('div'); - div.setAttribute("id", elementId); - document.getElementById("participants").appendChild(div); - stream.playThumbnail(elementId); - - // Check color - var videoTag = document.getElementById("native-" + elementId); - var userId = stream.getGlobalID(); - var canvas = document.createElement('CANVAS'); - checkColor(videoTag, canvas, userId); - } + camera.addEventListener("access-accepted", function() { room.addEventListener("room-connected", function(roomEvent) { @@ -68,7 +68,7 @@ function register() { document.getElementById('join').style.display = 'none'; document.getElementById('room').style.display = 'block'; - localStream.publish(); + camera.publish(); var streams = roomEvent.streams; for (var i = 0; i < streams.length; i++) { @@ -88,12 +88,12 @@ function register() { } }); - playVideo(localStream); + playVideo(camera); room.connect(); }); - localStream.init(); + camera.init(); }); } @@ -104,16 +104,17 @@ function leaveRoom() { document.getElementById('room').style.display = 'none'; var streams = room.getStreams(); - for ( var index in streams) { + for (var index in streams) { var stream = streams[index]; var element = document.getElementById("video-" + stream.getGlobalID()); if (element) { element.parentNode.removeChild(element); } } - kurento.close(); + + openVidu.close(); } window.onbeforeunload = function() { - kurento.close(); + openVidu.close(); }; diff --git a/openvidu-sampleapp-minimal/src/main/resources/static/style.css b/openvidu-testapp/src/main/resources/static/style.css similarity index 100% rename from openvidu-sampleapp-minimal/src/main/resources/static/style.css rename to openvidu-testapp/src/main/resources/static/style.css diff --git a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/AddRemoveUsersBasicTest.java b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/AddRemoveUsersBasicTest.java similarity index 97% rename from openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/AddRemoveUsersBasicTest.java rename to openvidu-testapp/src/test/java/org/openvidu/testapp/test/AddRemoveUsersBasicTest.java index 038597e3..93b0cdd0 100644 --- a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/AddRemoveUsersBasicTest.java +++ b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/AddRemoveUsersBasicTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.openvidu.test.basic; +package org.openvidu.testapp.test; import java.lang.invoke.MethodHandles; import java.util.Collection; diff --git a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/AddRemoveUsersNoSinkVerifyBasicTest.java b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/AddRemoveUsersNoSinkVerifyBasicTest.java similarity index 97% rename from openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/AddRemoveUsersNoSinkVerifyBasicTest.java rename to openvidu-testapp/src/test/java/org/openvidu/testapp/test/AddRemoveUsersNoSinkVerifyBasicTest.java index 0ac9b9a0..1410a1dd 100644 --- a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/AddRemoveUsersNoSinkVerifyBasicTest.java +++ b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/AddRemoveUsersNoSinkVerifyBasicTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.openvidu.test.basic; +package org.openvidu.testapp.test; import java.lang.invoke.MethodHandles; import java.util.Collection; diff --git a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/NUsersEqualLifetimeBasicTest.java b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/NUsersEqualLifetimeBasicTest.java similarity index 97% rename from openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/NUsersEqualLifetimeBasicTest.java rename to openvidu-testapp/src/test/java/org/openvidu/testapp/test/NUsersEqualLifetimeBasicTest.java index 1dbf0662..2c3b43b7 100644 --- a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/NUsersEqualLifetimeBasicTest.java +++ b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/NUsersEqualLifetimeBasicTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.openvidu.test.basic; +package org.openvidu.testapp.test; import java.lang.invoke.MethodHandles; import java.util.Collection; diff --git a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/OneUserQuickReentryBasicTest.java b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/OneUserQuickReentryBasicTest.java similarity index 97% rename from openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/OneUserQuickReentryBasicTest.java rename to openvidu-testapp/src/test/java/org/openvidu/testapp/test/OneUserQuickReentryBasicTest.java index 11b04f28..fa49f771 100644 --- a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/OneUserQuickReentryBasicTest.java +++ b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/OneUserQuickReentryBasicTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.openvidu.test.basic; +package org.openvidu.testapp.test; import java.lang.invoke.MethodHandles; import java.util.Collection; diff --git a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/SeqAddRemoveUserBasicTest.java b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/SeqAddRemoveUserBasicTest.java similarity index 97% rename from openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/SeqAddRemoveUserBasicTest.java rename to openvidu-testapp/src/test/java/org/openvidu/testapp/test/SeqAddRemoveUserBasicTest.java index d0c65724..8a20830e 100644 --- a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/SeqAddRemoveUserBasicTest.java +++ b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/SeqAddRemoveUserBasicTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.openvidu.test.basic; +package org.openvidu.testapp.test; import java.lang.invoke.MethodHandles; import java.util.Collection; diff --git a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/SeqNUsersEqualLifetimeBasicTest.java b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/SeqNUsersEqualLifetimeBasicTest.java similarity index 97% rename from openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/SeqNUsersEqualLifetimeBasicTest.java rename to openvidu-testapp/src/test/java/org/openvidu/testapp/test/SeqNUsersEqualLifetimeBasicTest.java index b223f825..90e2f015 100644 --- a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/SeqNUsersEqualLifetimeBasicTest.java +++ b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/SeqNUsersEqualLifetimeBasicTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.openvidu.test.basic; +package org.openvidu.testapp.test; import java.lang.invoke.MethodHandles; import java.util.Collection; diff --git a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/TwoUsersEqualLifetimeBasicTest.java b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/TwoUsersEqualLifetimeBasicTest.java similarity index 97% rename from openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/TwoUsersEqualLifetimeBasicTest.java rename to openvidu-testapp/src/test/java/org/openvidu/testapp/test/TwoUsersEqualLifetimeBasicTest.java index d03ee85b..685acda4 100644 --- a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/TwoUsersEqualLifetimeBasicTest.java +++ b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/TwoUsersEqualLifetimeBasicTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.openvidu.test.basic; +package org.openvidu.testapp.test; import java.lang.invoke.MethodHandles; import java.util.Collection; diff --git a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/WebAppAvailabilityBasicTest.java b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/WebAppAvailabilityBasicTest.java similarity index 97% rename from openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/WebAppAvailabilityBasicTest.java rename to openvidu-testapp/src/test/java/org/openvidu/testapp/test/WebAppAvailabilityBasicTest.java index 3ef416b9..a2f44dae 100644 --- a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/WebAppAvailabilityBasicTest.java +++ b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/WebAppAvailabilityBasicTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.openvidu.test.basic; +package org.openvidu.testapp.test; import java.lang.invoke.MethodHandles; import java.util.Collection; diff --git a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/fake/ExtraKmsFakeUsersBasicTest.java b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/fake/ExtraKmsFakeUsersBasicTest.java similarity index 97% rename from openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/fake/ExtraKmsFakeUsersBasicTest.java rename to openvidu-testapp/src/test/java/org/openvidu/testapp/test/fake/ExtraKmsFakeUsersBasicTest.java index d46b68d0..6cdbf600 100644 --- a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/fake/ExtraKmsFakeUsersBasicTest.java +++ b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/fake/ExtraKmsFakeUsersBasicTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.openvidu.test.basic.fake; +package org.openvidu.testapp.test.fake; import java.lang.invoke.MethodHandles; import java.util.Collection; diff --git a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/fake/ParallelNFakeUsersBasicTest.java b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/fake/ParallelNFakeUsersBasicTest.java similarity index 97% rename from openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/fake/ParallelNFakeUsersBasicTest.java rename to openvidu-testapp/src/test/java/org/openvidu/testapp/test/fake/ParallelNFakeUsersBasicTest.java index 56a8195f..fed7ef9e 100644 --- a/openvidu-sampleapp-minimal/src/test/java/org/openvidu/test/basic/fake/ParallelNFakeUsersBasicTest.java +++ b/openvidu-testapp/src/test/java/org/openvidu/testapp/test/fake/ParallelNFakeUsersBasicTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.openvidu.test.basic.fake; +package org.openvidu.testapp.test.fake; import java.lang.invoke.MethodHandles; import java.util.Collection; diff --git a/openvidu-sampleapp-minimal/src/test/resources/log4j.properties b/openvidu-testapp/src/test/resources/log4j.properties similarity index 100% rename from openvidu-sampleapp-minimal/src/test/resources/log4j.properties rename to openvidu-testapp/src/test/resources/log4j.properties diff --git a/openvidu-sampleapp-minimal/src/test/resources/test.conf.json b/openvidu-testapp/src/test/resources/test.conf.json similarity index 100% rename from openvidu-sampleapp-minimal/src/test/resources/test.conf.json rename to openvidu-testapp/src/test/resources/test.conf.json diff --git a/pom.xml b/pom.xml index 623283ae..597129d7 100644 --- a/pom.xml +++ b/pom.xml @@ -10,6 +10,7 @@ org.openvidu openvidu + 0.0.1-SNAPSHOT pom Kurento Room @@ -49,7 +50,7 @@ - 6.6.1-SNAPSHOT + 0.0.1-SNAPSHOT 5.1.4-SNAPSHOT @@ -69,10 +70,10 @@ openvidu-server openvidu-client - openvidu-client-js + openvidu-browser openvidu-test openvidu-demo - openvidu-sampleapp-minimal + openvidu-testapp @@ -98,37 +99,37 @@ org.openvidu openvidu-sdk - ${version.kurento.room} + ${version.openvidu} org.openvidu openvidu-server - ${version.kurento.room} + ${version.openvidu} org.openvidu openvidu-client - ${version.kurento.room} + ${version.openvidu} org.openvidu - openvidu-client-js - ${version.kurento.room} + openvidu-browser + ${version.openvidu} org.openvidu openvidu-test - ${version.kurento.room} + ${version.openvidu} org.openvidu openvidu-demo - ${version.kurento.room} + ${version.openvidu} org.openvidu openvidu-basicapp - ${version.kurento.room} + ${version.openvidu}