Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Add events dispatched on video-element #31

Merged
merged 2 commits into from
Feb 22, 2022
Merged

Conversation

gorillamoe
Copy link
Contributor

Dieser PR fügt Events auf dem Video-Element hinzu, sodass man nicht unbedingt auf die Callback-Funktionen angewiesen ist, wenn man nur ein Tracking aufbauen will.

Die Events sind wie folgt

  • plugin-endcard:revolverplay analog zu onRevolverplayCallback
  • plugin-endcard:click-to-play analog zu onClickToPlayCallback
  • plugin-endcard:click-to-replay analog zu onClickToReplayCallback
  • plugin-endcard:revolverplay-pause analog zu onRevolverplayPauseCallback
  • plugin-endcard:show analog zu onLoadedCallback (weil auch die Methode show heisst)

Auf ein solches Event könnte man sich dann zum Beispiel via

videoEl.addEventListener('plugin-endcard:show', () => {
  console.log('plugin-endcard:show event triggered');
});

hängen.

Das brauchen wir, da unser Frontend-Team die GA-Trackings via Events realisiert hat und damit wir die Komplexität klein halten :)

@gorillamoe gorillamoe added the enhancement New feature or request label Feb 22, 2022
@gorillamoe gorillamoe self-assigned this Feb 22, 2022
Copy link
Contributor

@ennoStroeer ennoStroeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@ennoStroeer
Copy link
Contributor

The generated files are part of the repo, which makes the review more complex. We should consider removing them from the repo, since this is not necessary.

@ennoStroeer ennoStroeer merged commit 9aa7d6a into master Feb 22, 2022
@gorillamoe gorillamoe deleted the videoel-events branch February 23, 2022 15:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants