cloudflare
Version:
The official TypeScript library for the Cloudflare API
49 lines • 2.17 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AudioTracks = void 0;
const resource_1 = require("cloudflare/resource");
class AudioTracks extends resource_1.APIResource {
/**
* Deletes additional audio tracks on a video. Deleting a default audio track is
* not allowed. You must assign another audio track as default prior to deletion.
*/
delete(identifier, audioIdentifier, params, options) {
const { account_id } = params;
return this._client.delete(`/accounts/${account_id}/stream/${identifier}/audio/${audioIdentifier}`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Adds an additional audio track to a video using the provided audio track URL.
*/
copy(identifier, params, options) {
const { account_id, ...body } = params;
return this._client.post(`/accounts/${account_id}/stream/${identifier}/audio/copy`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Edits additional audio tracks on a video. Editing the default status of an audio
* track to `true` will mark all other audio tracks on the video default status to
* `false`.
*/
edit(identifier, audioIdentifier, params, options) {
const { account_id, ...body } = params;
return this._client.patch(`/accounts/${account_id}/stream/${identifier}/audio/${audioIdentifier}`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Lists additional audio tracks on a video. Note this API will not return
* information for audio attached to the video upload.
*/
get(identifier, params, options) {
const { account_id } = params;
return this._client.get(`/accounts/${account_id}/stream/${identifier}/audio`, options)._thenUnwrap((obj) => obj.result);
}
}
exports.AudioTracks = AudioTracks;
(function (AudioTracks) {
})(AudioTracks = exports.AudioTracks || (exports.AudioTracks = {}));
//# sourceMappingURL=audio-tracks.js.map