@biggive/components 202609171513.0.0 → 202609210628.0.0

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.
@@ -6,12 +6,20 @@ class VideoService {
6
6
  }
7
7
  else if (url.match(/player\.vimeo\.com/g)) {
8
8
  const titlePart = title !== null && title.length > 0 ? ` title="${title}"` : '';
9
- return `<div style="padding:56.25% 0 0 0;position:relative;"><iframe src="${url}?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479&amp;dnt=1" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" style="position:absolute;top:0;left:0;width:100%;height:100%;"${titlePart}></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>`;
9
+ return `<div style="padding:56.25% 0 0 0;position:relative;"><iframe src="${url}?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479&amp;dnt=1" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" style="position:absolute;top:0;left:0;width:100%;height:100%;"${titlePart}></iframe></div>`;
10
10
  }
11
11
  else {
12
12
  return `<video controls src="${url}"></video>`;
13
13
  }
14
14
  }
15
+ static async initializeVimeoPlayer(container) {
16
+ const iframe = container.querySelector('iframe[src*="player.vimeo.com"]');
17
+ if (iframe !== null && iframe.dataset.vimeoPlayerInitialized !== 'true') {
18
+ const { default: VimeoPlayer } = await import('./player.es-90i3G9RC.js');
19
+ new VimeoPlayer(iframe);
20
+ iframe.dataset.vimeoPlayerInitialized = 'true';
21
+ }
22
+ }
15
23
  /**
16
24
  * If the user supplied a URL to view a page video in a page on youtube or vimeo,
17
25
  * we replace it with the URL to the related embedabble iframe.
@@ -1,4 +1,5 @@
1
1
  export declare class BiggiveVideo {
2
+ host: HTMLBiggiveVideoElement;
2
3
  /**
3
4
  * Space above component
4
5
  */
@@ -12,4 +13,5 @@ export declare class BiggiveVideo {
12
13
  */
13
14
  videoUrl: string;
14
15
  render(): any;
16
+ componentDidRender(): void;
15
17
  }
@@ -1,4 +1,5 @@
1
1
  export declare class BiggiveVideoFeature {
2
+ host: HTMLBiggiveVideoFeatureElement;
2
3
  /**
3
4
  * Space above component
4
5
  */
@@ -52,4 +53,5 @@ export declare class BiggiveVideoFeature {
52
53
  */
53
54
  buttonColourScheme: string;
54
55
  render(): any;
56
+ componentDidRender(): void;
55
57
  }
@@ -1,5 +1,6 @@
1
1
  export declare class VideoService {
2
2
  static getEmbedHtml(url: string, title: string | null): string;
3
+ static initializeVimeoPlayer(container: HTMLElement): Promise<void>;
3
4
  /**
4
5
  * If the user supplied a URL to view a page video in a page on youtube or vimeo,
5
6
  * we replace it with the URL to the related embedabble iframe.