Quantcast
Channel: Moodle for mobile
Viewing all articles
Browse latest Browse all 8344

Re: Decrease file size for poor internet connections

$
0
0

volgens Cássio Queiroz.  

Thank you very much Daniel for your answer!

I've tried to apply the transcode function where you pointed me to, but now i am stuck with this problem.
The transcode function requires a path to the file but, the only path i got (at least in the uploadAudioOrVideo Function) has the protocol cdvfile which is incompatible with the transcode.

So i followed how the functions works with that path and came across this block:


  1.   promise = $mmFS.getExternalFile(path).then(function(fileEntry) {
  2.                     return $mmFS.getFileObjectFromFileEntry(fileEntry).then(function(file) {
  3.                             if (file.size > maxSize) {
  4.                                  fileTooLarge = file;
  5.                             }
  6.                         });
  7.                     }).catch(function() {
  8.                     });

Unfortunately when i try to use these functions i got the error "entry.file is not a function".


Any ideas on how i should proceed ?


Thank you very much,

Cássio 



Viewing all articles
Browse latest Browse all 8344

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>