[PLUGIN] - VideoJS Advanced + YouTube, Vimeo, Wistia, HLS, DASH, MUX, Pre-roll Ads (plus more)

Hi, yep that’s possible, I’ll add that for you

1 Like

Excellent, thank you! Is it possible to display the graph api that Wistia shows to user?

Media: Engagement

Using the stats API, you can retrieve the data used to construct the engagement graphs at the top of the stats page for any video in Wistia.

The Request

GET https://api.wistia.com/v1/stats/medias/[media-id]/engagement.json

I’ll have a look at that. I just added the Stats API in so modifying the demo page now BUT…
I’m unsure whether or not you have to use Wistia’s own player in order to get those stats sent back.
Although this plugin allows you to watch Wistia videos, it does so by getting the m3u8 version of the video and then playing that through the VideoJS player. The API (both data/action) which I’ve just added in does work though if you provide your API key and the video ID.
I’ll dig a bit deeper anyway.

go and try the “Wistia stats” button on the demo page, put your api key in and one of your video ids and see if it works

Great! I will give it a try and let you know how it works.

1 Like

On this demo page for Wistia I don’t see the “Wistia stats” button or a place to enter api key with the video id of a Wistia video.

Can you see the 3 small buttons on the left of the video here…

image

If you click the “Wistia stats” button, it just opens up what’s shown below. Put your key and video Id in there and the API request should update itself.

image

If you click the “Watch” button, you should see your video for the Id you put in and the raw engagement data also. Although I haven’t done anything with that data, I tried using Bubbles own Chart element to plot a graph but couldn’t quite figure that out.

Great! That worked for me with my api key and a video id. Is there a way in the plugin where my users can just watch the video’s and see engagement without them having to use my api key and their video id. The goal is for them to create video that they send out to people and my platform will show them the engagement data of their video.

Yep sure. So the plugin already accepts a Key and Video Id right, so I’m guessing all you’d need is to create some interface in your app where your users would enter their API key and then you just feed that through to the data/action call. Do you have a profile area in your app? Maybe you could get your users to save their Wistia API key in their profile or something. There might be a way to get a list of all videos they’ve created in a project which would then allow you to have them in a RG and you could potentially bring up all their vids in one place.

So the good part is all the video’s are in one account which is my company payed account. Yes, I have a user profile for each user where I am planning to put each users video. Then I have an insights page where each user would be able to see the engagement data of their video. I attached photos so you see what I mean.

Great, looks good. So it looks like you’re going to need the ability to get a list of video Id’s for a specific project right? then you can get the required data for each video into your site? have I got that right?

If you do need a way to pull in all video Id’s per project then I can add another request to get all those Id’s if you want.

Yes, that’s correct our users will have a project in our account where their video’s will be.

That would be great! I hope that is not asking to much of you.

Nope… not too much, all good! I shall add the additional requests into the plugin and modify the demo page to show the data. I’ll get back to you a bit later on.

I’ve added the requests in now and if you open the popup you’ll see it like this…

Take a look at how it works as the data source for the RG its in comes from the new API.

I think you should be able to use that engagement data to plot some sort of graph but I couldn’t figure it out so I just gave you the numbers instead!

That looks great and will work for the admin side. Now on my end I need to figure out how I can get video’s with specific vid id’s be shown to the user that created the video.

Ok, so what you see now are the three videos which display under my account based on me entering my API key, so if you want one of your users to see their own videos, I’m pretty sure you’d have to get your API key for your companies Wistia account entered and then you’d have to pull back a list of projects by using the endpoint called “Get projects list data”.

You mentioned your users use specific projects? You could display a list of the projects and get the user to choose their own one. Once you have the project selected, the endpoint called “Get projects show data” will accept a project ID as a parameters which in turn gives you a list of all the videos in that project (amongst other data related to that project) which you can then use.

The field which contains the video ids is called “hashed_id”.
Does that help? It’s almost what the demo shows now, only it doesn’t allow for a project to be selected (since I only have one) but I could create multiple projects and have the demo page allow you to select one? Depending on the selection made will show you the media under that project only.

The users videos are all in one project. If I can get a list of all the video’s in that one project I would just need to add each users video to their insight page so they can see the video and insight on one page. This is just going to have to take some testing to see if it works the right way. I’m sure with the updates you’ve been doing it will work great.

Yeh I think it’s going to be a case of jump in and start designing. I can give you any help along the way and make changes here and there if needed so either way, you’ll end up making it work! I think you’ll be fine though.

I just purchased the plugin and I am going to start testing now.

Ok great thanks. I just pushed the API updates. Mail me if you need any additional help.