UNPKG

@fnlb-project/stanza

Version:

Modern XMPP in the browser, with a JSON API

32 lines (31 loc) 1.1 kB
"use strict"; // ==================================================================== // XEP-0221: Data Forms Media Element // -------------------------------------------------------------------- // Source: https://xmpp.org/extensions/xep-0221.html // Version: 1.0 (2008-09-03) // ==================================================================== Object.defineProperty(exports, "__esModule", { value: true }); const jxt_1 = require("../jxt"); const Namespaces_1 = require("../Namespaces"); const Protocol = [ { element: 'media', fields: { height: (0, jxt_1.integerAttribute)('height'), width: (0, jxt_1.integerAttribute)('width') }, namespace: Namespaces_1.NS_DATAFORM_MEDIA, path: 'dataform.fields.media' }, { aliases: [{ multiple: true, path: 'dataform.fields.media.sources' }], element: 'uri', fields: { mediaType: (0, jxt_1.attribute)('type'), uri: (0, jxt_1.text)() }, namespace: Namespaces_1.NS_DATAFORM_MEDIA } ]; exports.default = Protocol;