get shared/server url using CocoaHTTPServer

542 Views Asked by At

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.

1

There are 1 best solutions below

1
Seema Sharma On BEST ANSWER

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