@polesye state.videoType can be either 'youtube' or 'html5'. This tells what is the type of video source (either it is a YouTube video, or a video hosted on some other server).

What you need to check is state.currentPlayerMode - it can be either 'flash' or 'html5'. If it is 'flash', then we don't need to turn off speed control because Flash player handles normally under speed changes (this is because Flash player only plays YouTube videos and those are encoded at various speeds).