public void OnReadyForPlay(object sender, EventArgs e) { PostMessage(new { cmd = "readyForPlay", value = IsReadyForPlay() }); }