General discussion

Interacting with the YouTube JavaScript Player API

Hi, I'm wondering whether anybody has looked into how the YouTube API can be used alongside H5P.

Specifically how to add a callback on video completion - i.e. extending the onStateChange.

What's the best way to extend the YouTube API implemented in scripts/youtube.js? This seems to run before any JavaScript from hook_h5p_scripts_alter (in the Drupal module).

Any thoughts would be appreciated.
Jon

Pages