Skip to content

Commit

Permalink
fix(FEC-7971): change media doesn't work after a critical error (#249)
Browse files Browse the repository at this point in the history
revert the previous fix for this issue: #191
fix by getting config for the engine see kaltura/kaltura-player-js#135
  • Loading branch information
yairans committed Jun 26, 2018
1 parent c285fe2 commit f7a6966
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/components/engine-connector/engine-connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class EngineConnector extends BaseComponent {
});

this.player.addEventListener(this.player.Event.SOURCE_SELECTED, () => {
this.props.updateHasError(false);
this.props.updateIsVr(this.player.isVr());
});

Expand Down
11 changes: 11 additions & 0 deletions src/reducers/engine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
//@flow
import {getComponentStateFromComponentConfig, getComponentStateFromConfig} from "../utils/component-config";
import {types as configReducerTypes} from "./config";

const component = 'engine';

export const types = {
UPDATE_PLAYER_STATE: 'engine/UPDATE_PLAYER_STATE',
UPDATE_IS_PLAYING: 'engine/UPDATE_IS_PLAYING',
Expand Down Expand Up @@ -66,6 +71,12 @@ export const initialState = {

export default (state: Object = initialState, action: Object) => {
switch (action.type) {
case configReducerTypes.UPDATE:
return getComponentStateFromConfig(component, state, action);

case configReducerTypes.UPDATE_COMPONENT:
return getComponentStateFromComponentConfig(component, state, action);

case types.UPDATE_ERROR:
return {
...state,
Expand Down

0 comments on commit f7a6966

Please sign in to comment.