I want to play daily-motion Video from URL in iOS 7
its not working
NSString *urlString = @"http://www.dailymotion.com/video/xwxfk5";
NSURL *URL = [NSURL URLWithString:urlString];
NSData * data = [[NSData alloc] initWithContentsOfURL:URL];
NSString *str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
DMPlayerViewController *mpWatchController = [[DMPlayerViewController alloc] initWithVideo:str];
mpWatchController.view.frame = CGRectMake(0,39,320,186);
[mpWatchController play];
You can't play the video because you need to supply your player with a direct link to a video file (ending in .mov or .mp4 for example), not to a webpage, like Dailymotion, which hosts a video through a player.