Seven bull video How to intercept the image for the second picture as the cover.

Source: Internet
Author: User
Tags to domain
Introduction of Plupload hideshowcontent.js after var is_upload_video = 0;var Is_upload_img = 0;var Qiniu = new Qiniujssdk (); var uploader = Qiniu.uploader ({runtimes: ' html5,flash,html4 ',//upload mode, degenerate Browse_button: ' pickfiles ',//Upload selected click button, * * Required **uptoken_u RL: ' __root__/qiniu/get_up_token?key={$path}&bucket_type=video ',//ajax request Uptoken url,** strongly recommended settings * * (service side provided)//upt Oken: ',//If Uptoken_url is not specified, you must specify Uptoken, Uptoken generated by other programs//unique_names:true,//default false,key is file name. If this option is turned on, the SDK automatically generates the key (filename) after the upload is successful. Save_key:true,//default false. If the "Sava_key" is specified in the upload policy of the server generation Uptoken, the SDK ignores the processing of the key to domain: ' {$video _domian} ',//bucket domain name, download resources, * * Required **container : ' Container ',//upload area Dom ID, default is Browser_button parent element, max_file_size: ' 60MB ',//Max file volume limit flash_swf_url: ' Public/js/plup Load/moxie.swf ',//Flash, relative path max_retries:1,//upload failed maximum retry count dragdrop:true,//Turn on draggable upload D Rop_element: ' container ',//Drag the ID of the upload AREA element, drag the file or folder can trigger upload chunk_size: ' 4MB ',//block upload, the volume of each piece Auto_start:True,//select file after automatic upload, if close need to self-bind event trigger upload init: {' filesadded ': function (up, files) {Plupload.each (Files, function (f ile) {//files are added to the queue to handle related things upload_pics_number++;$ (' Font_video '). Show (); if (Upload_pics_number = 1) {$ (' #Support '). Hide ();});}, ' Beforeupload ': function (up, file) {//Set the format and size of the uploaded file; $array = [' Video/mp4 ', ' Video/avi ', ' video/mpg ', ' image/ GIF '];if ( -1 = = Jquery.inarray (File.type, $array)) {alert ("Incorrect upload file format") Window.location.reload (); return false;} if (file.size > * 1024x768) {alert (' upload file size cannot be greater than 50M ') window.location.reload (); return false;} Is_upload_video = 1;$ (' #fsUploadProgressBox '). Show (); $ (' #videoBox '). Hide ()}, ' Uploadprogress ': function (up, file) { var progress = new Fileprogress (file, ' fsuploadprogress '); var chunk_size = Plupload.parsesize (this.getoption (' Chunk_ Size '));p rogress.setprogress (file.percent + "%", Up.total.bytesPerSec, Chunk_size);}, ' fileuploaded ': function (UP,    File, info) {$ (' #fsUploadProgressBox '). Hide (); Console.log (info); var dataobj = eval ("(" +info+ ")"), if (dataobj.success = = ' true ') {$.getjson ("__root__/qiniu/get_video_pic_url?key={$path}&bucket_type= Pics ", function (JSON) {$ (' #video_thumbnail_input '). Val (Json.key); $ (' #Support '). Show (); $ (' #product_video_qn '). val (' {$path} '); $ (' Font_video '). Hide (); $ (' #preview_video '). attr (' href ', "__root__/product/video_show?video_stream=_ _root__/qiniu/get_video_url?key={$path}&is_redirect=1 "). Show (); is_upload_video = 0;}); else {alert ("Upload failed, please re-upload"); $ (' #Support '). Show (); $ (' Font_video '). Show (); return false;}, ' Error ': function (up, err, Errtip) {//Upload error when handling related things $ (' Font_video '). Show (); $ (' #Support '). Show (); alert (errtip);}, ' Uploadcomplete ': function ()    {$ (' #fsUploadProgressBox '). Hide (); After the queue file has been processed, deal with the related things $ (' #videoBox '). html (' upload complete '); chunk_index = 0;}, ' Key ': function (up, file) {//) to personalize the Key for each file on the front-end , you can configure the function//the configuration must be in Unique_names:false, save_key:false when the var key = "{$path}";//do something with key Herereturn key}} });

Reply content:

Introduction of Plupload hideshowcontent.js after var is_upload_video = 0;var Is_upload_img = 0;var Qiniu = new Qiniujssdk (); var uploader = Qiniu.uploader ({runtimes: ' html5,flash,html4 ',//upload mode, degenerate Browse_button: ' pickfiles ',//Upload selected click button, * * Required **uptoken_u RL: ' __root__/qiniu/get_up_token?key={$path}&bucket_type=video ',//ajax request Uptoken url,** strongly recommended settings * * (service side provided)//upt Oken: ',//If Uptoken_url is not specified, you must specify Uptoken, Uptoken generated by other programs//unique_names:true,//default false,key is file name. If this option is turned on, the SDK automatically generates the key (filename) after the upload is successful. Save_key:true,//default false. If the "Sava_key" is specified in the upload policy of the server generation Uptoken, the SDK ignores the processing of the key to domain: ' {$video _domian} ',//bucket domain name, download resources, * * Required **container : ' Container ',//upload area Dom ID, default is Browser_button parent element, max_file_size: ' 60MB ',//Max file volume limit flash_swf_url: ' Public/js/plup Load/moxie.swf ',//Flash, relative path max_retries:1,//upload failed maximum retry count dragdrop:true,//Turn on draggable upload D Rop_element: ' container ',//Drag the ID of the upload AREA element, drag the file or folder can trigger upload chunk_size: ' 4MB ',//block upload, the volume of each piece Auto_start:True,//select file after automatic upload, if close need to self-bind event trigger upload init: {' filesadded ': function (up, files) {Plupload.each (Files, function (f ile) {//files are added to the queue to handle related things upload_pics_number++;$ (' Font_video '). Show (); if (Upload_pics_number = 1) {$ (' #Support '). Hide ();});}, ' Beforeupload ': function (up, file) {//Set the format and size of the uploaded file; $array = [' Video/mp4 ', ' Video/avi ', ' video/mpg ', ' image/ GIF '];if ( -1 = = Jquery.inarray (File.type, $array)) {alert ("Incorrect upload file format") Window.location.reload (); return false;} if (file.size > * 1024x768) {alert (' upload file size cannot be greater than 50M ') window.location.reload (); return false;} Is_upload_video = 1;$ (' #fsUploadProgressBox '). Show (); $ (' #videoBox '). Hide ()}, ' Uploadprogress ': function (up, file) { var progress = new Fileprogress (file, ' fsuploadprogress '); var chunk_size = Plupload.parsesize (this.getoption (' Chunk_ Size '));p rogress.setprogress (file.percent + "%", Up.total.bytesPerSec, Chunk_size);}, ' fileuploaded ': function (UP,    File, info) {$ (' #fsUploadProgressBox '). Hide (); Console.log (info); var dataobj = eval ("(" +info+ ")"), if (dataobj.success = = ' true ') {$.getjson ("__root__/qiniu/get_video_pic_url?key={$path}&bucket_type= Pics ", function (JSON) {$ (' #video_thumbnail_input '). Val (Json.key); $ (' #Support '). Show (); $ (' #product_video_qn '). val (' {$path} '); $ (' Font_video '). Hide (); $ (' #preview_video '). attr (' href ', "__root__/product/video_show?video_stream=_ _root__/qiniu/get_video_url?key={$path}&is_redirect=1 "). Show (); is_upload_video = 0;}); else {alert ("Upload failed, please re-upload"); $ (' #Support '). Show (); $ (' Font_video '). Show (); return false;}, ' Error ': function (up, err, Errtip) {//Upload error when handling related things $ (' Font_video '). Show (); $ (' #Support '). Show (); alert (errtip);}, ' Uploadcomplete ': function ()    {$ (' #fsUploadProgressBox '). Hide (); After the queue file has been processed, deal with the related things $ (' #videoBox '). html (' upload complete '); chunk_index = 0;}, ' Key ': function (up, file) {//) to personalize the Key for each file on the front-end , you can configure the function//the configuration must be in Unique_names:false, save_key:false when the var key = "{$path}";//do something with key Herereturn key}} });

For the video interface you can refer to:
Http://developer.qiniu.com/docs/v6/api/reference/fop/av/vframe.html
The Vframe is a synchronous fop.

For example, Video: Http://rwxf.qiniudn.com/1.mp4

The outer chain of the second is: HTTP://RWXF.QINIUDN.COM/1.MP4?VFRAME/PNG/OFFSET/5

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.