github OpenVidu/openvidu v2.0.0

latest releases: v2.30.0, v2.29.0, v2.28.0...
6 years ago

Release v2.0.0

This is the first breaking change update for OpenVidu, which brings in lots of new features and internal improvements.

BREAKING CHANGES LIST

  • OpenVidu Browser

    • OpenVidu.initSession now doesn't receive any input parameter.
    • OpenVidu.initPublisher input parameters have changed. Now properties parameter must match PublisherProperties interface.
    • Session.connect method has been promisified. Change the last mandatory callback parameter for a Promise implementation: session.connect(token, (error) => { ... }) to session.connect(token).then(() => {...}).catch(error => {...});

  • OpenVidu Java Client

    • All Archive entities are now called Recording. This includes: class Archive to Recording, class ArchiveMode to RecordingMode, class ArchiveLayout to RecordingLayout, method SessionProperties.archiveLayout() to SessionProperties.recordingLayout(), method SessionProperties.archiveMode() to SessionProperties.recordingMode(), method SessionProperties.Builder.archiveLayout() to SessionProperties.Builder.recordingLayout(), method SessionProperties.Builder.archiveMode() to SessionProperties.Builder.recordingMode()
    • RecordingLayout property in SessionProperties.Builder is now configured calling method defaultRecordingLayout() instead of recordingLayout(). This means that if one Session is gonna be recorded more than once, each recording layout may be customize with RecordingProperties.Builder.recordingLayout(), which will overwrite the default one globally configured in SessionProperties object.

  • OpenVidu Node Client

    • We have removed the builder pattern in all openvidu-node-client classes. Now objects are used instead, which includes classes TokenOptions, SessionProperties and RecordingProperties. For example, instead of getting a TokenOptions object like this: var tokenOptions = new TokenOptions.Builder().data(serverData).role(role).build() now it must be like this: var tokenOptions = {data: serverData, role: role}
    • There has been a simple change in certain asynchronous call. Method Session.getSessionId() is now synchronous, but method OpenVidu.createSession() is now asynchronous (the reason is pretty simple: now method createSession implements the behaviour that getSessionId was providing the first time it was called for certain Session object).
    • All callback methods have been promisified. This includes method Session.generateToken(tokenOptions?, callback): void (now Session.generateToken(tokenOptions?): Promise<string>) and method Session.getSessionId(callback): void (now OpenVidu.createSession(): Promise<Session>, take also into account that the async call has changed from one method to the other as stated in the previous point).
    • All Archive entities are now called Recording. This includes: object Archive to Recording, object ArchiveMode to RecordingMode, object ArchiveLayout to RecordingLayout, method SessionProperties.archiveLayout() to SessionProperties.recordingLayout(), method SessionProperties.archiveMode() to SessionProperties.recordingMode(), method SessionProperties.Builder.archiveLayout() to SessionProperties.Builder.recordingLayout(), method SessionProperties.Builder.archiveMode() to SessionProperties.Builder.recordingMode()
    • recordingLayout property in SessionProperties has changed to defaultRecordingLayout. This means that if one Session is gonna be recorded more than once, each recording layout may be customize with recordingLayout property (of RecordingProperties interface, which will overwrite the default one globally configured in SessionProperties object.

  • REST API

    • All Archive entities are now called Recording in API REST. For example: {"archiveMode": "ARCHIVE_MODE", "archiveLayout": "ARCHIVE_LAYOUT", "mediaMode": "MEDIA_MODE"} now is {"recordingMode": "RECORDING_MODE", "recordingLayout": "RECORDING_LAYOUT", "mediaMode": "MEDIA_MODE"}.
    • Field recordingLayout is now called defaultRecordingLayout in operation POST /api/sessions. This means that if one Session is gonna be recorded more than once, each recording layout may be customize adding a new field recordingLayout in the call to POST /api/recordings/start of the API REST, which will overwrite the default one globally configured during POST /api/sessions

  • Other breaking changes

    • OpenVidu Server default port from 8443 to 4443
    • OpenVidu Server configuration property openvidu.recording.free-access is now openvidu.recording.public-access

NEW FEATURES

  • OpenVidu Browser new methods

    • Session.publish(): now returns a Promise so you can tell if the method was successful or not.

    • Session.signal(): now returns a Promise so you can tell if the method was successful or not.

    • Subcriber.subscribeToAudio() and Subscriber.subscribeToVideo(): new methods that allows you to mute the audio or video tracks of a remote stream.

    • OpenVidu.initPubliher(): now expects properties as interface PublisherProperties. They include:

        {
            audioSource: undefined, // The source of audio. If undefined default audio input
            videoSource: undefined, // The source of video. If undefined default video input
            publishAudio: true,          // Whether you want to start publishing with your audio unmuted or muted
            publishVideo: true,         // Whether you want to start publishing with your video enabled or not
            resolution: '640x480',     // The resolution of your video
            frameRate: 30,               // The frame rate of your video
            insertMode: 'APPEND',  // How the video will be inserted in the target element
            mirror: false       	       // Whether to mirror your local video or not
        }
      
    • Session.subscribe(): now expects properties as interface SubscriberProperties. They include:

        {
            insertMode: 'APPEND',  // How the video will be inserted in the target element
            subscribeToAudio: true, // Whether to initially subscribe to the stream's audio track or not
            subscribeToVideo: true  // Whether to initially subscribe to the stream's video track or not
        }
      
    • OpenVidu.getDevices(): now you can use certain video or audio input device when calling OpenVidu.initPublisher(), thanks to properties audioSource or videoSource of PublisherProperties object. Just set these variables to the property deviceId of any of the devices returned by this method.

    • OpenVidu.getUserMedia(): method improved. Now devs can customize a MediaStream object before calling OpenVidu.initPublisher() method, setting property audioSource or videoSource to a MediaStreamTrack object (see docs for further information)

  • OpenVidu Browser new properties

    • Stream.frameRate: new property defining the frame rate of video streams. This property will only have value if the Publisher owning the stream has set property frameRate of PublisherProperties when calling OpenVidu.initPublisher()

  • OpenVidu Browser events

    • New events accessDialogOpened and accessDialogClosed: dispatched by Publisher objects when the browser asks the user to grant permissions to camera or michrophone by opening a pop-up. You can use them to warn your users about it.
    • New events recordingStarted and recordingStopped: dispatched by Session object when the recording of a Session starts and stops. You can customize which clients will receive this event thanks to new property openvidu.recording.notification (see OpenVidu Server configuration)
    • Events publisherStartSpeaking and publisherStopSpeaking improved: more customizable thanks to OpenVidu.setAdvancedConfiguration() and better overall performance.
    • Events streamDestroyed, connectionDestroyed and sessionDisconnected have new property reason. This gives more information about why the events have been dispatched so you can take specific actions depending on the context: maybe a stream has been destroyed because the user publishing has deliberately diposed it or maybe the network connection has unexpectedly closed (see docs for StreamEvent, ConnectionEvent and SessionDisconnectedEvent)

  • Other improvements in OpenVidu Browser

    • Support for custom screen sharing extensions for Chrome
    • Support for custom STUN and TURN servers in openvidu-browser. Use OpenVidu.setAdvancedConfiguration()
    • Library size decreased in almost 30% (openvidu-browser.min.js from 300 KB to 216 KB)

  • OpenVidu Server new features

    • New property name for recordings: you can now specify which name should OpenVidu Server give to each one of your recording files. You can do it by using the REST API (by setting body parameter "name" in POST /api/recordings/start), openvidu-java-client (by using RecordingProperties.Builder.name()) or openvidu-node-client (by setting property RecordingProperties.name)
    • Now support for initializing sessions with a custom sessionId. You can take advantage of this new property to facilitate the mapping between OpenVidu Server 'session' entities and your own 'session' entities. You can set it by using the REST API (by setting body parameter "customSessionId" in POST /api/sessions), openvidu-java-client (by using SessionProperties.Builder.customSessionId()) or openvidu-node-client (by setting property SessionProperties.customSessionId)
    • Call Detail Record extended: new events recordingStarted and recordingStopped, property reason for events sessionDestroyed, participantLeft and webrtcConnectionDestroyed.

BUG FIXES

  • Now when any participant unexpectedly disconnects from a session (for example, due to a network failure), connectionDestroyed event is sent to the rest of participants with property reason set to networkDisconnect.
  • When OpenVidu Server is stopped, it will try to gracefully finish every in progress session and recording. This way no recording file will end corrupted upon OpenVidu Server termination (this cannot be granted if the process crashes or is forcibly terminated)
  • Now both STUN and TURN OpenVidu Server configuration parameters can be set up at the same time with no overwritings.
  • Tons of small fixes and code refactoring that makes OpenVidu more stable and easy to test and develop

Don't miss a new openvidu release

NewReleases is sending notifications on new releases.