This example uses minimal javascript and the youtube iframe API.

Statements are built with xapi-youtube-statements.js and dispatched to an LRS with xapiwrapper.min.js using a custom ADL.XAPIYoutubeStatements.onStateChangeCallback function.

You can view statements with the statement viewer.