aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/utils/elements.js
diff options
context:
space:
mode:
authorakuma06 <demon.akuma06@gmail.com>2020-05-05 15:34:41 +0200
committerGitHub <noreply@github.com>2020-05-05 15:34:41 +0200
commit1f63806c3f1e678f9a88124f577c22a34e0c5e5c (patch)
treeb60c5fe6dcb8727afb4413c0ef5088331b8bedd0 /src/js/utils/elements.js
parent6cb822d56f39656dc079337c35316cdb824a397b (diff)
downloadplyr-1f63806c3f1e678f9a88124f577c22a34e0c5e5c.tar.lz
plyr-1f63806c3f1e678f9a88124f577c22a34e0c5e5c.tar.xz
plyr-1f63806c3f1e678f9a88124f577c22a34e0c5e5c.zip
Fixing "missing code in detail" for PlyrEvent type
When using typescript and listening for youtube statechange event, it is missing the code property definition inside the event (even though it is provided in the code). By making events a map of key-value, we can add easily custom event type for specific event name. Since YouTube "statechange" event differs from the basic PlyrEvent, I added a new Event Type "PlyrStateChangeEvent" having a code property corresponding to a YoutubeState enum defined by the YouTube API documentation. This pattern follows how addEventListener in the lib.dom.d.ts is defined.
Diffstat (limited to 'src/js/utils/elements.js')
0 files changed, 0 insertions, 0 deletions