Release v0.3.0
What's Changed
Features
- Added initial DRM support.
- A new asynchronous event has been added on the viewer, error . Viewers can subscribe to this event using the following snippet of code to handle error scenarios.
viewer.on('error' , (err) => {
console.error(err);
});
Fixed
- The SDK will now throw an exception if the publisher or viewer is initialized with both disableAudio and disableVideo are set to true
- addRemoteTrack() now checks for the mid of the track and manages it instead of throwing an exception.
❗Deprecations/ Breaking changes ❗
- The
mediaElement
property in the constructor of theView
class has now been deprecated since it does not work with DRM based workflows. It will be removed completely in a future release. To ensure that your players continue to work, please migrate the setting of the mediaElement to either theactive
or thetrack
event.
You do not need to change your view class constructor
const millicastView = new View(null, tokenGenerator, null /*a non null value will lead to a console warning*/, autoReconnect)
And then, carry out the assignment on a track
event for non-DRM based workflows.
millicastView.on('track', (event) => {
mediaElement.srcObject = event.streams[0]
});
If your workflow incorporates DRM, please supply the videoElement in the millicastView.configureDRM(options)
call, and the SDK will manage the rest.
Full Changelog: v0.2.1...v0.3.0