This documentation is for reference only. We are no longer onboarding new customers to Programmable Video. Existing customers can continue to use the product until December 5, 2026.
We recommend migrating your application to the API provided by our preferred video partner, Zoom. We've prepared this migration guide to assist you in minimizing any service disruption.
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 exception
Known 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.
_13 // Setting preferences before 2.0.0-beta4_13 ConnectOptions aliceConnectOptions = new ConnectOptions.Builder(aliceToken)_13 .roomName(roomName)_13 .preferAudioCodecs(Collections.singletonList(VideoCodec.ISAC))_13 .preferVideoCodecs(Collections.singletonList(VideoCodec.VP9))_13 .build();_13_13 // Setting preferences with 2.0.0-beta4_13 ConnectOptions aliceConnectOptions = new ConnectOptions.Builder(aliceToken)_13 .roomName(roomName)_13 .preferAudioCodecs(Collections.<AudioCodec>singletonList(new IsacCodec()))_13 .preferVideoCodecs(Collections.<VideoCodec>singletonList(new Vp9Codec()))_13 .build();
Bug Fixes
Known issues
Improvements
Bug Fixes
Known issues
Bug Fixes
Room#disconnect()
twice.
#255
Known issues
Improvements
targetSdkVersion
to 27
buildToolsVersion
to 27.0.3
Known 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
_10 String dataTrackName = "data";_10 LocalDataTrack localDataTrack = LocalDataTrack.create(context, dataTrackName);
Creating a LocalDataTrack
with name after 2.0.0-preview6
_10 String dataTrackName = "data";_10 DataTrackOptions dataTrackOptions = new DataTrackOptions.Builder()_10 .name("data")_10 .build();_10 LocalDataTrack localDataTrack = LocalDataTrack.create(context, dataTrackOptions);
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.
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-preview5
Bug 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
_10LocalDataTrack localDataTrack = LocalDataTrack.create(context);
Connecting to a Room
with a LocalDataTrack
_10ConnectOptions connectOptions = new ConnectOptions.Builder(token)_10 .dataTracks(Collections.singletonList(localDataTrack))_10 .build();_10Video.connect(context, connectOptions, roomListener);
Publishing a LocalDataTrack
_10// ... Connected to room_10LocalParticipant localParticipant = room.getLocalParticipant();_10_10localParticipant.publish(localDataTrack);
Observing RemoteDataTrackPublication
and RemoteDataTrack
_25RemoteParticipant.Listener participantListener = new RemoteParticipant.Listener() {_25 // ... complete interface ellided_25_25 // Participant has published data track_25 @Override_25 public void onDataTrackPublished(RemoteParticipant remoteParticipant,_25 RemoteDataTrackPublication remoteDataTrackPublication);_25_25 // Participant has unpublished data track_25 @Override_25 public void onDataTrackUnpublished(RemoteParticipant remoteParticipant,_25 RemoteDataTrackPublication remoteDataTrackPublication);_25_25 // Data track has been subscribed to and messages can be observed._25 @Override_25 public void onDataTrackSubscribed(RemoteParticipant remoteParticipant,_25 RemoteDataTrackPublication remoteDataTrackPublication,_25 RemoteDataTrack remoteDataTrack);_25_25 // Data track has been unsubsubscribed from and messages cannot be observed._25 @Override_25 public void onDataTrackUnsubscribed(RemoteParticipant remoteParticipant,_25 RemoteDataTrackPublication remoteDataTrackPublication,_25 RemoteDataTrack remoteDataTrack);_25};
Sending messages on LocalDataTrack
_10String message = "Hello DataTrack!";_10ByteBuffer messageBuffer = ByteByffer.wrap(new byte[]{ 0xf, 0xe });_10_10localDataTrack.send(message);_10localDataTrack.send(messageBuffer);
Observing messages from data track
_12RemoteDataTrack.Listener dataTrackListener = new RemoteDataTrack.Listener() {_12 @Override_12 public void onMessage(String message) {_12 // Should print "Hello DataTrack!"_12 Log.d(TAG, String.format("Received data track message: %s", message));_12 }_12_12 @Override_12 public void onMessage(ByteBuffer message) {_12 Log.d(TAG, "Received message buffer on data track!");_12 }_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
#116
Known issues
Bug Fixes
Known issues
Room
that has not connected sometimes results in a crash
#116
Features
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".
_10LocalVideoTrack screenVideoTrack = LocalVideoTrack.create(context,_10 true,_10 screenCapturer,_10 "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.
_10ConnectOptions aliceConnectOptions = new ConnectOptions.Builder(aliceToken)_10 .roomName(roomName)_10 .preferAudioCodecs(Collections.singletonList(VideoCodec.ISAC))_10 .preferVideoCodecs(Collections.singletonList(VideoCodec.VP9))_10 .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.
#132
Known issues
Room
that has not connected sometimes results in a crash
#116