@playkit-js/hotspots 3.1.10 → 3.1.11

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/hotspots",
3
- "version": "3.1.10",
3
+ "version": "3.1.11",
4
4
  "private": false,
5
5
  "bugs": {
6
6
  "url": "https://github.com/kaltura/playkit-js-hotspots/issues"
@@ -45,6 +45,9 @@ const defaultProps = {
45
45
  };
46
46
 
47
47
  function prepareUrl(url: string): string {
48
+ if (url.startsWith('mailto:')) {
49
+ return url;
50
+ }
48
51
  if (!url.match(/^https?:\/\//i)) {
49
52
  url = 'http://' + url;
50
53
  }
@@ -176,7 +179,7 @@ export default class Hotspot extends Component<Props, State> {
176
179
 
177
180
  document.body.removeChild(textEl);
178
181
  return fontSizeToUse;
179
- }
182
+ };
180
183
 
181
184
  createDivElement = (): HTMLDivElement => {
182
185
  let divEl = document.createElement('div');
@@ -187,7 +190,7 @@ export default class Hotspot extends Component<Props, State> {
187
190
  divEl.style.wordBreak = 'break-all';
188
191
  divEl.style.textRendering = 'geometricPrecision';
189
192
  return divEl;
190
- }
193
+ };
191
194
 
192
195
  render() {
193
196
  const {hotspot} = this.props;