Source: model/Transports.js

/* Copyright 2015 Christine S. MacNeill

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by appli cable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/

// Types of transport - v1.0

/**
 * A URN describing the protocol used to send data (video, audio, events etc.)
 * over a network.
 *
 * <p>For example, an RTP Transmitter sending to a multicast group should use the
 * transport 'urn:x-ipstudio:transport:rtp.mcast', but a receiver supporting
 * both unicast and multicast should present the transport
 * 'urn:x-ipstudio:transport:rtp' to indicate its less restrictive state.</p>
 * @readonly
 * @enum {string}
 */
var transports = {
  /** Value <code>urn:x-ipstudio:transport:rtp</code>. */
  rtp: "urn:x-ipstudio:transport:rtp",
  /** Value <code>urn:x-ipstudio:transport:rtp.ucast</code>. */
  rtp_ucast: "urn:x-ipstudio:transport:rtp.ucast",
  /** Value <code>urn:x-ipstudio:transport:rtp.mcast</code>. */
  rtp_mcast: "urn:x-ipstudio:transport:rtp.mcast",
  /** Value <code>urn:x-ipstudio:transport:dash</code>. */
  dash: "urn:x-ipstudio:transport:dash"
};

transports.validTransport = function (t) {
  return t === transports.rtp || t === transports.rtp_ucast ||
    t === transports.rtp_mcast || t === transports.dash;
};

module.exports = Object.freeze(transports);