@playkit-js/playkit-js-ui 0.79.8 → 0.79.9

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.79.8",
3
+ "version": "0.79.9",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "kaltura",
@@ -1,16 +1,5 @@
1
- @mixin bottom-bar-gradient {
2
- position: absolute;
3
- bottom: 0;
4
- left: 0;
5
- width: 100%;
6
- height: 50%;
7
- max-height: 200px;
8
- opacity: 1;
9
- background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
10
- content: "";
11
- }
12
-
13
1
  .player .bottom-bar {
2
+ background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
14
3
  color: #fff;
15
4
  height: auto;
16
5
  width: 100%;
@@ -102,12 +91,6 @@
102
91
  .player.ad-break,
103
92
  .player.menu-active {
104
93
  &:not(.overlay-active) {
105
- :global(.#{$video-filter}) {
106
- &:after {
107
- @include bottom-bar-gradient();
108
- }
109
- }
110
-
111
94
  .bottom-bar {
112
95
  position: relative;
113
96
  opacity: 1;
@@ -142,10 +125,3 @@
142
125
  }
143
126
  }
144
127
  }
145
-
146
- :global(.#{$video-filter}) {
147
- &:after {
148
- transition: #{$hover-animation-time}ms opacity ease-in-out;
149
- opacity: 0;
150
- }
151
- }
@@ -11,6 +11,7 @@ import {withPlayer} from '../player';
11
11
  import {calculateControlsSize, filterControlsByPriority} from './bettom-bar-utils';
12
12
  import {BottomBarRegistryManager, bottomBarRegistryManager} from './bottom-bar-registry-manager';
13
13
 
14
+
14
15
  const LOWER_PRIORITY_CONTROLS: string[][] = [
15
16
  ['PictureInPicture'],
16
17
  ['VrStereo'],
@@ -52,10 +53,10 @@ const COMPONENT_NAME = 'BottomBar';
52
53
  @withEventManager
53
54
  @connect(mapStateToProps, bindActions({...actions, ...bottomBarActions}))
54
55
  class BottomBar extends Component<any, any> {
55
- private bottomBarContainerRef: RefObject<HTMLDivElement> = createRef<HTMLDivElement>();
56
- private presetControls: {[controlName: string]: boolean} = {};
57
- private currentBarWidth: number = 0;
58
- private resizeObserver!: ResizeObserver;
56
+ bottomBarContainerRef: RefObject<HTMLDivElement> = createRef<HTMLDivElement>();
57
+ presetControls: {[controlName: string]: boolean} = {};
58
+ currentBarWidth: number = 0;
59
+ resizeObserver!: ResizeObserver;
59
60
 
60
61
  // eslint-disable-next-line require-jsdoc
61
62
  constructor(props: any) {
@@ -77,18 +78,18 @@ class BottomBar extends Component<any, any> {
77
78
  * @returns {void}
78
79
  * @memberof BottomBar
79
80
  */
80
- public componentDidMount(): void {
81
+ componentDidMount(): void {
81
82
  this.resizeObserver = new ResizeObserver((entry: ResizeObserverEntry[]) => this.onBarWidthChange(entry));
82
83
  this.resizeObserver.observe(this.bottomBarContainerRef.current!);
83
84
  }
84
85
 
85
86
  // eslint-disable-next-line require-jsdoc
86
- public componentWillUnmount(): void {
87
+ componentWillUnmount(): void {
87
88
  this.resizeObserver.disconnect();
88
89
  }
89
90
 
90
91
  // eslint-disable-next-line require-jsdoc
91
- private onBarWidthChange(entry: ResizeObserverEntry[]): void {
92
+ onBarWidthChange(entry: ResizeObserverEntry[]): void {
92
93
  const barWidth = entry[0].contentRect.width;
93
94
  if (barWidth !== this.currentBarWidth) {
94
95
  const activeControls = Object.keys(this.state.activeControls).filter(c => this.state.activeControls[c]);
@@ -100,19 +101,14 @@ class BottomBar extends Component<any, any> {
100
101
  }
101
102
  }
102
103
 
103
- private onToggleControl = (controlName: string, isActive: boolean): void => {
104
+ onToggleControl = (controlName: string, isActive: boolean): void => {
104
105
  if (controlName in this.state.activeControls && this.state.activeControls[controlName] !== isActive) {
105
106
  this.setState(state => ({activeControls: {...state.activeControls, ...{[controlName]: isActive}}}));
106
107
  }
107
108
  };
108
109
 
109
110
  // eslint-disable-next-line require-jsdoc
110
- private filterControls(
111
- currentBarWidth: number,
112
- currentMinBreakPointWidth: number,
113
- currentControlWidth: number,
114
- lowerPriorityControls: string[][]
115
- ): void {
111
+ filterControls(currentBarWidth: number, currentMinBreakPointWidth: number, currentControlWidth: number, lowerPriorityControls: string[][]): void {
116
112
  // move up
117
113
  const isBreak = currentMinBreakPointWidth >= currentBarWidth;
118
114
  if (isBreak) {
@@ -134,7 +130,7 @@ class BottomBar extends Component<any, any> {
134
130
  * @returns {?React$Element} - component element
135
131
  * @memberof BottomBar
136
132
  */
137
- public render(props: any) {
133
+ render(props: any) {
138
134
  const styleClass = [style.bottomBar];
139
135
  if (props.isCasting && props.isPlaybackEnded) {
140
136
  styleClass.push(style.hide);
@@ -145,7 +141,7 @@ class BottomBar extends Component<any, any> {
145
141
  <div className={styleClass.join(' ')}>
146
142
  <div className={style.bottomBarArea}>
147
143
  <PlayerArea shouldUpdate={true} name={'BottomBar'}>
148
- {shouldRenderTimeDisplay && <TimeDisplayPlaybackContainer />}
144
+ {shouldRenderTimeDisplay && <TimeDisplayPlaybackContainer/>}
149
145
  {props.children}
150
146
  </PlayerArea>
151
147
  </div>
@@ -1,4 +1,5 @@
1
1
  .player .top-bar {
2
+ background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
2
3
  color: #fff;
3
4
  visibility: hidden;
4
5
  position: relative;
@@ -72,15 +73,6 @@
72
73
  .player.ad-break,
73
74
  .player.menu-active {
74
75
  &:not(.overlay-active) {
75
- :global(.#{$video-filter}) {
76
- &:before {
77
- @include bottom-bar-gradient();
78
-
79
- top: 0;
80
- background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
81
- }
82
- }
83
-
84
76
  .top-bar {
85
77
  visibility: visible;
86
78
  margin-top: 0;
@@ -127,10 +119,3 @@
127
119
  }
128
120
  }
129
121
  }
130
-
131
- :global(.#{$video-filter}) {
132
- &:before {
133
- transition: #{$hover-animation-time}ms opacity ease-in-out;
134
- opacity: 0;
135
- }
136
- }
@@ -27,7 +27,6 @@ $bottom-bar-bottom-gutter: 4;
27
27
  $gui-gutter: 16;
28
28
  $gui-small-gutter: 8;
29
29
  $blur: 16px;
30
- $video-filter: playkit-video-filter;
31
30
  // *************** Backward Compatibility - Deprecated **************
32
31
  $brand-color: #006bff; // - refs in playkit-ui and related-plugin
33
32
  $white: #ffffff; // - refs in playkit-ui and related-plugin
@@ -73,7 +72,6 @@ $new-live-color: #e12437; // - refs in related-plugin
73
72
  defaultTransitionTime: $default-transition-time;
74
73
  bottomBarMaxHeight: $bottom-bar-max-height;
75
74
  topBarMaxHeight: $top-bar-max-height;
76
- videoFilter: $video-filter;
77
75
  // *************** Backward Compatibility - Deprecated **************
78
76
  brandColor: $brand-color;
79
77
  white: $white;