@playkit-js/playkit-js-ui 0.83.0 → 0.83.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playkit-js/playkit-js-ui",
3
- "version": "0.83.0",
3
+ "version": "0.83.1",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "kaltura",
@@ -103,12 +103,19 @@ class UnmuteIndication extends Component<any, any> {
103
103
  _setValidSeconds(): void {
104
104
  const isValid = (value: any): boolean => {
105
105
  return (typeof value === 'number' && value >= 0);
106
+ };
107
+ const { unmuteTextSeconds, unmuteButtonSeconds } = this.props;
108
+ const isTextSecondsValid = isValid(unmuteTextSeconds);
109
+ const isButtonSecondsValid = isValid(unmuteButtonSeconds);
110
+
111
+ if (isTextSecondsValid) {
112
+ this._iconOnlySeconds = unmuteTextSeconds * 1000;
106
113
  }
107
- if (isValid(this.props.unmuteTextSeconds)) {
108
- this._iconOnlySeconds = this.props.unmuteTextSeconds * 1000;
114
+ if (isButtonSecondsValid) {
115
+ this._buttonRemoveSeconds = unmuteButtonSeconds * 1000;
109
116
  }
110
- if (isValid(this.props.unmuteButtonSeconds)) {
111
- this._buttonRemoveSeconds = this.props.unmuteButtonSeconds * 1000;
117
+ if (isButtonSecondsValid && isTextSecondsValid && unmuteTextSeconds > unmuteButtonSeconds) {
118
+ this._buttonRemoveSeconds = unmuteTextSeconds * 1000;
112
119
  }
113
120
  }
114
121