Cloudflare Stream With jQuery


#1

Hi guys,
I’m trying to use jQuery on a page that have a video but I notice that:

If you try to use console.log inside ( $(document).ready() ), that may not work…

Tested: console.log

CodePen:


#2

There doesn’t seem to be an issue with jQuery, but I did dig into it and found out the reason why you are not getting expected message in your console.

It appears that the stream JS-script temporarily overrides the console.log() function, meaning that, during setup of the stream UI, you don’t have access to write out messages to console using console.log().

You can try a different example using console.info() and see that it in fact the message gets dumped.

Maybe someone from the Cloudflare Team can jump in, and tell us if this is known bug/issue, or if it needs to be passed on to the developers.

@ryan


#3

I done that.

$(document).ready(function() {
window._console(“pronto!”);
});