Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

PublishedTrack


(warning)

Warning

This page 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, 2024(link takes you to an external page).
We recommend migrating your application to the API provided by our preferred video partner, Zoom. We've prepared this migration guide(link takes you to an external page) to assist you in minimizing any service disruption.

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.


Published Track Instance Resource

published-track-instance-resource page anchor

Resource URI

resource-uri page anchor

_10
/v1/Rooms/{RoomNameOrSid}/Participants/{ParticipantIdentityOrSid}/PublishedTracks/{TrackNameOrSid}

Resource Properties

resource-properties page anchor
Resource properties
sidtype: SID<MT>Not PII

The unique string that we created to identify the RoomParticipantPublishedTrack resource.


participant_sidtype: SID<PA>Not PII

The SID of the Participant resource with the published track.


room_sidtype: SID<RM>Not PII

The SID of the Room resource where the track is published.


nametype: stringNot PII

The track name. Must be no more than 128 characters, and be unique among the participant's published tracks.


date_createdtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was created specified in ISO 8601(link takes you to an external page) format.


date_updatedtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601(link takes you to an external page) format.


enabledtype: booleanNot PII

Whether the track is enabled.


kindtype: enum<STRING>Not PII

The track type. Can be: audio, video or data.

Possible values:
audiovideodata

urltype: string<URI>Not PII

The absolute URL of the resource.

Returns a single Track resource represented by TrackNameOrSid.

Retrieve a Track published to the Room by a Participant by TrackNameOrSid

retrieve-a-track-published-to-the-room-by-a-participant-by-tracknameorsid page anchor

Retrieve Track Published by a Participant

retrieve-track-published-by-a-participant page anchor
Node.js
Python
C#
Java
PHP
Ruby
curl

_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
_16
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
_16
var apiKeySecret = 'your_api_key_secret';
_16
var accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
var Twilio = require('twilio');
_16
_16
var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});
_16
_16
client.video.rooms('DailyStandup').participants.get('Alice')
_16
.publishedTracks.get('Camera')
_16
.fetch()
_16
.then(publishedTrack => {
_16
console.log(publishedTrack.kind);
_16
});

Output

_11
{
_11
"kind": "video",
_11
"name": "Camera",
_11
"date_updated": null,
_11
"sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_11
"enabled": true,
_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"
_11
}

Not supported.


Published Track List Resource

published-track-list-resource page anchor

_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.

Retrieve Tracks published to the Room by a Participant

retrieve-tracks-published-to-the-room-by-a-participant page anchor

Retrieve Tracks Published by a Participant

retrieve-tracks-published-by-a-participant page anchor
Node.js
Python
C#
Java
PHP
Ruby
curl

_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
_16
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
_16
var apiKeySecret = 'your_api_key_secret';
_16
var accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
var Twilio = require('twilio');
_16
_16
var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});
_16
_16
client.video.rooms('DailyStandup')
_16
.participants.get('Alice')
_16
.publishedTracks.list()
_16
.then(publishedTracks => {
_16
publishedTracks.forEach(publishedTrack => console.log(publishedTrack.sid))
_16
});

Output

_32
{
_32
"meta": {
_32
"page": 0,
_32
"page_size": 50,
_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
},
_32
"published_tracks": [{
_32
"kind": "audio",
_32
"name": "moderator-audio",
_32
"date_updated": null,
_32
"sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"enabled": true,
_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
}, {
_32
"kind": "video",
_32
"name": "moderator-camera",
_32
"date_updated": null,
_32
"sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"enabled": true,
_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
}]
_32
}


Rate this page: