title: How do I get audio/video from base64 encoded string?
body: <p>In JSON file, I am receiving the base64 encoded string. It may contain image file, pdf file, doc or text file or audio/video file.</p>
  
  <p>How can I show/play audio/video in iOS from base64 encoded string?</p>
  
  <p>I implemented code for images, doc, pdf, text files except for audio/video file.
  I used below code to achieve this,</p>
  
  <pre><code>//for image
  
  NSURL *url = [NSURL URLWithString:base64String];    
  NSData *imageData = [NSData dataWithContentsOfURL:url];
  UIImage *ret = [UIImage imageWithData:imageData];
  
  //for ppt, pdf, doc, and textfile
  
      NSData* myData = [NSData dataFromBase64String: base64EncodedString];
      [_webView loadData:myData
                   MIMEType:@"application/pdf"
           textEncodingName:@"NSUTF8StringEncoding"
                    baseURL:[NSURL URLWithString:@"https://www.google.co.in/"]];
  </code></pre>