UNPKG

@playkit-js/playkit-js-ui

Version:

[![Build Status](https://github.com/kaltura/playkit-js-ui/actions/workflows/run_canary_full_flow.yaml/badge.svg)](https://github.com/kaltura/playkit-js-ui/actions/workflows/run_canary_full_flow.yaml) [![code style: prettier](https://img.shields.io/badge/c

17 lines (14 loc) 642 B
import {applyMiddleware} from 'redux'; import {eventDispatcherMiddleware} from './event-dispatcher'; import {loggerMiddleware} from './logger'; import {UIOptionsObject} from '../types'; import {debounceMiddleware} from './debounce-middleware'; /** * Creates the redux middleware. * @param {Object} player - The video player. * @param {UIOptionsObject} config - The UI config. * @return {GenericStoreEnhancer} - The redux middleware. */ const middleware = (player: any, config: UIOptionsObject): any => applyMiddleware<any, any>(loggerMiddleware(config), eventDispatcherMiddleware(player), debounceMiddleware()); export {middleware};