Skip to main content

Uploaded presets take long time to load on mobile devices

Comments

3 comments

  • Erwin Lukas

    Hi Kim,

    How do you delivering the video to your end user? As soon as the video is uploaded to your account, the original video should be available immediately. The very first request of course can be a little slow, since our CDN needs to fetch the video first. But any subsequent request will be faster since it's now cached on CDN.

    However, if you are delivering with some transformation, then the delay may because the transformed video needs to be generated first. This can be prevented by using eager transformation (and with eager_async: true)

    Hope this helps.

    0
  • Moaching ApS

    Hi Erwin

    Thanks for replying.
    The videos are delivered using jquery and api-call.

    Example:

    var cloudFormData = new FormData();
    cloudFormData.append("api_key", result.apiKey);
    cloudFormData.append("file", cfile);
    cloudFormData.append("folder", folder);
    cloudFormData.append("signature", result.data);
    cloudFormData.append("timestamp", timestamp);
    cloudFormData.append("upload_preset", "test");

    fetch(url, {
    method: "POST",
    body: cloudFormData
    }).then((response) => {
    return response.text();
    }).then((data) => {
    var datafetch = jQuery.parseJSON(data);
    formData.append("mediaUrl", datafetch.secure_url);

    No transformations are processed during the upload and neither eager transformations.
    Makes sense that the first fetch takes a long time, as after the first fetch the videos are played immediately.

    Is there anyway to improve the first fetch?
    Thanks.

     

    0
  • Francis Tagbo

    Hi Kim,

    Do you mean you are delivering original videos (without transformation)? You could create a support ticket to us thru https://support.cloudinary.com/hc/en-us/requests/new and share with us some example URLs so we could check on them.

    Regards,
    Francis

    0

Post is closed for comments.