Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

C# Tiny build issues for facebook playable ads

Discussion in 'Project Tiny' started by romiohasan, Jul 1, 2019.

  1. romiohasan

    romiohasan

    Joined:
    Apr 8, 2019
    Posts:
    13
    The current build pipeline do not support the facebook playable ads requirements.
    Current tiny Asmjs build output of index.html file loads the binary using XMLHttpRequest.

    Code (JavaScript):
    1. function b(url) { // Downloads a binary file and outputs it in the specified callback
    2.     return new Promise((ok, err) => {
    3.       var x = new XMLHttpRequest();
    4.       x.open('GET', url, true);
    5.       x.responseType = 'arraybuffer';
    6.       x.onload = () => { ok(x.response); }
    7.       x.send(null);
    8.     });
    9.   }
    Where XMLHttpRequest is blocked for playables. Here is the requirements for your quick reference:

    more here : https://developers.facebook.com/docs/app-ads/formats/playable-ads/

    Can you please inform:
    • Will unity tiny have a build pipeline that meets all the requirements for playable-ads in the next update?
    • Is there a way to refactor the current index.html file and not use XMLHttpRequest object?
     
  2. unclejey34

    unclejey34

    Joined:
    Dec 21, 2017
    Posts:
    53
  3. unclejey34

    unclejey34

    Joined:
    Dec 21, 2017
    Posts:
    53
    Did you solve it?