Use location.protocol.

If the browser is using https then tubeplayer will use https else it will use http