When it is understood that the performance arts remains the very best method by the Dharma, the Avatar of Vishnu, is communicated, it is better understood that while entertainment is a desired effect of performance arts, it is not the primary goal. Such Natya Shastra (representation of acts; Acting) is often the only means by which a student may come to understand the Dharma.
Such Natya Shastra has two fundamentals: emulation and creation. An Actor will on the one hand study through practices of dance/movement, speech, song/story, sculpture, painting, and various other Arts the Dharma, the nature, the duty, the phenomenon of reality sufficiently to manifest by Maya (magic, formation) a representation, reproduction, or example of the subject. On the other hand, the Actor who has sufficiently studied their art may form within their audience that very Dharma by use of the several Siddhis.
In the Samyutta Nikaya 42.2, the Buddha Gotama describes a very real danger actors face. Maya is a dangerous weapon, as it is easy to inflict self-harm.
Siddhi is permitted only under very specific and limited conditions: It is far better to provide such an emulation of the Dharma as to make an effective communication of the Dharma than it is to transmit the Dharma by Siddhi, it is usually important that an audience come to discover the Dharma themselves, for there is much benefit in the process which Siddhi would rob them of. However, when Siddhi is required, the Actor should inspire joy in the communication: when the audience takes joy in the act of communicating, their insight will be heightened sufficiently to themselves perform (Dharmi) their duty, to achieve their nature, to embody the Dharma. Thus, the Actor performs (Dharmi) both the duty of the audience and themselves, as if the audience were an instrument or clay, shaped into the necessary form.
The conditions when Siddhi are required are few, but may be generalized as those when the audience is incapable of understanding the Dharma if it were merely communicated, such as by inexperience, disbelief, doubt, physical or mental deficiency, profound emotionality, constraint or imprisonment or other lack of freedom such as addiction, etc.