Requires the IMA SDK to be loaded: i.e. <script src="//imasdk.googleapis.com/js/sdkloader/ima3.js"></script>
<script src="//imasdk.googleapis.com/js/sdkloader/ima3.js"></script>
Full documentation