@wedaly In case, when the youtube link doesn't work for any reason (for example, the great firewall in china) any alternate sources should automatically play.
For checking Youtube existence we use JSONP. To decide youtube exist or not we add timeout. If response isn't received in "this.config.ytTestTimeout" ms it means youtube server doesn't exist and we restart our video in HTML5 mode.
For now, we wait 1500 ms is it enough for this reasons? Do you have any other suggestions how to do that?