@playkit-js/playkit-js-ui 0.83.6 → 0.83.7
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
|
@@ -85,15 +85,16 @@ class Watermark extends Component<any, any> {
|
|
|
85
85
|
this.onPlayerResize();
|
|
86
86
|
});
|
|
87
87
|
this._handleWatermarkUrl();
|
|
88
|
+
this._loadImageDimension();
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
/**
|
|
91
|
-
* After component updated,
|
|
92
|
+
* After component updated, reload image dimensions only when the image URL changes
|
|
92
93
|
* @method componentDidUpdate
|
|
93
94
|
* @returns {void}
|
|
94
95
|
* @memberof Watermark
|
|
95
96
|
*/
|
|
96
|
-
componentDidUpdate(prevProps: any): void {
|
|
97
|
+
componentDidUpdate(prevProps: any, prevState: any): void {
|
|
97
98
|
const dataProps = this.props.componentData;
|
|
98
99
|
const prevDataProps = prevProps.componentData;
|
|
99
100
|
if (prevDataProps !== dataProps) {
|
|
@@ -102,7 +103,11 @@ class Watermark extends Component<any, any> {
|
|
|
102
103
|
if (dataProps.watermark && prevDataProps.watermark !== dataProps.watermark) {
|
|
103
104
|
this.setState({entryUrl: dataProps.watermark});
|
|
104
105
|
}
|
|
105
|
-
|
|
106
|
+
const prevImgUrl = prevState.entryUrl || prevProps.config.img;
|
|
107
|
+
const currImgUrl = this.state.entryUrl || this.props.config.img;
|
|
108
|
+
if (currImgUrl !== prevImgUrl) {
|
|
109
|
+
this._loadImageDimension();
|
|
110
|
+
}
|
|
106
111
|
}
|
|
107
112
|
/**
|
|
108
113
|
* handles the watermark url
|