How do I use ConnectSDK to cast local pictures or videos to LG TV?

Hello, I developed an APP using ConnectSDK, which has basic remote control functions. Now I want to develop a screen casting function. In the SDK, it supports casting pictures or video URLs to the TV, but now I want to cast them from the photo album. Select pictures or videos and send them directly to the TV without going through an external server. According to the information I searched, you may need to use WebServer technology, but it didn’t work after I tried it. Please help me.