【问题标题】:Progress Url dailymotion api进度网址dailymotion api
【发布时间】:2017-02-16 12:39:59
【问题描述】:

如何使用 dailymotion api 获取进度文件上传? 是否可以获取进度文件上传的百分比?

我正在使用 ajax jquery。

   $.ajax({
          type: "POST",
          url: 'http://localhost:81/video_api/api_bridge/requestUrl', 
          /*this section to accessed uploadFile()*/        
          data:{
            'path':'/home/rizky/Downloads/114.mkv',
               },  
          success: function(result) {

            setInterval(function(){
               $.get(result.progress,
                  function(data) {
                    console.log(data);  
              /*this section, to updating <progress/> element.*/
                   }
               ); 
            },1200)


      console.log(result); 
     /*this section to accessed post('/me/videos')*/
    $.ajax({
          type: "POST",
          url: 'http://localhost:81/video_api/api_bridge/post_to_dailymotion', 
          data:{
              'path':'/home/rizky/Downloads/114.mkv',
              'title':'privasi',
              'publish_status':true,
              'playlist':'',
              'private_mode':true,
              'description':'',
              'upload_url':result.url, 
              'tags':'',
               }, 
              success: function(result) {
              console.log(result)
          $('.loadeng').css('display','none')
       },  
       error: function(aaa){
            console.log(aaa)
            console.log(aaa.responseText)
     }
    }); 
   },
   error: function(aaa){
     console.log(aaa)
     console.log(aaa.responseText)
   }
  });

然后,我想在&lt;progress&gt; 上显示百分比值进度 元素。 但是progress_url 的 API 只是给了我返回消息state done 或 starting 而不是百分比值进度。

谢谢,问候。

【问题讨论】:

    标签: php jquery dailymotion-api


    【解决方案1】:

    我认为您将能够在文档中找到一些有趣的东西,尤其是 publishing progress 字段和 encoding progress 字段。

    干杯, 乔瓦尼

    【讨论】:

    • 所以,你给我的文档,我以为视频上传成功后就可以了,因为我们需要video_id作为参数。
    • 但是,我需要知道上传进度的百分比。如果我上传了大尺寸的视频,它会让用户等待,没有迹象表明他们需要等待多少视频上传,直到完成并成功。以前,我试过这个,但我不明白。 stackoverflow.com/questions/31978053/… 再次感谢@Giovanni
    猜你喜欢
    • 1970-01-01
    • 2014-08-15
    • 2012-09-05
    • 1970-01-01
    • 2011-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多