I'm building video stream app and I want to make stream source remotely editable, so I decided to use XML. Only stream IP address should be loaded from XML so let's say we are using this source: http://198.252.206.16/streams/live.m3u8 only 198.252.206.16 would be loaded from XML, while "http://" and "streams/live.m3u8" would stay the same.
Code for playing stream
XML file
So the question is how can I get only value of title from XML file and put as source of stream + path to stream file("/streams/live.m3u8").
Thanks for help!
Code for playing stream
Code:
- (IBAction)button_clicked:(id)sender {
NSURL *videoStreamURL = [NSURL URLWithString:@"http://198.252.206.16/streams/live.m3u8"];
_player = [[MPMoviePlayerViewController alloc] initWithContentURL:videoStreamURL];
[self presentMoviePlayerViewControllerAnimated:_player];
}
XML file
Code:
<rss version="2.0">
<channel>
<title>N/A</title>
<link>N/A</link>
<description>N/A</description>
<item>
<title>198.252.206.16</title>
<link>N/A</link>
<description>N/A</description>
</item>
</channel>
</rss>
So the question is how can I get only value of title from XML file and put as source of stream + path to stream file("/streams/live.m3u8").
Thanks for help!
Last edited by a moderator: