Sexual conversation, whether online or not, between two consenting adults is absolutely legal in India. Sharing of sexual videos and images online between consenting adults is legal
as it is a private affair and there exists no law regulating private conversations of individuals in India.
The same may become illegal and punishable under S. 67 of The Information Technology Act, 2000
, only if such videos and images are published or transmitted online and can be classified as obscene.
Even if the other party happened to be an “undercover cop”, any consensual exchange of videos and images is legal in India. As stated by you, since both the parties were interested, you cannot be held liable for any offence.
However, sexual conversation between you and your partner is legally safe, once you establish the element of consent. This can be proven through the text of the chat/conversation.
Available at: https://indiankanoon.org/doc/1318767/.