I'm having trouble with this code ... it's saying "SyntaxError: Unexpected token <" in the Chrome console. But I do not see any "," or ";" out of place. Anyone have any idea what that might be?
videojs("video", { "controls": true,
"preload": "metadata",
"poster": "<?= $video->getThumbnail($json); ?>",
textTrackSettings: false,
aspectRatio: '16:9',
fluid: true,
html5: { nativeTextTracks: false },
plugins: {
videoJsResolutionSwitcher: {
default: "high",
dynamicLabel: true
}
}
}, function() {
this.updateSrc([<?= $video->printSources($json); ?>]);
this.on('resolutionchange', function(){
console.info('Source changed to %s', this.src());
});
});