PublishedTrack
The Published Track resource is a subresource of a Participant instance resource. It represents the Tracks a Participant is currently publishing to the Room.
Using the Published Track resource, you can query tracks published to a Room. You can also get a list of Tracks associated with a given Participant.
_10/v1/Rooms/{RoomNameOrSid}/Participants/{ParticipantIdentityOrSid}/PublishedTracks/{TrackNameOrSid}
Resource properties
sid
type: SID<MT>
The unique string that we created to identify the RoomParticipantPublishedTrack resource.
participant_sid
type: SID<PA>
The SID of the Participant resource with the published track.
room_sid
type: SID<RM>
The SID of the Room resource where the track is published.
name
type: string
The track name. Must be no more than 128 characters, and be unique among the participant's published tracks.
date_created
type: string<date-time>
date_updated
type: string<date-time>
enabled
type: boolean
Whether the track is enabled.
kind
type: enum<string>
The track type. Can be: audio
, video
or data
.
Possible values:
audio
video
data
url
type: string<uri>
The absolute URL of the resource.
Returns a single Track resource represented by TrackNameOrSid
.
_16// NOTE: This example uses the next generation Twilio helper library - for more
_16// information on how to download and install this version, visit
_16// https://www.twilio.com/docs/libraries/node
_16var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
_16var apiKeySecret = 'your_api_key_secret';
_16var accountSid = process.env.TWILIO_ACCOUNT_SID;
_16var Twilio = require('twilio');
_16var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});
_16client.video.rooms('DailyStandup').participants.get('Alice')
_16 .publishedTracks.get('Camera')
_16 .then(publishedTrack => {
_16 console.log(publishedTrack.kind);
_11 "date_updated": null,
_11 "sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_11 "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/PublishedTracks/MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_11 "date_created": "2017-12-13T23:46:36Z",
_11 "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_11 "participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_10/v1/Rooms/{RoomNameOrSid}/Participants/{ParticipantIdentityOrSid}/PublishedTracks/
Returns a list of tracks associated with a given Participant. The list includes paging information. Only currently
Published Tracks are in the list resource.
Note: No filters supported.
_16// NOTE: This example uses the next generation Twilio helper library - for more
_16// information on how to download and install this version, visit
_16// https://www.twilio.com/docs/libraries/node
_16var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
_16var apiKeySecret = 'your_api_key_secret';
_16var accountSid = process.env.TWILIO_ACCOUNT_SID;
_16var Twilio = require('twilio');
_16var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});
_16client.video.rooms('DailyStandup')
_16 .participants.get('Alice')
_16 .publishedTracks.list()
_16 .then(publishedTracks => {
_16 publishedTracks.forEach(publishedTrack => console.log(publishedTrack.sid))
_32 "first_page_url": "https://video.twilio.com/v1/Rooms/DailyStandup/Participants/ZestyYolandaZimmerman/PublishedTracks?PageSize=50&Page=0",
_32 "previous_page_url": null,
_32 "url": "https://video.twilio.com/v1/Rooms/DailyStandup/Participants/ZestyYolandaZimmerman/PublishedTracks?PageSize=50&Page=0",
_32 "next_page_url": null,
_32 "key": "published_tracks"
_32 "published_tracks": [{
_32 "name": "moderator-audio",
_32 "date_updated": null,
_32 "sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32 "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/PublishedTracks/MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32 "date_created": "2017-12-13T23:46:36Z",
_32 "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32 "participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_32 "name": "moderator-camera",
_32 "date_updated": null,
_32 "sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32 "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/PublishedTracks/MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32 "date_created": "2017-12-13T23:46:36Z",
_32 "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32 "participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"