If you're using Wistia as your video management solution and Cloud storage, you can upload user generated videos to it from our HTML5 video ingest API by using its Blob output option and Wistia's video upload API. The advantage of this approach is that you're getting video files from your users in 1 standard format (e.g. MP4 or WebM) without needing any server-side transcoding in place.

In order to upload videos to Wistia from our API, there are two options to accomplish this (see here http://wistia.com/doc/upload-api):

  1. Submit the Blob object as HTTP form (you can instantiate and populate a HTML5 "FormData" object) and submit it via a plain HTTP/POST (no XMLHttpRequest required). The user session needs to be authenticated against Wisti‚Äča as the authentication cookie automatically gets sent along with the request)
  2. Submit the Blob via the XMLHttpRequest API (or the jQuery.ajax(...) wrapper). This request needs to be explicitly authenticated and because it is initiated from the client side, you must not use username/password authentication.

Wistia is offering OAuth2 3-legged authentication with refresh tokens. The idea is to store the refresh token server-side, generate a short-lived access token from it every time you want to upload a file, send that access token to the client and put it into the "Authorization" HTTP header, as documented here: http://wistia.com/doc/oauth2.

Please note that OAuth2 has a fairly steep learning curve. The aforementioned flow is just one out of many authentication schemes you can employ.

In this case we assume that all videos get uploaded into a single (=your) account. This is why we recommend using option 2, which is certainly much easier to implement.

Did this answer your question?