[Glitch] Add pop-out player for audio/video in web UI
port d88a79b456
to glitch-soc
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
committed by
Thibaut Girka
parent
9c88792f0a
commit
8f950e540b
@@ -38,6 +38,7 @@ import trends from './trends';
|
||||
import announcements from './announcements';
|
||||
import markers from './markers';
|
||||
import account_notes from './account_notes';
|
||||
import picture_in_picture from './picture_in_picture';
|
||||
|
||||
const reducers = {
|
||||
announcements,
|
||||
@@ -79,6 +80,7 @@ const reducers = {
|
||||
trends,
|
||||
markers,
|
||||
account_notes,
|
||||
picture_in_picture,
|
||||
};
|
||||
|
||||
export default combineReducers(reducers);
|
||||
|
@@ -0,0 +1,22 @@
|
||||
import { PICTURE_IN_PICTURE_DEPLOY, PICTURE_IN_PICTURE_REMOVE } from 'flavours/glitch/actions/picture_in_picture';
|
||||
|
||||
const initialState = {
|
||||
statusId: null,
|
||||
accountId: null,
|
||||
type: null,
|
||||
src: null,
|
||||
muted: false,
|
||||
volume: 0,
|
||||
currentTime: 0,
|
||||
};
|
||||
|
||||
export default function pictureInPicture(state = initialState, action) {
|
||||
switch(action.type) {
|
||||
case PICTURE_IN_PICTURE_DEPLOY:
|
||||
return { statusId: action.statusId, accountId: action.accountId, type: action.playerType, ...action.props };
|
||||
case PICTURE_IN_PICTURE_REMOVE:
|
||||
return { ...initialState };
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user