hr-design-system-handlebars 1.87.2 → 1.88.1

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 (75) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/assets/brand/hessenschau/conf/locatags.merged.json +2 -1
  3. package/dist/assets/brand/hr/conf/locatags.merged.json +2 -1
  4. package/dist/assets/brand/hr-bigband/conf/locatags.merged.json +2 -1
  5. package/dist/assets/brand/hr-fernsehen/conf/locatags.merged.json +2 -1
  6. package/dist/assets/brand/hr-inforadio/conf/locatags.merged.json +2 -1
  7. package/dist/assets/brand/hr-rundfunkrat/conf/locatags.merged.json +2 -1
  8. package/dist/assets/brand/hr-sinfonieorchester/conf/locatags.merged.json +2 -1
  9. package/dist/assets/brand/hr-werbung/conf/locatags.merged.json +2 -1
  10. package/dist/assets/brand/hr1/conf/locatags.merged.json +2 -1
  11. package/dist/assets/brand/hr2/conf/locatags.merged.json +2 -1
  12. package/dist/assets/brand/hr3/conf/locatags.merged.json +2 -1
  13. package/dist/assets/brand/hr4/conf/locatags.merged.json +2 -1
  14. package/dist/assets/brand/you-fm/conf/locatags.merged.json +2 -1
  15. package/dist/assets/index.css +14 -6
  16. package/dist/assets/js/components/event/filtererDs.feature.js +36 -4
  17. package/dist/assets/js/components/mediaplayer/ardPlayerLoader.subfeature.js +43 -5
  18. package/dist/assets/js/components/mediaplayer/mediaplayerLoader.feature.js +3 -3
  19. package/dist/views/components/content/copytext/components/audio.hbs +2 -2
  20. package/dist/views/components/content/copytext/components/audioeventlivestream.hbs +2 -2
  21. package/dist/views/components/content/copytext/components/media/media_figure.hbs +10 -6
  22. package/dist/views/components/content/copytext/components/video/video.hbs +2 -2
  23. package/dist/views/components/content/copytext/components/videolivestream.hbs +2 -2
  24. package/dist/views/components/content/copytext/copytext.hbs +1 -1
  25. package/dist/views/components/event/calendar/event_calendar_nav.hbs +2 -2
  26. package/dist/views/components/mediaplayer/media_player.hbs +1 -1
  27. package/dist/views/components/mediaplayer/mediaplayer_button.hbs +1 -1
  28. package/dist/views/components/page/story/story_article.hbs +2 -2
  29. package/dist/views/components/podcast/components/podcast_player_ui.hbs +1 -1
  30. package/dist/views/components/teaser/components/teaser_av_consumption.hbs +5 -5
  31. package/dist/views/components/teaser/components/teaser_media_player.hbs +1 -1
  32. package/dist/views_static/components/content/copytext/components/audio.hbs +2 -2
  33. package/dist/views_static/components/content/copytext/components/audioeventlivestream.hbs +2 -2
  34. package/dist/views_static/components/content/copytext/components/media/media_figure.hbs +10 -6
  35. package/dist/views_static/components/content/copytext/components/video/video.hbs +2 -2
  36. package/dist/views_static/components/content/copytext/components/videolivestream.hbs +2 -2
  37. package/dist/views_static/components/content/copytext/copytext.hbs +1 -1
  38. package/dist/views_static/components/event/calendar/event_calendar_nav.hbs +2 -2
  39. package/dist/views_static/components/mediaplayer/media_player.hbs +1 -1
  40. package/dist/views_static/components/mediaplayer/mediaplayer_button.hbs +1 -1
  41. package/dist/views_static/components/page/story/story_article.hbs +2 -2
  42. package/dist/views_static/components/podcast/components/podcast_player_ui.hbs +1 -1
  43. package/dist/views_static/components/teaser/components/teaser_av_consumption.hbs +5 -5
  44. package/dist/views_static/components/teaser/components/teaser_media_player.hbs +1 -1
  45. package/package.json +1 -1
  46. package/src/assets/brand/_default/conf/locatags.json +2 -1
  47. package/src/assets/brand/hessenschau/conf/locatags.merged.json +2 -1
  48. package/src/assets/brand/hr/conf/locatags.merged.json +2 -1
  49. package/src/assets/brand/hr-bigband/conf/locatags.merged.json +2 -1
  50. package/src/assets/brand/hr-fernsehen/conf/locatags.merged.json +2 -1
  51. package/src/assets/brand/hr-inforadio/conf/locatags.merged.json +2 -1
  52. package/src/assets/brand/hr-rundfunkrat/conf/locatags.merged.json +2 -1
  53. package/src/assets/brand/hr-sinfonieorchester/conf/locatags.merged.json +2 -1
  54. package/src/assets/brand/hr-werbung/conf/locatags.merged.json +2 -1
  55. package/src/assets/brand/hr1/conf/locatags.merged.json +2 -1
  56. package/src/assets/brand/hr2/conf/locatags.merged.json +2 -1
  57. package/src/assets/brand/hr3/conf/locatags.merged.json +2 -1
  58. package/src/assets/brand/hr4/conf/locatags.merged.json +2 -1
  59. package/src/assets/brand/you-fm/conf/locatags.merged.json +2 -1
  60. package/src/stories/views/components/content/copytext/components/audio.hbs +2 -2
  61. package/src/stories/views/components/content/copytext/components/audioeventlivestream.hbs +2 -2
  62. package/src/stories/views/components/content/copytext/components/media/media_figure.hbs +10 -6
  63. package/src/stories/views/components/content/copytext/components/video/video.hbs +2 -2
  64. package/src/stories/views/components/content/copytext/components/videolivestream.hbs +2 -2
  65. package/src/stories/views/components/content/copytext/copytext.hbs +1 -1
  66. package/src/stories/views/components/event/calendar/event_calendar_nav.hbs +2 -2
  67. package/src/stories/views/components/event/filtererDs.feature.js +36 -4
  68. package/src/stories/views/components/mediaplayer/ardPlayerLoader.subfeature.js +43 -5
  69. package/src/stories/views/components/mediaplayer/media_player.hbs +1 -1
  70. package/src/stories/views/components/mediaplayer/mediaplayerLoader.feature.js +3 -3
  71. package/src/stories/views/components/mediaplayer/mediaplayer_button.hbs +1 -1
  72. package/src/stories/views/components/page/story/story_article.hbs +2 -2
  73. package/src/stories/views/components/podcast/components/podcast_player_ui.hbs +1 -1
  74. package/src/stories/views/components/teaser/components/teaser_av_consumption.hbs +5 -5
  75. package/src/stories/views/components/teaser/components/teaser_media_player.hbs +1 -1
