To play with one eye on the gallery. To work for popularity. As an actor who sacrifices his author for popular applause, or a stump political orator “orates” to catch votes.
“The instant we begin to think about success and the effect of our work—to play with one eye on the gallery—we lose power, and touch, and everything else.” —Rudyard Kipling: The Light that Failed.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Gallery from Fact Monster: