This is a migrated thread and some comments may be shown as answers.

how to get a video thumbnail using RadAsyncUpload ?

3 Answers 145 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Rasheed
Top achievements
Rank 1
Rasheed asked on 03 Feb 2012, 10:30 PM
hi
 
i have a RadAsyncUpload which enables users to upload videos, i need to get thumbnails for each uploaded video, any help ?

3 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 07 Feb 2012, 06:13 PM
Hello Rasheed,

This feature is not supported by our controls. To get an image from a video file you would need some other external library. After you get the image, you can then show the image as a thumbnail, using this example as a reference:
http://demos.telerik.com/aspnet-ajax/upload/examples/async/imageuploader/defaultcs.aspx 
 
Kind regards,
Bozhidar
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Rasheed
Top achievements
Rank 1
answered on 07 Feb 2012, 11:03 PM
thanks for your reply 
i've implemented this scenario using ffmpeg utility and after getting the image i've used the Rad Rotator control.


thank you 
rasheed 
0
Jhansi
Top achievements
Rank 1
answered on 09 May 2012, 10:21 AM
hello friends, 
i am using html5 and JavaScript to upload the image using file API, it is working good Firefox but in chrome i am not getting the thumbnail of image, 
my code is.......
<style>
  .thumb {
    height: 75px;
    border: 1px solid #000;
    margin: 10px 5px 0 0;
  }
</style>


<input type="file" id="files" name="files[]" multiple />
<output id="list"></output>


<script>
  function handleFileSelect(evt) {
    var files = evt.target.files; // FileList object


    // Loop through the FileList and render image files as thumbnails.
    for (var i = 0, f; f = files[i]; i++) {


      // Only process image files.
      if (!f.type.match('image.*')) {
        continue;
      }


      var reader = new FileReader();


      // Closure to capture the file information.
      reader.onload = (function(theFile) {
        return function(e) {
          // Render thumbnail.
          var span = document.createElement('span');
          span.innerHTML = ['<img class="thumb" src="', e.target.result,
                            '" title="', escape(theFile.name), '"/>'].join('');
          document.getElementById('list').insertBefore(span, null);
        };
      })(f);


      // Read in the image file as a data URL.
      reader.readAsDataURL(f);
    }
  }


  document.getElementById('files').addEventListener('change', handleFileSelect, false);
</script>
Tags
AsyncUpload
Asked by
Rasheed
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Rasheed
Top achievements
Rank 1
Jhansi
Top achievements
Rank 1
Share this question
or