You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
593 B

  1. import { PICTURE_IN_PICTURE_DEPLOY, PICTURE_IN_PICTURE_REMOVE } from 'mastodon/actions/picture_in_picture';
  2. const initialState = {
  3. statusId: null,
  4. accountId: null,
  5. type: null,
  6. src: null,
  7. muted: false,
  8. volume: 0,
  9. currentTime: 0,
  10. };
  11. export default function pictureInPicture(state = initialState, action) {
  12. switch(action.type) {
  13. case PICTURE_IN_PICTURE_DEPLOY:
  14. return { statusId: action.statusId, accountId: action.accountId, type: action.playerType, ...action.props };
  15. case PICTURE_IN_PICTURE_REMOVE:
  16. return { ...initialState };
  17. default:
  18. return state;
  19. }
  20. };