Hiding Webview while streaming
For a online radio streaming app, I have the code below so far. The
problem that I have is when I press play, a webview opens up and when I
close it the stream stops. How do I make this webview not appear on the
screen/do it in the background?
ViewController.h
@interface ViewController : UIViewController
{
IBOutlet UIWebView *webView;
}
-(IBAction)play:(id)sender;
ViewController.m
-(IBAction)play:(id)sender
{
NSString *stream = @"STREAMING LINK";
NSURL *url = [NSURL URLWithString:stream];
NSURLRequest *urlrequest = [NSURLRequest requestWithURL:url];
[webView loadRequest:urlrequest];
}
Also while using webview, would I be able to make a pause/stop button and
a volume switch as well?
No comments:
Post a Comment