This invention relates to a method for sharing real-time
IPTV content to a mobile terminal for playback, belonging to the field of
wireless communication and terminals. The method includes: the
IPTV device and the mobile terminal sending a
STUN request to a public
STUN server to bypass NAT and automatically obtain the corresponding public
IP address; the
IPTV device and the mobile terminal establishing an
IPSec encrypted tunnel based on the
IPSec protocol; the IPTV device receiving the operator's playback
stream, extracting video and audio data, re-encapsulating it into RTP format, encrypting it, and transmitting it to the mobile terminal through the
IPSec encrypted tunnel; the mobile terminal decrypting and verifying the integrity of the data packets, extracting the RTP
payload, and playing the corresponding video and audio data in real time; the mobile terminal sending control commands to the IPTV device through the IPSec encrypted tunnel; the IPTV device
parsing the control commands and calling an API to switch channels, synchronously updating the
electronic program guide information to the mobile terminal. This method enables mobile devices to remotely receive and play
television channel content from a home IPTV device via the
public network, overcoming spatial limitations.