I know by now that you hopefully have solved your problem. But just incase. If you want a straight forward solution, you can always get the embeded code or any other link and make an html file out of it. Like
<html>
<body>
<script type="text/javascript">
var embedBaseUrl = 'http://www.tv.net/';
var embedChannelId = 13;
var embedSize = [300,250];
var embedAutoplay = true;
</script>
<script type="text/javascript"src="http://www.tv.net/assets/js/embed.js"></script>
</body>
</HTML>
ViewController.h
@interface ViewController : UIViewController {
NSString *videoURL;
}
@property (nonatomic, strong) NSString *videoURL;
(IBAction) tv;
And in the ViewController.m
@synthesize videoURL;
(IBAction) tv {
self.videoURL = @"http://dl.dropbox.com/x/xxxxxxxx/HTML/tv.html";
VideoViewController *videoViewController = [[VideoViewController alloc] initWithNibName:nil bundle:nil];
videoViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; videoViewController.videoURL = self.videoURL;
[self presentViewController:videoViewController animated:YES completion:nil]; }
And then in VideoViewController.h
IBOutlet UIWebView *videoView;
NSString *videoURL; NSString *videoHTML;
}
@property(nonatomic, retain) IBOutlet UIWebView *videoView; @property(nonatomic, retain) NSString *videoURL; @property(nonatomic, retain) NSString *videoHTML;
(void) embedTV;
VideoViewController.m
@synthesize videoView, videoURL, videoHTML;
(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) {
(void)embedTV {
videoHTML = [NSString stringWithFormat:@"\ \ \ \ iframe {position:absolute; top:50%%; margin-top:-130px;}\ body {background-color:#000; margin:0;}\ \ \ \ \ \ ", videoURL];
[videoView loadHTMLString:videoHTML baseURL:nil]; }
(void)viewDidLoad { [super viewDidLoad];
videoView.backgroundColor = [UIColor blackColor]; videoView.opaque = NO;
[self embedTV]; }
Now in my example I referred to video stream, but you get the point, you can stream or play what you want. Simply just use UIWebView
.