Search code examples
iosvideolocalservercocoahttpserver

get shared/server url using CocoaHTTPServer


I am creating application that play video using chromecast device on TV (Apple TV or monitor that support HDMI port). Application is playing url like "https://serveraddress/video.mp4" but its not playing the video stored in app bundle(local video).

I have found that to make video play in remote machine (here it is TV) have to create local server on iphone.

I found this SDK CocoaHTTPServer I have run the sample application but not getting how to take video URL that is stored in app bundle.

Can someone please help me in this.

Thanks in advance.


Solution

  • This work great for me.

    https://github.com/swisspol/GCDWebServer

    Initialize as given in sample code (give document directory as root).

    Than to access local file copy that file in document folder and than access using http://localhost:8080/download?path=new.jpeg