diff options
author | ThibG <thib@sitedethib.com> | 2020-10-26 22:54:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 22:54:50 +0100 |
commit | c762ca49dc924ce32b512c2aece4d7d1e0229b5c (patch) | |
tree | 3f24094f0886e1c437230a1125fbc49dd5cf65a6 /app/javascript/flavours/glitch/actions | |
parent | 9c88792f0a60f2b383f0d3919475403e1e244faf (diff) | |
parent | 49ee69f75f24ef13f36cb177d5278fcc3a5f3d37 (diff) |
Merge pull request #1443 from ThibG/glitch-soc/features/upstream-pop-in
Port upstream's pop-in player to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/actions')
-rw-r--r-- | app/javascript/flavours/glitch/actions/picture_in_picture.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/actions/picture_in_picture.js b/app/javascript/flavours/glitch/actions/picture_in_picture.js new file mode 100644 index 000000000..4085cb59e --- /dev/null +++ b/app/javascript/flavours/glitch/actions/picture_in_picture.js @@ -0,0 +1,38 @@ +// @ts-check + +export const PICTURE_IN_PICTURE_DEPLOY = 'PICTURE_IN_PICTURE_DEPLOY'; +export const PICTURE_IN_PICTURE_REMOVE = 'PICTURE_IN_PICTURE_REMOVE'; + +/** + * @typedef MediaProps + * @property {string} src + * @property {boolean} muted + * @property {number} volume + * @property {number} currentTime + * @property {string} poster + * @property {string} backgroundColor + * @property {string} foregroundColor + * @property {string} accentColor + */ + +/** + * @param {string} statusId + * @param {string} accountId + * @param {string} playerType + * @param {MediaProps} props + * @return {object} + */ +export const deployPictureInPicture = (statusId, accountId, playerType, props) => ({ + type: PICTURE_IN_PICTURE_DEPLOY, + statusId, + accountId, + playerType, + props, +}); + +/* + * @return {object} + */ +export const removePictureInPicture = () => ({ + type: PICTURE_IN_PICTURE_REMOVE, +}); |