Source: models/production/streams/live.js

define('application/models/production/streams/live', [
    'application/models/production/streams/base',
    'rofl/lib/utils'
], function (
    Base,
    Utils
) {
    'use strict';

    var endpoints = {
        LIVE: '/LIVE/{{contentId}}/{{assetId}}',
        RESTART: '/LIVE/{{contentId}}/{{assetId}}/?time={{startTime}}'
    };

    return Base.extend({

        /**
         * Resolves the endpoint.
         *
         * @param {Object} params - The parameters.
         * @param {string} params.type - The stream type. LIVE, RESTART or VOD.
         * @param {string} params.contentId - The content id.
         * @param {string} params.assetId - The asset id.
         * @returns {string} - The endpoint.
         */
        resolveEndpoint: function resolveEndpoint (params) {

            if (params.type === 'live') {
                this._endpoint = Utils.formatTemplate(endpoints.LIVE, params);
            } else if (params.type === 'restart') {
                this._endpoint = Utils.formatTemplate(endpoints.RESTART, params);
            }

            this._profile = Base.PROFILES.SMOOTH;

            return resolveEndpoint.base.call(this, params);
        }
    });
});