The Twilio Programmable Video SDKs use Semantic Versioning.
Compatibility Notice - All versions |
---|
Please note that all 2.x versions are incompatible with Firefox 63+ in a Peer-to-Peer Room. For more information please review the Github Issue. |
Improvements
ConnectOptions
will now throw an exceptionKnown issues
Features
abortOnIceServerTimeout
that tells the client whether to continue or abort connecting to a Room when Ice fails to connect.iceServersTimeout
that allows control of the timeout period when trying to retrieve Ice servers.VideoTextureView
. VideoTextureView
is similar to VideoView
but subclasses TextureView
instead of SurfaceView
. Unlike SurfaceView, TextureView does not create a separate window but behaves as a regular View. This key difference allows a TextureView to be moved, transformed, animated, etc. For more see the TextureView documentation. If you were previously using this gist, please update your applications to use the VideoTextureView
provided with the SDK. NOTE: VideoTextureView
can experience dead locking on API Level 19 or below due to a WebRTC bug. Use with discretion.Known issues
Improvements
Known issues
Features
simulcast
property to Vp8Codec
. Enabling simulcast causes the encoder to generate
multiple spatial and temporal layers for the video that is published. Simulcast should only be
enabled in a Group Room.Bug Fixes
Room
.Known issues
Improvements
Bug Fixes
Known issues
Improvements
ScreenCapturer
to capture at resolution based on the device's screen.Bug Fixes
VideoCapturer
API where VideoPixelFormat.RGBA_8888
frames were not rotated
before provided to video broadcaster. This bug would result in frames not being oriented
properly when rendered by participants.Known issues
We've promoted 2.0.0-beta5 to 2.0.0 as our first General Availability release.
Bug Fixes
Known issues
Improvements
trackId
from BaseTrackStats
. trackSid
or trackName
can be used to identify
track stats in a StatsReport
.getTrackId
from LocalAudioTrack
, LocalVideoTrack
, and LocalDataTrack
.getSid
to RemoteAudioTrack
, RemoteVideoTrack
, and RemoteDataTrack
.3.1.0
and Gradle version to 4.4
.AudioCodec
and VideoCodec
from enums to abstract classes with concrete
implementations. The subclasses of AudioCodec
and VideoCodec
are the following:
AudioCodec
IsacCodec
OpusCodec
PcmaCodec
PcmuCodec
G722Codec
VideoCodec
Vp8Codec
H264Codec
Vp9Codec
The following snippets demonstrate the before and after for setting codec preferences.
1// Setting preferences before 2.0.0-beta42ConnectOptions aliceConnectOptions = new ConnectOptions.Builder(aliceToken)3.roomName(roomName)4.preferAudioCodecs(Collections.singletonList(VideoCodec.ISAC))5.preferVideoCodecs(Collections.singletonList(VideoCodec.VP9))6.build();78// Setting preferences with 2.0.0-beta49ConnectOptions aliceConnectOptions = new ConnectOptions.Builder(aliceToken)10.roomName(roomName)11.preferAudioCodecs(Collections.<AudioCodec>singletonList(new IsacCodec()))12.preferVideoCodecs(Collections.<VideoCodec>singletonList(new Vp9Codec()))13.build();
Bug Fixes
Known issues
Improvements
Bug Fixes
Known issues
Bug Fixes
Room#disconnect()
twice. #255Known issues
Improvements
targetSdkVersion
to 27buildToolsVersion
to 27.0.3Known issues
Improvements
Bug Fixes
Known issues
Features
RemoteParticipant.Listener
onAudioTrackSubscriptionFailed
- Notifies listener that an audio track could not be
subscribed to.onVideoTrackSubscriptionFailed
- Notifies listener that a video track could not be
subscribed to.onDataTrackSubscriptionFailed
- Notifies listener that a data track could not be
subscribed to.trackSid
to BaseTrackStats
.Bug Fixes
getEncodingOptions
method from ConnectOptions
.Known issues
Improvements
LocalParticipant
throws IllegalArgumentException
when attempting to publish or unpublish
a released Track
.Bug Fixes
Room
before being connected.Known issues
Improvements
LocalDataTrack
name is no longer provided via static create
method argument. DataTrack names
are now provided via DataTrackOptions
. Reference snippets below:
Creating a LocalDataTrack
with name before 2.0.0-preview6
1String dataTrackName = "data";2LocalDataTrack localDataTrack = LocalDataTrack.create(context, dataTrackName);
Creating a LocalDataTrack
with name after 2.0.0-preview6
1String dataTrackName = "data";2DataTrackOptions dataTrackOptions = new DataTrackOptions.Builder()3.name("data")4.build();5LocalDataTrack localDataTrack = LocalDataTrack.create(context, dataTrackOptions);6
Updated javadoc to include note about VideoView#setVideoScaleType
. Scale type will only
be applied to dimensions defined as WRAP_CONTENT
or a custom value. Setting a width or height to
MATCH_PARENT
results in the video being scaled to fill the maximum value of the dimension.
Add warning log when calling setVideoScaleType
when width or height is set to MATCH_PARENT
Bug Fixes
Known issues
Features
LocalParticipant.Listener
onAudioTrackPublicationFailed
- Notifies listener that local participant failed to publish
audio track.onVideoTrackPublicationFailed
- Notifies listener that local participant failed to publish
video track.onVideoTrackPublicationFailed
- Notifies listener that local participant failed to publish
video track.Improvements
DataTrack
API with Group rooms.Track
interface public. Track
is the common interface for an AudioTrack
, VideoTrack
,
and DataTrack
.If you are downloading Video Android SDK artifacts from the Twilio CDN then there are two options available moving forward.
All Javadocs back to 1.0.0-preview1
are now hosted on Github Pages
with the following URL scheme. https://twilio.github.io/twilio-video-android/docs/{version}
2.0.0-preview5
Javadocs go to https://twilio.github.io/twilio-video-android/docs/2.0.0-preview5Bug Fixes
takePicture
on CameraCapturer
.Known issues
Features
DataTrack
API. A data track represents a unidirectional source that allow sharing
string and binary data with all participants of a Room. Data tracks function similarly to audio and
video tracks and can be provided via ConnectOptions
and published using
LocalParticipant#publishTrack
. Messages sent on the data track are not guaranteed to be
delivered to all the participants. The following snippets demonstrate how to send and receive
messages with data tracks.Creating a LocalDataTrack
LocalDataTrack localDataTrack = LocalDataTrack.create(context);
Connecting to a Room
with a LocalDataTrack
1ConnectOptions connectOptions = new ConnectOptions.Builder(token)2.dataTracks(Collections.singletonList(localDataTrack))3.build();4Video.connect(context, connectOptions, roomListener);
Publishing a LocalDataTrack
1// ... Connected to room2LocalParticipant localParticipant = room.getLocalParticipant();34localParticipant.publish(localDataTrack);
Observing RemoteDataTrackPublication
and RemoteDataTrack
1RemoteParticipant.Listener participantListener = new RemoteParticipant.Listener() {2// ... complete interface ellided34// Participant has published data track5@Override6public void onDataTrackPublished(RemoteParticipant remoteParticipant,7RemoteDataTrackPublication remoteDataTrackPublication);89// Participant has unpublished data track10@Override11public void onDataTrackUnpublished(RemoteParticipant remoteParticipant,12RemoteDataTrackPublication remoteDataTrackPublication);1314// Data track has been subscribed to and messages can be observed.15@Override16public void onDataTrackSubscribed(RemoteParticipant remoteParticipant,17RemoteDataTrackPublication remoteDataTrackPublication,18RemoteDataTrack remoteDataTrack);1920// Data track has been unsubsubscribed from and messages cannot be observed.21@Override22public void onDataTrackUnsubscribed(RemoteParticipant remoteParticipant,23RemoteDataTrackPublication remoteDataTrackPublication,24RemoteDataTrack remoteDataTrack);25};
Sending messages on LocalDataTrack
1String message = "Hello DataTrack!";2ByteBuffer messageBuffer = ByteByffer.wrap(new byte[]{ 0xf, 0xe });34localDataTrack.send(message);5localDataTrack.send(messageBuffer);
Observing messages from data track
1RemoteDataTrack.Listener dataTrackListener = new RemoteDataTrack.Listener() {2@Override3public void onMessage(String message) {4// Should print "Hello DataTrack!"5Log.d(TAG, String.format("Received data track message: %s", message));6}78@Override9public void onMessage(ByteBuffer message) {10Log.d(TAG, "Received message buffer on data track!");11}12};
Improvements
VideoConstraints
class to AspectRatio
class.getName
if no name was specified.Bug Fixes
Known issues
Improvements
Bug Fixes
CameraCapturer
incorrectly reported a failure to close the
camera.Room
that has not connected #116Known issues
Bug Fixes
Known issues
Room
that has not connected sometimes results in a crash #116Features
EncodingParameters
which constrains how much bandwidth is used to share audio and
video. This object has been added to ConnectOptions
and can also be set on LocalParticipant
after joining a Room
.create
methods to LocalAudioTrack
and LocalVideoTrack
that allow creating
named tracks. The following snippet demonstrates how to create a video track named "screen".1LocalVideoTrack screenVideoTrack = LocalVideoTrack.create(context,2true,3screenCapturer,4"screen");
getTrackId
from Track
to LocalAudioTrack
and LocalVideoTrack
.AudioCodec
and VideoCodec
as part of the new codec preferences API. Audio and video
codec preferences can be set in ConnectOptions
. The following snippet
demonstrates how to prefer the iSAC audio codec and VP9 video codec.1ConnectOptions aliceConnectOptions = new ConnectOptions.Builder(aliceToken)2.roomName(roomName)3.preferAudioCodecs(Collections.singletonList(VideoCodec.ISAC))4.preferVideoCodecs(Collections.singletonList(VideoCodec.VP9))5.build();
RemoteAudioTrack
and RemoteVideoTrack
. These new objects extend AudioTrack
and
VideoTrack
respectively and come with the following new method:
getName
- Returns the name of the track or an empty string if no name is specified.enablePlayback
to new RemoteAudioTrack
which allows developers to mute the audio
received from a RemoteParticipant
.RemoteAudioTrackPublication
which represents a published RemoteAudioTrack
. This new
class contains the following methods:
getTrackSid
- Returns the identifier of a remote video track within the scope of a Room
.getTrackName
- Returns the name of the track or an empty string if no name was specified.isTrackEnabled
- Checks if the track is enabled.getAudioTrack
- Returns the base class object of the remote audio track published.getRemoteAudioTrack
- Returns the remote audio track published.RemoteVideoTrackPublication
which represents a published RemoteVideoTrack
. This new
class contains the following methods:
getTrackSid
- Returns the identifier of a remote video track within the scope of a Room
.getTrackName
- Returns the name of the track or an empty string if no name was specified.isTrackEnabled
- Checks if the track is enabled.getAudioTrack
- Returns the base class object of the remote audio track published.getRemoteAudioTrack
- Returns the remote audio track published.LocalAudioTrackPublication
which represents a published LocalAudioTrack
. This new
class contains the following methods:
getTrackSid
- Returns the identifier of a local video track within the scope of a Room
.getTrackName
- Returns the name of the track or an empty string if no name was specified.isTrackEnabled
- Checks if the track is enabled.getAudioTrack
- Returns the base class object of the local audio track published.getLocalAudioTrack
- Returns the local audio track published.LocalVideoTrackPublication
which represents a published LocalVideoTrack
. This new
class contains the following methods:
getTrackSid
- Returns the identifier of a local video track within the scope of a Room
.getTrackName
- Returns the name of the track or an empty string if no name was specified.isTrackEnabled
- Checks if the track is enabled.getAudioTrack
- Returns the base class object of the local audio track published.getLocalAudioTrack
- Returns the local audio track published.Participant
to an interface and migrated previous functionality into
RemoteParticipant
. LocalParticipant
and the new RemoteParticipant
implement Participant
.RemoteParticipant#getRemoteAudioTracks
and RemoteParticipant#getRemoteVideoTracks
which
return List<RemoteAudioTrackPublication>
and List<RemoteVideoTrackPublication>
respectively.Participant.Listener
to RemoteParticipant.Listener
and changed the listener to return
RemoteParticipant
, RemoteAudioTrackPublication
, and RemoteVideoTrackPublication
in callbacks.RemoteParticipant.Listener
callbacks:
onAudioTrackAdded
renamed to onAudioTrackPublished
.onAudioTrackRemoved
renamed to onAudioTrackUnpublished
.onVideoTrackAdded
renamed to onVideoTrackPublished
.onVideoTrackRemoved
renamed to onVideoTrackUnpublished
.RemoteParticipant.Listener
:
onAudioTrackSubscribed
- Indicates when audio is flowing from a remote participant's audio
track. This callback includes the RemoteAudioTrack
that was subscribed to.onAudioTrackUnsubscribed
- Indicates when audio is no longer flowing from a remote
participant's audio track. This callback includes the RemoteAudioTrack
that was subscribed to.onVideoTrackSubscribed
- Indicates when video is flowing from a remote participant's video
track. This callback includes the RemoteVideoTrack
that was subscribed to.onVideoTrackUnsubscribed
- Indicates when video is no longer flowing from a remote
participant's video track. This callback includes the RemoteVideoTrack
that was subscribed to.TrackStats
to RemoteTrackStats
, AudioTrackStats
to RemoteAudioTrackStats
, and
VideoTrackStats
to RemoteVideoTrackStats
LocalParticipant#addAudioTrack
and LocalParticipant#addVideoTrack
to
LocalParticipant#publishedTrack
.LocalParticipant.Listener
which is provides the following callbacks:
onAudioTrackPublished
- Indicates when a local audio track has been published to a Room
.onVideoTrackPublished
- Indicates when a local video track has been published to a Room
.LocalParticipant#getLocalAudioTracks
and LocalParticipant#getLocalVideoTracks
which
return List<LocalAudioTrackPublication>
and List<LocalVideoTrackPublication>
respectively.Improvements
LocalVideoTrack
that has been released.Bug Fixes
LocalParticipant#release()
from public to package.
#132Known issues
Room
that has not connected sometimes results in a crash #116