vimeo视频无法下载https://vimeo.com/235772905 ionic 1

时间:2018-07-12 07:30:42

标签: angularjs vimeo ionic-v1

this is my vimeo video url 我正在从url以上下载视频,并且始终将其保存为0字节到我的手机内存中,我需要在手机内存中下载完整的视频

$cordovaFile.checkFile(cordova.file.externalApplicationStorageDirectory + 'foldername/', filename)
.then(function (success) {
    console.log(success)
    //alert(JSON.stringify(success));

}, function (error) {
     console.log(JSON.stringify(error))
     // alert(JSON.stringify(error));
  $cordovaFileTransfer.download(url, targetPath, {}, true).then(function (result) {
      console.log(JSON.stringify(result))

  }, function (progress) {

   $scope.progresss1 = 0;
   $scope.progresss1 = (progress.loaded / progress.total) * 100;
   $scope.progresss1 = Math.floor($scope.progresss) + "%";


 if (((progress.loaded / progress.total) * 100) == 100) {
 alert('download complete');
 console.log('Downloading complete intro video');

 }

  console.log(JSON.stringify(progress));

  });

  })

0 个答案:

没有答案