2018-02-12 17:42:38 +00:00
|
|
|
// @flow
|
|
|
|
|
2017-05-23 18:58:07 +00:00
|
|
|
import {
|
2018-02-06 09:40:16 +00:00
|
|
|
SET_FILMSTRIP_ENABLED,
|
2017-09-01 21:40:05 +00:00
|
|
|
SET_FILMSTRIP_HOVERED,
|
2020-07-15 20:30:44 +00:00
|
|
|
SET_FILMSTRIP_VISIBLE,
|
|
|
|
SET_TILE_VIEW_DIMENSIONS
|
2017-05-23 18:58:07 +00:00
|
|
|
} from './actionTypes';
|
|
|
|
|
2018-02-06 09:40:16 +00:00
|
|
|
/**
|
2018-02-12 17:42:38 +00:00
|
|
|
* Sets whether the filmstrip is enabled.
|
2018-02-06 09:40:16 +00:00
|
|
|
*
|
2018-02-12 17:42:38 +00:00
|
|
|
* @param {boolean} enabled - Whether the filmstrip is enabled.
|
2018-02-06 09:40:16 +00:00
|
|
|
* @returns {{
|
|
|
|
* type: SET_FILMSTRIP_ENABLED,
|
|
|
|
* enabled: boolean
|
|
|
|
* }}
|
|
|
|
*/
|
2018-02-12 17:42:38 +00:00
|
|
|
export function setFilmstripEnabled(enabled: boolean) {
|
2018-02-06 09:40:16 +00:00
|
|
|
return {
|
|
|
|
type: SET_FILMSTRIP_ENABLED,
|
|
|
|
enabled
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-09-01 21:40:05 +00:00
|
|
|
/**
|
2018-02-12 17:42:38 +00:00
|
|
|
* Sets whether the filmstrip is being hovered (over).
|
2017-09-01 21:40:05 +00:00
|
|
|
*
|
2018-02-12 17:42:38 +00:00
|
|
|
* @param {boolean} hovered - Whether the filmstrip is being hovered (over).
|
2017-09-01 21:40:05 +00:00
|
|
|
* @returns {{
|
|
|
|
* type: SET_FILMSTRIP_HOVERED,
|
|
|
|
* hovered: boolean
|
|
|
|
* }}
|
|
|
|
*/
|
2018-02-12 17:42:38 +00:00
|
|
|
export function setFilmstripHovered(hovered: boolean) {
|
2017-09-01 21:40:05 +00:00
|
|
|
return {
|
|
|
|
type: SET_FILMSTRIP_HOVERED,
|
|
|
|
hovered
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-05-23 18:58:07 +00:00
|
|
|
/**
|
2018-02-12 17:42:38 +00:00
|
|
|
* Sets whether the filmstrip is visible.
|
2017-05-23 18:58:07 +00:00
|
|
|
*
|
2018-02-12 17:42:38 +00:00
|
|
|
* @param {boolean} visible - Whether the filmstrip is visible.
|
2017-05-23 18:58:07 +00:00
|
|
|
* @returns {{
|
2018-02-05 21:52:41 +00:00
|
|
|
* type: SET_FILMSTRIP_VISIBLE,
|
2017-05-23 18:58:07 +00:00
|
|
|
* visible: boolean
|
|
|
|
* }}
|
|
|
|
*/
|
2018-02-12 17:42:38 +00:00
|
|
|
export function setFilmstripVisible(visible: boolean) {
|
2017-05-23 18:58:07 +00:00
|
|
|
return {
|
2018-02-05 21:52:41 +00:00
|
|
|
type: SET_FILMSTRIP_VISIBLE,
|
2017-05-23 18:58:07 +00:00
|
|
|
visible
|
|
|
|
};
|
|
|
|
}
|
2020-07-15 20:30:44 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the dimensions of the tile view grid. The action is only partially implemented on native as not all
|
|
|
|
* of the values are currently used. Check the description of {@link SET_TILE_VIEW_DIMENSIONS} for the full set
|
|
|
|
* of properties.
|
|
|
|
*
|
|
|
|
* @param {Object} dimensions - The tile view dimensions.
|
|
|
|
* @param {Object} thumbnailSize - The size of an individual video thumbnail.
|
|
|
|
* @param {number} thumbnailSize.height - The height of an individual video thumbnail.
|
|
|
|
* @param {number} thumbnailSize.width - The width of an individual video thumbnail.
|
|
|
|
* @returns {{
|
|
|
|
* type: SET_TILE_VIEW_DIMENSIONS,
|
|
|
|
* dimensions: Object
|
|
|
|
* }}
|
|
|
|
*/
|
|
|
|
export function setTileViewDimensions({ thumbnailSize }: Object) {
|
|
|
|
return {
|
|
|
|
type: SET_TILE_VIEW_DIMENSIONS,
|
|
|
|
dimensions: {
|
|
|
|
thumbnailSize
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|