define('application/models/production/streams/recording', [
'application/models/production/streams/base',
'rofl/lib/utils'
], function (
Base,
Utils
) {
'use strict';
var endpoints = {
RECORDING: '/RECORDING/{{contentId}}/{{assetId}}/?startDeltaTime={{startTime}}&'
};
return Base.extend({
/**
*
* @param {Object} params - Stream params.
* @param {Object} params.data - The content's data to request the url.
* @returns {string} - The endpoint.
*/
resolveEndpoint: function resolveEndpoint (params) {
var contentData = params.data || {};
this._endpoint = Utils.formatTemplate(endpoints.RECORDING, {
contentId: contentData.getRecordingId(),
assetId: contentData.getAssetId(),
startTime: new Date(contentData.getStartDeltaTime()).getTime()
});
return resolveEndpoint.base.call(this, params);
}
});
});