Media Functions
ttv.media Functions
Function or Property | Description | Function Type | Returns |
---|---|---|---|
ttv.media.inFolder(folderID) | A promise which will return a list of media URLs as specified by Folder ID | Promise | array |
ttv.media.withTags([tag, ...]) | A promise which will return a list of media URLs as specified by the array of one or more tags. Accepts array of strings (tags). | Promise | array |
ttv.media.byId(mediaID) | A promise which will return the media's URL as specified by the media ID | Promise | string |
Code Samples
window.onloadTelemetryTV = function (ttv) {
ttv.media.inFolder('abc123abc123abc123').then((mediaInFolder) => {
console.log('Media in Folder:', mediaInFolder);
});
// Support multiple tags like `['foo', 'bar']`
ttv.media.withTags(['foo']).then(mediaList => {
console.log('Media with tag "foo":', mediaList);
})
ttv.media.byId('xyz890xyz890xyz890').then(url => {
console.log('Media by ID:', url);
})
};
Updated 2 months ago