@@ -1,17 +1,22 @@
1
1
  import { fireEvent, hr$, listen, loadScript } from 'hrQuery'
2
+ import { uxAction } from 'base/tracking/pianoHelper.subfeature'
2
3
  import SettingsCookie from 'components/externalService/globalSettingsCookie.subfeature'
3
4
 
4
- const ArdPlayerLoader = function (options, rootElement) {
5
+ const ArdPlayerLoader = function (options, trackingData, rootElement) {
5
6
  'use strict'
6
7
 
7
8
  const skinPath = options.cssUrl,
8
9
  ardplayerUrl = options.jsUrl,
9
10
  smarttagUrl = options.atiSmarttagUrl,
10
11
  playerId = options.playerId,
12
+ type = options.type,
11
13
  settingsCookie = new SettingsCookie(),
12
- isPlayerDebug = options.isPlayerDebug || false
14
+ isPlayerDebug = options.isPlayerDebug || false,
15
+ playerLocation = trackingData.playerLocation || "Default",
16
+ playerSize = trackingData.playerSize || options.teaserSize
13
17
  let mediaCollection = options.mediaCollection,
14
18
  playerConfig = options.playerConfig,
19
+ isPlayerStarted = false,
15
20
  player
16
21
 
17
22
  const setupPlayer = function () {
@@ -76,7 +81,13 @@ const ArdPlayerLoader = function (options, rootElement) {
76
81
 
77
82
  const bindPlayerEvents = function () {
78
83
  player.$.on(ardplayer.Player.EVENT_PLAY_STREAM, function (event) {
84
+ console.log(event.target)
85
+ console.debug(`options.teaserSize: ${options.teaserSize}`)
79
86
  const geotag = hr$('.js-geotag', rootElement)[0]
87
+ if (!isPlayerStarted) {
88
+ trackPlayerStart()
89
+ isPlayerStarted = true
90
+ }
80
91
  if (typeof geotag != 'undefined') {
81
92
  geotag.classList.add('hide')
82
93
  }
@@ -105,15 +116,42 @@ const ArdPlayerLoader = function (options, rootElement) {
105
116
 
106
117
  listen('player_start', function (event) {
107
118
  if (player) {
108
- if (undefined != mediaCollection.live) {
109
- player.seekToLive()
119
+ let playerIdFromConfig = parseInt(playerId)
120
+ playerIdFromConfig = isNaN(playerIdFromConfig) ? 0 : playerIdFromConfig
121
+ if (playerIdFromConfig === event.detail.playerId) {
122
+ if (undefined != mediaCollection.live) {
123
+ player.seekToLive()
124
+ }
125
+ player.play()
110
126
  }
111
- player.play()
112
127
  }
113
128
  })
114
129
  }
115
130
 
131
+ const trackPlayerStart = function () {
132
+ switch (type) {
133
+ case "audioOndemand":
134
+ console.debug(`Playbutton geklickt::Audio \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
135
+ uxAction(`Playbutton geklickt::Audio \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
136
+ break;
137
+ case "audioLivestream":
138
+ console.debug(`Playbutton geklickt::Audio-Event-Livestream \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
139
+ uxAction(`Playbutton geklickt::Audio-Event-Livestream \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
140
+ break;
141
+ case "videoOndemand":
142
+ console.debug(`Playbutton geklickt::Video \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
143
+ uxAction(`Playbutton geklickt::Video \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
144
+ break;
145
+ case "videoLivestream":
146
+ console.debug(`Playbutton geklickt::Video - Livestream \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
147
+ uxAction(`Playbutton geklickt::Video - Livestream \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
148
+ break;
149
+ }
150
+ }
151
+
116
152
  setupPlayer()
117
153
  }
118
154
 
155
+
156
+
119
157
  export default ArdPlayerLoader
@@ -1,2 +1,2 @@
1
- <div{{#if _isUsedInTeaser}} x-show="avStart" x-cloak{{/if}} id="{{this.ardPlayerConfig.playerId}}" class="{{#if _isAudioView}}ar-4-1 !h-auto{{else}}ar-16-9 h-full{{/if}}{{~#if _addClassImg}} {{_addClassImg}}{{/if}} {{#if _isUsedInTeaser}} z-20{{/if}} js-load {{if _uiTestHook _uiTestHook 'ui-test-mediaplayer'}}" data-hr-mediaplayer-loader='{{json this.ardPlayerJsonConfig}}'>
1
+ <div{{#if _isUsedInTeaser}} x-show="avStart" x-cloak{{/if}} id="{{this.ardPlayerConfig.playerId}}" class="{{#if _isAudioView}}ar-4-1 !h-auto{{else}}ar-16-9 h-full{{/if}}{{~#if _addClassImg}} {{_addClassImg}}{{/if}} {{#if _isUsedInTeaser}} z-20{{/if}} js-load {{if _uiTestHook _uiTestHook 'ui-test-mediaplayer'}}" data-mediaplayer-tracking='{"playerLocation": "{{_playerLocation}}","playerSize": "{{if _playerSize _playerSize ""}}" }' data-hr-mediaplayer-loader='{{json this.ardPlayerJsonConfig}}'>
2
2
  </div>
@@ -9,7 +9,8 @@ const MediaplayerLoader = function (context) {
9
9
  { element: rootElement } = context,
10
10
  isAutoplay = options.isAutoplay,
11
11
  teaserSize = options.teaserSize,
12
- mediaplayerButton = hr$('.js-mediaplayer__button', rootElement.parentNode)[0]
12
+ mediaplayerButton = hr$('.js-mediaplayer__button', rootElement.parentNode)[0],
13
+ trackingData = rootElement.dataset.mediaplayerTracking ? JSON.parse(rootElement.dataset.mediaplayerTracking) : {}
13
14
 
14
15
  const removeVideoHover = function () {
15
16
  rootElement.parentNode.parentNode.classList.remove('-imageHover')
@@ -17,9 +18,8 @@ const MediaplayerLoader = function (context) {
17
18
  }
18
19
 
19
20
  const loadArdPlayerLoader = function () {
20
- new ArdPlayerLoader(options)
21
+ new ArdPlayerLoader(options, trackingData)
21
22
  removeVideoHover()
22
- uxAction('mediabuttonclick::' + teaserSize + '::playButtonClick')
23
23
  }
24
24
 
25
25
  if (isAutoplay) {
@@ -1,5 +1,5 @@
1
1
  {{#with this}}
2
- {{#> components/button/button _variant="icon-button" _type="button" _css=_css _alpineClick="avStart = !avStart; $dispatch('player_start')"}}
2
+ {{#> components/button/button _variant="icon-button" _type="button" _css=_css _alpineClick=(loca "mediaplayer_play_button_alpine_click" _playerId)}}
3
3
  {{#with this}}
4
4
  {{> components/base/image/icon _addClass=(appendToDefault (if _isLivestream-adjust_context "text-media-button-live group-hover:fill-media-button-live" "text-media-button group-hover:fill-media-button") "fill-white group-hover:text-white inline ") _icon=_icon-adjust_context}}
5
5
  {{#*inline "css"}} {{~#if _isLead-adjust_context~}} md:w-18 md:h-18 w-10 h-10 {{else}} w-10 h-10 {{/if}} {{/inline}}
@@ -20,10 +20,10 @@
20
20
  _noDelay=true}}
21
21
  {{/if}}
22
22
  {{#if this.isVideoOnDemand}}
23
- {{> components/content/copytext/components/media/media_figure _isLead=true _fullSize=true _addClass="print:hidden article-full-width md:article-breakout mt-12 mb-6 sm:mt-14 sm:mb-8" _cssClassCaption="mx-5 md:mx-0" _a11yIntro-loca="story_video_intro_sr" _a11yOutro-loca="story_video_outro_sr" }}
23
+ {{> components/content/copytext/components/media/media_figure _playerLocation="Aufmacher" _isLead=true _playerSize="100" _addClass="print:hidden article-full-width md:article-breakout mt-12 mb-6 sm:mt-14 sm:mb-8" _cssClassCaption="mx-5 md:mx-0" _a11yIntro-loca="story_video_intro_sr" _a11yOutro-loca="story_video_outro_sr" }}
24
24
  {{/if}}
25
25
  {{#if this.isLivestream}}
26
- {{> components/content/copytext/components/media/media_figure _isLead=true _fullSize=true _addClass="print:hidden article-full-width md:article-breakout mt-12 mb-6 sm:mt-14 sm:mb-8" _cssClassCaption="mx-5 md:mx-0" _a11yIntro-loca="story_video_livestream_intro_sr" _a11yOutro-loca="story_video_livestream_outro_sr" }}
26
+ {{> components/content/copytext/components/media/media_figure _playerLocation="Aufmacher" _isLead=true _playerSize="100" _addClass="print:hidden article-full-width md:article-breakout mt-12 mb-6 sm:mt-14 sm:mb-8" _cssClassCaption="mx-5 md:mx-0" _a11yIntro-loca="story_video_livestream_intro_sr" _a11yOutro-loca="story_video_livestream_outro_sr" }}
27
27
  {{/if}}
28
28
  {{/with}}
29
29
  {{/unless}}
@@ -7,7 +7,7 @@
7
7
  {{> components/podcast/components/podcast_playbutton
8
8
  _css="mr-4"
9
9
  _id = _id
10
- _alpineClick=(loca "play_button_alpine_click" _id) }}
10
+ _alpineClick=(loca "podcastplayer_play_button_alpine_click" _id) }}
11
11
  </div>
12
12
 
13
13
  <div class="flex flex-wrap items-start w-full -mt-0.5">
@@ -1,7 +1,7 @@
1
1
  {{#with this.teaserLead.avDocument}}
2
2
  {{~#if this.isVideoOnDemand ~}}
3
3
  {{#with this.toModel.videoElement}}
4
- {{~> components/mediaplayer/media_player _uiTestHook="ui-test-video-ondemand-player" _isUsedInTeaser=true _addClassImg=../../_addClassImg~}}
4
+ {{~> components/mediaplayer/media_player _playerLocation="Teaser" _uiTestHook="ui-test-video-ondemand-player" _isUsedInTeaser=true _addClassImg=../../_addClassImg~}}
5
5
  {{#with ../../this}}
6
6
  {{~> components/teaser/components/teaser_media_player _mediaButtonIcon="play_button" _mediaButtonLabel="Video" _aspectRatio=_aspectRatio-adjust_context _addClassImg=_addClassImg-adjust_context _noDelay=this.dontLazyload}}
7
7
  {{/with}}
@@ -12,7 +12,7 @@
12
12
  {{~/if~}}
13
13
  {{~#if this.isAudioOnDemand ~}}
14
14
  {{#with this.toModel.audioElementForVideoView}}
15
- {{~> components/mediaplayer/media_player _uiTestHook="ui-test-audio-ondemand-player" _isUsedInTeaser=true _addClassImg=../../_addClassImg~}}
15
+ {{~> components/mediaplayer/media_player _playerLocation="Teaser" _uiTestHook="ui-test-audio-ondemand-player" _isUsedInTeaser=true _addClassImg=../../_addClassImg~}}
16
16
  {{#with ../../this}}
17
17
  {{~> components/teaser/components/teaser_media_player _mediaButtonIcon="audio_button" _mediaButtonLabel="Audio" _aspectRatio=_aspectRatio-adjust_context _addClassImg=_addClassImg-adjust_context _noDelay=this.dontLazyload}}
18
18
  {{/with}}
@@ -23,7 +23,7 @@
23
23
  {{~/if~}}
24
24
  {{~#if this.isPodcast ~}}
25
25
  {{#with this.toModel.audioElementForVideoView}}
26
- {{~> components/mediaplayer/media_player _uiTestHook="ui-test-audio-ondemand-player" _isUsedInTeaser=true _addClassImg=../../_addClassImg~}}
26
+ {{~> components/mediaplayer/media_player _playerLocation="Teaser" _uiTestHook="ui-test-audio-ondemand-player" _isUsedInTeaser=true _addClassImg=../../_addClassImg~}}
27
27
  {{#with ../../this}}
28
28
  {{~> components/teaser/components/teaser_media_player _mediaButtonIcon="audio_button" _mediaButtonLabel="Podcast" _aspectRatio=_aspectRatio-adjust_context _addClassImg=_addClassImg-adjust_context _noDelay=this.dontLazyload}}
29
29
  {{/with}}
@@ -34,7 +34,7 @@
34
34
  {{~/if~}}
35
35
  {{~#if this.isAudioEventLivestream ~}}
36
36
  {{#with this.toModel.audioLivestreamElementForVideoView}}
37
- {{~> components/mediaplayer/media_player _uiTestHook="ui-test-audio-livestream-player" _isUsedInTeaser=true _addClassImg=../../_addClassImg~}}
37
+ {{~> components/mediaplayer/media_player _playerLocation="Teaser" _uiTestHook="ui-test-audio-livestream-player" _isUsedInTeaser=true _addClassImg=../../_addClassImg~}}
38
38
  {{#with ../../this}}
39
39
  {{~> components/teaser/components/teaser_media_player _mediaButtonIcon="play_button" _mediaButtonLabel="Live" _isLivestream=true _aspectRatio=_aspectRatio-adjust_context _addClassImg=_addClassImg-adjust_context _noDelay=this.dontLazyload}}
40
40
  {{/with}}
@@ -45,7 +45,7 @@
45
45
  {{~/if~}}
46
46
  {{~#if this.isLivestream ~}}
47
47
  {{#with this.toModel.videoLivestreamElement}}
48
- {{~> components/mediaplayer/media_player _uiTestHook="ui-test-video-livestream-player" _isUsedInTeaser=true _addClassImg=../../_addClassImg~}}
48
+ {{~> components/mediaplayer/media_player _playerLocation="Teaser" _uiTestHook="ui-test-video-livestream-player" _isUsedInTeaser=true _addClassImg=../../_addClassImg~}}
49
49
  {{#with ../../this}}
50
50
  {{~> components/teaser/components/teaser_media_player _mediaButtonIcon="play_button" _mediaButtonLabel="Live" _isLivestream=true _aspectRatio=_aspectRatio-adjust_context _addClassImg=_addClassImg-adjust_context _noDelay=this.dontLazyload}}
51
51
  {{/with}}
@@ -14,6 +14,6 @@
14
14
 
15
15
 
16
16
  {{#with this}}
17
- {{> components/mediaplayer/mediaplayer_button _css=(if _isUsedInCopytext "" "bottom-0 right-0") _isLead=_isLead _isLivestream=_isLivestream _icon=_mediaButtonIcon _label=_mediaButtonLabel _teaserSize=this.teaserSize _teaserType=this.teaserType _isMobile1to1=this.isMobile1to1}}
17
+ {{> components/mediaplayer/mediaplayer_button _css=(if _isUsedInCopytext "" "bottom-0 right-0") _playerId=_playerId _isLead=_isLead _isLivestream=_isLivestream _icon=_mediaButtonIcon _label=_mediaButtonLabel _teaserSize=this.teaserSize _teaserType=this.teaserType _isMobile1to1=this.isMobile1to1}}
18
18
  {{/with}}
19
19
  </div>