objective c - How to set the thumbnail image got from MpMoviePlayerController as a thumbnail when loading the video url string into webview? -
I found a thumbnail image by passing the video URL in MPMoviePlayerController and I'm playing the video by loading the URL string. Webview How can I set thumbnail dimensions as thumbnails, when the video is being played in the webwatch, I'm getting a white screen with the play button.
My code is:
MPMoviePlayerController * moviePlayer = [[MP3 MPV Player Controller Alok] initWithContentURL: newURL]; If (Movie Player) {[Movie Player Set Control Style: MPV Control Style Fullscreen]; [Movie Player Set Fullscreen: Yes]; [[NSNotificationCenter defaultCenter] addObserver: Self Selector: @selector (handleDurationAvailableNotification) Name: MPMovieDurationAvailableNotification Object: Movie Player]; Movieplayer.useApplicationAudioSession = No; UIImage * Image = [movie player thumbnail image overtime: (NSTEInterval) 1.0 TimeOption: MPMPOpationalCareerFrame]; NSData * imgData = UIImagePNG mapping (image); Printf ("Thumbnail image data length ...% d", [length of imgData]); May / / / help reduce latency / [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector (movieFinishedCallback :) name: MPMoviePlayerPlaybackDidFinishNotification object: moviePlayer]; ///moviePlayer.view.frame = CGRectMake (184, 200, 400, 300); //[self.view addSubview: moviePlayer.view]; // [Play Movie Player]; } - (Zero) Table view: (UITableView *) was aTableView SelectionRowAtIndexPath: (NSIndexPath *) indexing path {printf ("select method inside .... !!"); MasterAisleItemListIndexArray = (NSMutableArray *) [[masterAisleItemListDictionary of all] Sorted user of the user: @Selector (compare :)); NSString * sectionName = [MasterAustaltem IndiserrereatOutAndx: IndexPath.Section]; NSMutableArray * aisleItemsArray = [masterAisleItemListDictionary value forKey: sectionName]; CustomerDetails * custObj = [aisleItemsArray ObjectItIndex: indexPath.row]; // Customer details * custObj = [Video List ObjectAutex: IndexPath.ro]; Printf ("\ n audiofile =% s", [custObj.audioFile UTF8String]); // NSURL * URL = [NSURL URLWithString: custObj.audioFile]; // printf ("URL ====% s", [URL UTF 8 string]); WebView = [[UIWebView alloc] initWithFrame: CGRectMake (0, 0, 320, 440)]; [MyView addSubview: webView]; WebView.backgroundColor = [UIColor blue color]; [WebView Load HTML String: [Self Fetch Video: custObj.audioFile] baseURL: [NSURL URLWithString: @ "http: bluepal.com"]]; WebView.delegate = self; Self.view = myView; // [download the self-downloading fileSwance: custObj.audioFile]; } - (NSString *) getVideo: (NSString *) Astrangle {NSString * htmlString = @ "<">>>> head> Meta name = \ "viewport \" content = \ "initial-scale = 1.0, user-scalable = no, width = 94 \ "/> gt; & lt; / head & gt; body style = \" background: # 000; Margin-top: 0 pixels; Margin-Left: 0 pixels \ ">