UNPKG

@firebolt-js/manage-sdk

Version:
323 lines (321 loc) 6.58 kB
/* * Copyright 2021 Comcast Cable Communications Management, LLC * * 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 applicable 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. * * SPDX-License-Identifier: Apache-2.0 */ import MockProps from '../Prop/MockProps.mjs' export default { enabled: function (params) { return MockProps.mock( 'ClosedCaptions', 'enabled', params, undefined, 0, true, ) }, fontFamily: function (params) { return MockProps.mock( 'ClosedCaptions', 'fontFamily', params, undefined, 0, 'monospaced_sanserif', ) }, fontSize: function (params) { return MockProps.mock('ClosedCaptions', 'fontSize', params, undefined, 0, 1) }, fontColor: function (params) { return MockProps.mock( 'ClosedCaptions', 'fontColor', params, undefined, 0, '#ffffff', ) }, fontEdge: function (params) { return MockProps.mock( 'ClosedCaptions', 'fontEdge', params, undefined, 0, 'none', ) }, fontEdgeColor: function (params) { return MockProps.mock( 'ClosedCaptions', 'fontEdgeColor', params, undefined, 0, '#000000', ) }, fontOpacity: function (params) { return MockProps.mock( 'ClosedCaptions', 'fontOpacity', params, undefined, 0, 99, ) }, backgroundColor: function (params) { return MockProps.mock( 'ClosedCaptions', 'backgroundColor', params, undefined, 0, '#000000', ) }, backgroundOpacity: function (params) { return MockProps.mock( 'ClosedCaptions', 'backgroundOpacity', params, undefined, 0, 99, ) }, textAlign: function (params) { return MockProps.mock( 'ClosedCaptions', 'textAlign', params, undefined, 0, 'center', ) }, textAlignVertical: function (params) { return MockProps.mock( 'ClosedCaptions', 'textAlignVertical', params, undefined, 0, 'middle', ) }, windowColor: function (params) { return MockProps.mock( 'ClosedCaptions', 'windowColor', params, undefined, 0, '#000000', ) }, windowOpacity: function (params) { return MockProps.mock( 'ClosedCaptions', 'windowOpacity', params, undefined, 0, 99, ) }, preferredLanguages: function (params) { return MockProps.mock( 'ClosedCaptions', 'preferredLanguages', params, undefined, 0, ['spa', 'eng'], ) }, setEnabled: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'enabled', params, callbackOrValue, 0, null, ) }, setFontFamily: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'fontFamily', params, callbackOrValue, 0, null, ) }, setFontSize: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'fontSize', params, callbackOrValue, 0, null, ) }, setFontColor: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'fontColor', params, callbackOrValue, 0, null, ) }, setFontEdge: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'fontEdge', params, callbackOrValue, 0, null, ) }, setFontEdgeColor: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'fontEdgeColor', params, callbackOrValue, 0, null, ) }, setFontOpacity: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'fontOpacity', params, callbackOrValue, 0, null, ) }, setBackgroundColor: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'backgroundColor', params, callbackOrValue, 0, null, ) }, setBackgroundOpacity: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'backgroundOpacity', params, callbackOrValue, 0, null, ) }, setTextAlign: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'textAlign', params, callbackOrValue, 0, null, ) }, setTextAlignVertical: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'textAlignVertical', params, callbackOrValue, 0, null, ) }, setWindowColor: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'windowColor', params, callbackOrValue, 0, null, ) }, setWindowOpacity: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'windowOpacity', params, callbackOrValue, 0, null, ) }, setPreferredLanguages: function (params) { const callbackOrValue = params.value delete params.value return MockProps.mock( 'ClosedCaptions', 'preferredLanguages', params, callbackOrValue, 0, null, ) }, }