UNPKG

@vonage/messages

Version:

Multi-channel messaging that integrates WhatsApp, Facebook, Viber, SMS, and MMS

50 lines 1.48 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RCSVideo = void 0; const __1 = require("../"); const enums_1 = require("../../enums"); /** * Represents an video message for the RCS channel. * * @group RCS */ class RCSVideo extends __1.AbstractVideoMessage { /** * The channel for this message (always 'rcs'). */ channel = enums_1.Channels.RCS; /** * The duration in seconds the delivery of a message will be attempted. By * default Vonage attempts delivery for 72 hours, however the maximum effective * value depends on the operator and is typically 24 - 48 hours. We recommend * this value should be kept at its default or at least 30 minutes. */ ttl; /** * Send an RCS video message. * * @param {RCSVideoParams} params - The parameters for creating the video message. * * @example * ```ts * import { RCSVideo } from '@vonage/messages'; * * const { messageUUID } = await messagesClient.send(new RCSVideo({ * to: TO_NUMBER, * from: FROM_NUMBER, * audio: { * url: 'https://example.com/video.mp4', * }, * clientRef: 'my-personal-reference', * })); * * console.log(`Message sent successfully with UUID ${messageUUID}`); * ``` */ constructor(params) { super(params); this.ttl = params?.ttl; } } exports.RCSVideo = RCSVideo; //# sourceMappingURL=RCSVideo.js.map