@glomex/integration-web-component 1.1321.1 → 1.1323.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.
Files changed (2) hide show
  1. package/build/index.d.ts +298 -98
  2. package/package.json +3 -3
package/build/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import type { ContentStopReason as ContentStopReason_2 } from 'src/constants';
2
1
 
3
2
 
4
3
  export declare interface Ad {
@@ -532,86 +531,182 @@ export declare class IntegrationElement extends HTMLElement implements Integrati
532
531
  * ```
533
532
  */
534
533
  export declare interface IntegrationElementEventMap {
535
- /** @eventProperty */
536
- ready: CustomEvent<unknown>;
537
- /** @eventProperty */
538
- integrationabort: CustomEvent<unknown & {
534
+ /**
535
+ * @inheritdoc IntegrationEvent.READY
536
+ * @eventProperty
537
+ */
538
+ [IntegrationEvent.READY]: CustomEvent<void>;
539
+ /**
540
+ * @inheritdoc IntegrationEvent.INTEGRATION_ABORT
541
+ * @eventProperty
542
+ */
543
+ [IntegrationEvent.INTEGRATION_ABORT]: CustomEvent<{
539
544
  error: Error;
540
545
  }>;
541
- /** @eventProperty */
542
- integrationadavailable: CustomEvent<unknown>;
543
- /** @eventProperty */
544
- integrationpassback: CustomEvent<unknown & {
546
+ /**
547
+ * @inheritdoc IntegrationEvent.INTEGRATION_AD_AVAILABLE
548
+ * @eventProperty
549
+ */
550
+ [IntegrationEvent.INTEGRATION_AD_AVAILABLE]: CustomEvent<void>;
551
+ /**
552
+ * @inheritdoc IntegrationEvent.INTEGRATION_PASSBACK
553
+ * @eventProperty
554
+ */
555
+ [IntegrationEvent.INTEGRATION_PASSBACK]: CustomEvent<{
545
556
  reason: string;
546
557
  }>;
547
- /** @eventProperty */
548
- userupdateconsent: CustomEvent<unknown>;
549
- /** @eventProperty */
550
- playlistupdate: CustomEvent<unknown>;
551
- /** @eventProperty */
552
- playersetpresentationmode: CustomEvent<unknown & {
558
+ /**
559
+ * @inheritdoc IntegrationEvent.USER_UPDATE_CONSENT
560
+ * @eventProperty
561
+ */
562
+ [IntegrationEvent.USER_UPDATE_CONSENT]: CustomEvent<void>;
563
+ /**
564
+ * @inheritdoc IntegrationEvent.PLAYLIST_UPDATE
565
+ * @eventProperty
566
+ */
567
+ [IntegrationEvent.PLAYLIST_UPDATE]: CustomEvent<void>;
568
+ /**
569
+ * @inheritdoc IntegrationEvent.PLAYER_SET_PRESENTATION_MODE
570
+ * @eventProperty
571
+ */
572
+ [IntegrationEvent.PLAYER_SET_PRESENTATION_MODE]: CustomEvent<{
553
573
  mode: PresentationMode;
554
574
  }>;
555
- /** @eventProperty */
556
- contentselect: CustomEvent<unknown & {
575
+ /**
576
+ * @inheritdoc IntegrationEvent.CONTENT_SELECT
577
+ * @eventProperty
578
+ */
579
+ [IntegrationEvent.CONTENT_SELECT]: CustomEvent<{
557
580
  sessionId: string;
558
581
  source: ContentSource;
559
582
  }>;
560
- /** @eventProperty */
561
- contentstart: CustomEvent<unknown>;
562
- /** @eventProperty */
563
- contentimpression: CustomEvent<unknown>;
564
- /** @eventProperty */
565
- contentbufferingstart: CustomEvent<unknown>;
566
- /** @eventProperty */
567
- contentbufferingend: CustomEvent<unknown>;
568
- /** @eventProperty */
569
- contentstop: CustomEvent<unknown & {
570
- reason: ContentStopReason_2;
583
+ /**
584
+ * @inheritdoc IntegrationEvent.CONTENT_START
585
+ * @eventProperty
586
+ */
587
+ [IntegrationEvent.CONTENT_START]: CustomEvent<void>;
588
+ /**
589
+ * @inheritdoc IntegrationEvent.CONTENT_IMPRESSION
590
+ * @eventProperty
591
+ */
592
+ [IntegrationEvent.CONTENT_IMPRESSION]: CustomEvent<void>;
593
+ /**
594
+ * @inheritdoc IntegrationEvent.CONTENT_BUFFERING_START
595
+ * @eventProperty
596
+ */
597
+ [IntegrationEvent.CONTENT_BUFFERING_START]: CustomEvent<void>;
598
+ /**
599
+ * @inheritdoc IntegrationEvent.CONTENT_BUFFERING_END
600
+ * @eventProperty
601
+ */
602
+ [IntegrationEvent.CONTENT_BUFFERING_END]: CustomEvent<void>;
603
+ /**
604
+ * @inheritdoc IntegrationEvent.CONTENT_STOP
605
+ * @eventProperty
606
+ */
607
+ [IntegrationEvent.CONTENT_STOP]: CustomEvent<{
608
+ reason: ContentStopReason;
571
609
  }>;
572
- /** @eventProperty */
573
- contenterror: CustomEvent<unknown & {
610
+ /**
611
+ * @inheritdoc IntegrationEvent.CONTENT_ERROR
612
+ * @eventProperty
613
+ */
614
+ [IntegrationEvent.CONTENT_ERROR]: CustomEvent<{
574
615
  error: MediaError_2 | MediaItemError;
575
616
  }>;
576
- /** @eventProperty */
577
- contentmarkerreached: CustomEvent<unknown & {
617
+ /**
618
+ * @inheritdoc IntegrationEvent.CONTENT_MARKER_REACHED
619
+ * @eventProperty
620
+ */
621
+ [IntegrationEvent.CONTENT_MARKER_REACHED]: CustomEvent<{
578
622
  markerName: string;
579
623
  markerData: unknown;
580
624
  }>;
581
- /** @eventProperty */
582
- timeupdate: CustomEvent<unknown> | HTMLElementEventMap['timeupdate'];
583
- /** @eventProperty */
584
- seeking: CustomEvent<unknown> | HTMLElementEventMap['seeking'];
585
- /** @eventProperty */
586
- seeked: CustomEvent<unknown> | HTMLElementEventMap['seeked'];
587
- /** @eventProperty */
588
- play: CustomEvent<unknown> | HTMLElementEventMap['play'];
589
- /** @eventProperty */
590
- pause: CustomEvent<unknown> | HTMLElementEventMap['pause'];
591
- /** @eventProperty */
592
- volumechange: CustomEvent<unknown> | HTMLElementEventMap['volumechange'];
593
- /** @eventProperty */
594
- ended: CustomEvent<unknown> | HTMLElementEventMap['ended'];
595
- /** @eventProperty */
596
- adimpression: CustomEvent<unknown>;
597
- /** @eventProperty */
598
- adbufferingstart: CustomEvent<unknown>;
599
- /** @eventProperty */
600
- adbufferingend: CustomEvent<unknown>;
601
- /** @eventProperty */
602
- adtimeupdate: CustomEvent<unknown>;
603
- /** @eventProperty */
604
- advolumechange: CustomEvent<unknown>;
605
- /** @eventProperty */
606
- adpaused: CustomEvent<unknown>;
607
- /** @eventProperty */
608
- adresumed: CustomEvent<unknown>;
609
- /** @eventProperty */
610
- adclick: CustomEvent<unknown>;
611
- /** @eventProperty */
612
- adskipped: CustomEvent<unknown>;
613
- /** @eventProperty */
614
- adcomplete: CustomEvent<unknown>;
625
+ /**
626
+ * @inheritdoc IntegrationEvent.CONTENT_TIME_UPDATE
627
+ * @eventProperty
628
+ */
629
+ [IntegrationEvent.CONTENT_TIME_UPDATE]: CustomEvent<void> | HTMLElementEventMap['timeupdate'];
630
+ /**
631
+ * @inheritdoc IntegrationEvent.CONTENT_SEEKING
632
+ * @eventProperty
633
+ */
634
+ [IntegrationEvent.CONTENT_SEEKING]: CustomEvent<void> | HTMLElementEventMap['seeking'];
635
+ /**
636
+ * @inheritdoc IntegrationEvent.CONTENT_SEEKED
637
+ * @eventProperty
638
+ */
639
+ [IntegrationEvent.CONTENT_SEEKED]: CustomEvent<void> | HTMLElementEventMap['seeked'];
640
+ /**
641
+ * @inheritdoc IntegrationEvent.CONTENT_PLAY
642
+ * @eventProperty
643
+ */
644
+ [IntegrationEvent.CONTENT_PLAY]: CustomEvent<void> | HTMLElementEventMap['play'];
645
+ /**
646
+ * @inheritdoc IntegrationEvent.CONTENT_PAUSE
647
+ * @eventProperty
648
+ */
649
+ [IntegrationEvent.CONTENT_PAUSE]: CustomEvent<void> | HTMLElementEventMap['pause'];
650
+ /**
651
+ * @inheritdoc IntegrationEvent.CONTENT_VOLUME_CHANGE
652
+ * @eventProperty
653
+ */
654
+ [IntegrationEvent.CONTENT_VOLUME_CHANGE]: CustomEvent<void> | HTMLElementEventMap['volumechange'];
655
+ /**
656
+ * @inheritdoc IntegrationEvent.CONTENT_ENDED
657
+ * @eventProperty
658
+ */
659
+ [IntegrationEvent.CONTENT_ENDED]: CustomEvent<void> | HTMLElementEventMap['ended'];
660
+ /**
661
+ * @inheritdoc IntegrationEvent.AD_IMPRESSION
662
+ * @eventProperty
663
+ */
664
+ [IntegrationEvent.AD_IMPRESSION]: CustomEvent<void>;
665
+ /**
666
+ * @inheritdoc IntegrationEvent.AD_BUFFERING_START
667
+ * @eventProperty
668
+ */
669
+ [IntegrationEvent.AD_BUFFERING_START]: CustomEvent<void>;
670
+ /**
671
+ * @inheritdoc IntegrationEvent.AD_BUFFERING_END
672
+ * @eventProperty
673
+ */
674
+ [IntegrationEvent.AD_BUFFERING_END]: CustomEvent<void>;
675
+ /**
676
+ * @inheritdoc IntegrationEvent.AD_TIME_UPDATE
677
+ * @eventProperty
678
+ */
679
+ [IntegrationEvent.AD_TIME_UPDATE]: CustomEvent<void>;
680
+ /**
681
+ * @inheritdoc IntegrationEvent.AD_VOLUME_CHANGE
682
+ * @eventProperty
683
+ */
684
+ [IntegrationEvent.AD_VOLUME_CHANGE]: CustomEvent<void>;
685
+ /**
686
+ * @inheritdoc IntegrationEvent.AD_PAUSED
687
+ * @eventProperty
688
+ */
689
+ [IntegrationEvent.AD_PAUSED]: CustomEvent<void>;
690
+ /**
691
+ * @inheritdoc IntegrationEvent.AD_RESUMED
692
+ * @eventProperty
693
+ */
694
+ [IntegrationEvent.AD_RESUMED]: CustomEvent<void>;
695
+ /**
696
+ * @inheritdoc IntegrationEvent.AD_CLICK
697
+ * @eventProperty
698
+ */
699
+ [IntegrationEvent.AD_CLICK]: CustomEvent<void>;
700
+ /**
701
+ * @inheritdoc IntegrationEvent.AD_SKIPPED
702
+ * @eventProperty
703
+ */
704
+ [IntegrationEvent.AD_SKIPPED]: CustomEvent<void>;
705
+ /**
706
+ * @inheritdoc IntegrationEvent.AD_COMPLETE
707
+ * @eventProperty
708
+ */
709
+ [IntegrationEvent.AD_COMPLETE]: CustomEvent<void>;
615
710
  }
616
711
 
617
712
  /**
@@ -620,69 +715,174 @@ export declare interface IntegrationElementEventMap {
620
715
  * @see {@link IntegrationElementEventMap} for a full list of event types and their payloads
621
716
  */
622
717
  export declare enum IntegrationEvent {
623
- /** @eventProperty */
718
+ /**
719
+ * When the integration got initialized.
720
+ * @eventProperty
721
+ */
624
722
  READY = "ready",
625
- /** @eventProperty */
723
+ /**
724
+ * When the integration got aborted because of a configuration / authorization error.
725
+ * It is not triggered when the content errors.
726
+ * @eventProperty
727
+ */
626
728
  INTEGRATION_ABORT = "integrationabort",
627
- /** @eventProperty */
729
+ /**
730
+ * When an ad is available.
731
+ * @eventProperty
732
+ */
628
733
  INTEGRATION_AD_AVAILABLE = "integrationadavailable",
629
- /** @eventProperty */
734
+ /**
735
+ * When a passback is triggered because of no content or no ad. Only available when {@link IntegrationElement#passback} is set.
736
+ * @eventProperty
737
+ */
630
738
  INTEGRATION_PASSBACK = "integrationpassback",
631
- /** @eventProperty */
739
+ /**
740
+ * When the user's consent got updated.
741
+ * See {@link IntegrationElement#consent} to get the current consent.
742
+ * @eventProperty
743
+ */
632
744
  USER_UPDATE_CONSENT = "userupdateconsent",
633
- /** @eventProperty */
745
+ /**
746
+ * When the playlist is updated (e.g. new media item got added). See {@link IntegrationElement#playlist} to get the current playlist items.
747
+ * @eventProperty
748
+ */
634
749
  PLAYLIST_UPDATE = "playlistupdate",
635
- /** @eventProperty */
750
+ /**
751
+ * When the player's presentation mode got changed.
752
+ * @eventProperty
753
+ */
636
754
  PLAYER_SET_PRESENTATION_MODE = "playersetpresentationmode",
637
- /** @eventProperty */
755
+ /**
756
+ * When content got selected. See {@link IntegrationElement#content} to get the current content.
757
+ * @eventProperty
758
+ */
638
759
  CONTENT_SELECT = "contentselect",
639
- /** @eventProperty */
760
+ /**
761
+ * When content started initially (e.g. before ad break).
762
+ * @eventProperty
763
+ */
640
764
  CONTENT_START = "contentstart",
641
- /** @eventProperty */
765
+ /**
766
+ * When the first frame of the content got played back.
767
+ * @eventProperty
768
+ */
642
769
  CONTENT_IMPRESSION = "contentimpression",
643
- /** @eventProperty */
770
+ /**
771
+ * When content buffering started.
772
+ * @eventProperty
773
+ */
644
774
  CONTENT_BUFFERING_START = "contentbufferingstart",
645
- /** @eventProperty */
775
+ /**
776
+ * When content buffering ended.
777
+ * @eventProperty
778
+ */
646
779
  CONTENT_BUFFERING_END = "contentbufferingend",
647
- /** @eventProperty */
780
+ /**
781
+ * When content got stopped (e.g. loading another content or it ended normally). The reason is provided in the payload.
782
+ * It gets triggered after a potential postroll.
783
+ * @eventProperty
784
+ */
648
785
  CONTENT_STOP = "contentstop",
649
- /** @eventProperty */
786
+ /**
787
+ * When a content error occurs upon loading or playing the content.
788
+ * @eventProperty
789
+ */
650
790
  CONTENT_ERROR = "contenterror",
651
- /** @eventProperty */
791
+ /**
792
+ * When a marker is reached. See {@link MediaItem#markers} how to define own markers.
793
+ * @eventProperty
794
+ */
652
795
  CONTENT_MARKER_REACHED = "contentmarkerreached",
653
- /** @eventProperty */
796
+ /**
797
+ * When the content's time updates. This is equal to {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/timeupdate_event HTMLMediaElement.timeupdate}.
798
+ * See {@link IntegrationElement#currentTime} to get the current time.
799
+ * @eventProperty
800
+ */
654
801
  CONTENT_TIME_UPDATE = "timeupdate",
655
- /** @eventProperty */
802
+ /**
803
+ * When the content is seeking. This is equal to {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeking_event HTMLMediaElement.seeking}.
804
+ * See {@link IntegrationElement#seeking} to get the current seeking state.
805
+ * @eventProperty
806
+ */
656
807
  CONTENT_SEEKING = "seeking",
657
- /** @eventProperty */
808
+ /**
809
+ * When the content has seeked. This is equal to {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeked_event HTMLMediaElement.seeked}.
810
+ * @eventProperty
811
+ */
658
812
  CONTENT_SEEKED = "seeked",
659
- /** @eventProperty */
813
+ /**
814
+ * When the content switches from paused to playing. This is equal to {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play_event HTMLMediaElement.play}.
815
+ * @eventProperty
816
+ */
660
817
  CONTENT_PLAY = "play",
661
- /** @eventProperty */
818
+ /**
819
+ * When the content switches from playing to paused. This is equal to {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause_event HTMLMediaElement.pause}.
820
+ * @eventProperty
821
+ */
662
822
  CONTENT_PAUSE = "pause",
663
- /** @eventProperty */
823
+ /**
824
+ * When the content's volume changes. This is equal to {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volumechange_event HTMLMediaElement.volumechange}.
825
+ * See {@link IntegrationElement#volume} to get the current volume.
826
+ * @eventProperty
827
+ */
664
828
  CONTENT_VOLUME_CHANGE = "volumechange",
665
- /** @eventProperty */
829
+ /**
830
+ * When the content reached its end. This is equal to {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended_event HTMLMediaElement.ended}.
831
+ * See {@link IntegrationElement#ended} to check if the content ended.
832
+ * @eventProperty
833
+ */
666
834
  CONTENT_ENDED = "ended",
667
- /** @eventProperty */
835
+ /**
836
+ * When the first frame of the ad got played back.
837
+ * See {@link IntegrationElement#currentAd} to get the current ad.
838
+ * @eventProperty
839
+ */
668
840
  AD_IMPRESSION = "adimpression",
669
- /** @eventProperty */
841
+ /**
842
+ * When the ad started buffering.
843
+ * @eventProperty
844
+ */
670
845
  AD_BUFFERING_START = "adbufferingstart",
671
- /** @eventProperty */
846
+ /**
847
+ * When the ad stopped buffering.
848
+ * @eventProperty
849
+ */
672
850
  AD_BUFFERING_END = "adbufferingend",
673
- /** @eventProperty */
851
+ /**
852
+ * When the ad's time updates.
853
+ * @eventProperty
854
+ */
674
855
  AD_TIME_UPDATE = "adtimeupdate",
675
- /** @eventProperty */
856
+ /**
857
+ * When the ad's volume changes.
858
+ * See {@link IntegrationElement#adVolume} to get the current volume.
859
+ * @eventProperty
860
+ */
676
861
  AD_VOLUME_CHANGE = "advolumechange",
677
- /** @eventProperty */
862
+ /**
863
+ * When the ad paused.
864
+ * @eventProperty
865
+ */
678
866
  AD_PAUSED = "adpaused",
679
- /** @eventProperty */
867
+ /**
868
+ * When the ad resumed.
869
+ * @eventProperty
870
+ */
680
871
  AD_RESUMED = "adresumed",
681
- /** @eventProperty */
872
+ /**
873
+ * When the ad was clicked.
874
+ * @eventProperty
875
+ */
682
876
  AD_CLICK = "adclick",
683
- /** @eventProperty */
877
+ /**
878
+ * When the ad was skipped.
879
+ * @eventProperty
880
+ */
684
881
  AD_SKIPPED = "adskipped",
685
- /** @eventProperty */
882
+ /**
883
+ * When the ad completed.
884
+ * @eventProperty
885
+ */
686
886
  AD_COMPLETE = "adcomplete"
687
887
  }
688
888
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glomex/integration-web-component",
3
- "version": "1.1321.1",
3
+ "version": "1.1323.0",
4
4
  "description": "Web component and types to integrate the glomex player",
5
5
  "documentation": "https://docs.glomex.com",
6
6
  "homepage": "https://glomex.com",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@biomejs/biome": "^1.9.4",
32
- "@glomex/integration": "^1.1321.1",
32
+ "@glomex/integration": "^1.1323.0",
33
33
  "@microsoft/api-extractor": "^7.52.1",
34
34
  "@rslib/core": "^0.5.4",
35
35
  "typescript": "^5.8.2"
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "0df37a0bb0ccb47570a7d7d5939f2e735f444fcf"
40
+ "gitHead": "0b9cd98be71ef2f8943d88cad0a0f7605fba4cdf"
41
41
  }