This changes the YouTubeTrackingPlugin to utilize v2 Media Schemas.
This is a breaking change, but I've tried to keep the API mostly compatible.
To make the implementation neater for the custom entities, I've also made the base Media plugin accept context generators via tracker-core's DynamicContext support.
Other changes included:
In addition to a HTML ID or direct YT.Player instance, you can now also pass the iframe element to the enableYouTubeTracking method directly.
Additional Media plugin settings can be configured via the options setting in enableYouTubeTracking
There is now a corresponding disableYouTubeTracking call that maps to endMediaTracking in the base plugin
If passed a HTML ID that already has a corresponding YT.Player instance, that instance will now be re-used instead of being clobbered with a new instance
trackingOptionsParser is no longer exported in the top-level public API (I think this was a mistake?)
A new trackYouTubeSelfDescribingEvent method exists to track custom events with the associated Media plugin & YouTube plugin entities
This changes the YouTubeTrackingPlugin to utilize v2 Media Schemas. This is a breaking change, but I've tried to keep the API mostly compatible. To make the implementation neater for the custom entities, I've also made the base Media plugin accept context generators via tracker-core's
DynamicContext
support.Other changes included:
YT.Player
instance, you can now also pass the iframe element to theenableYouTubeTracking
method directly.options
setting inenableYouTubeTracking
disableYouTubeTracking
call that maps toendMediaTracking
in the base pluginYT.Player
instance, that instance will now be re-used instead of being clobbered with a new instancetrackingOptionsParser
is no longer exported in the top-level public API (I think this was a mistake?)trackYouTubeSelfDescribingEvent
method exists to track custom events with the associated Media plugin & YouTube plugin entitiesSee PE-5753