2018-05-16 14:00:16 +00:00
|
|
|
import { RECORDING_SESSION_UPDATED } from './actionTypes';
|
2017-08-25 16:45:30 +00:00
|
|
|
|
|
|
|
/**
|
2018-05-16 14:00:16 +00:00
|
|
|
* Updates the known state for a given recording session.
|
2017-08-25 16:45:30 +00:00
|
|
|
*
|
2018-05-16 14:00:16 +00:00
|
|
|
* @param {Object} session - The new state to merge with the existing state in
|
|
|
|
* redux.
|
2017-08-25 16:45:30 +00:00
|
|
|
* @returns {{
|
2018-05-16 14:00:16 +00:00
|
|
|
* type: RECORDING_SESSION_UPDATED,
|
|
|
|
* sessionData: Object
|
2017-08-25 16:45:30 +00:00
|
|
|
* }}
|
|
|
|
*/
|
2018-05-16 14:00:16 +00:00
|
|
|
export function updateRecordingSessionData(session) {
|
2017-08-25 16:45:30 +00:00
|
|
|
return {
|
2018-05-16 14:00:16 +00:00
|
|
|
type: RECORDING_SESSION_UPDATED,
|
|
|
|
sessionData: {
|
|
|
|
error: session.getError(),
|
|
|
|
id: session.getID(),
|
|
|
|
liveStreamViewURL: session.getLiveStreamViewURL(),
|
|
|
|
mode: session.getMode(),
|
|
|
|
status: session.getStatus()
|
|
|
|
}
|
2017-08-25 16:45:30 +00:00
|
|
|
};
|
|
|
|
}
|