API xhr/ajax

Greta are integrated in to the XMLHttpRequest object. This allows Greta to work with most modern audio and video players with out any modifications. This do also mean that this will wrap around all your current XMLHttpRequest requests. Most of your request will yours pass throw because we do filter out what request should get directly to your server and with should be optimized by Greta. Below are some rules that Greta do follow to filter the requests.

Rules

  • If its any thing else then a GET request send it to the server.
  • If it do contain .m3u8 or .mpd the request is sent to the server.
  • If it do not contain .mp4, .ts, .jpg, .png, .gif, .jpeg, .bmp the request is sent to the server.

So if a request is a GET and do not contain .m3u8 or .mpd and do contain .mp4, .ts, .jpg, .png, .gif, .jpeg, .bmp the request will go in to Greta.

This do mean that every images of the type listed and audio/video files will go to Greta but the request for your api will go throw and get to the server with out Greta touching it.