Setup and Installation

If you currently run your site based on a Magento 2 based shop, it is rather easy to integrate it with Xvid MediaHub. By installing the Xvid MediaHub Magento plugin, you can:


So let's start with  setting up the necessary pieces...

Step 1: Install the Xvid MediaHub plugin in your Magento shop

Step 2: Create an application to use with your site in your Xvid MediaHub account (If you have created an application already as part of some other tutorial, you can skip this step)

An application sets up a set of alternative "login" credentials allowing you to delegate API access under your account to one (or more) applications (e.g. a script, your website, etc.). This way you don't need to leak your actual username and password into an application config file and you can also at any time disable API access of a certain application or re-create the entire application with new credentials in case an app got compromised or insecure without harming your overall account or any other app in your account. 

So let's switch to the "Apps" tab and click "Add App", then enter a name for your new app and click "Create":
 

 

The newly created app will now show up in the grid. To obtain the corresponding application credentials, click on the "Edit" button. From the popup-window, copy&paste your Client ID and Client Secret. We'll need them in the next step:
 

Step 3: Configure your new Xvid MediaHub Magento plugin

 

Step 4: Add a MediaHub hosted video to a downloadable product

The file id above serves just as an example. Make sure you put the file id of your own video that you want to sell. You can look up the file ids for all of your Xvid MediaHub hosted videos in your Xvid MediaHub dashboard (in the "Info" tab, click on "Details" next to a completed conversion job. An overlay dialog will pop up that shows the file ids of each output video belonging to this job and you can copy the file id to the clipboard).

 

Step 5: Video Streaming (Optional)