In Brightcove, can I retrieve a video's thumbnail WITHOUT a media API token? - brightcove

I would like to use Javascript to retrieve thumbnail URLs from Brightcove-hosted videos.
I can't see a way to do that without exposing my Media API token to the client browser. (The with-token method is documented here.)
I don't need a token to show the whole video, so it seems insane and unnecessary that I need a token to get the thumbnail url, which obviously I would want to show to the user anyway.
The only workaround I can devise is to create a middleman interface on the server. (The client JS makes a request to my server, which uses the token to request the thumbnail from BC, then returns it back to the JS.) That's just annoying.
Am I missing something? Is there an alternate way to retrieve video thumbnails in the client without exposing the Media API key?

According to Brightcove's support, they tell me that the answer is "NO".
They do recommend a server-side relay, which is what I ended up writing, and it works fine.
Disappointing, though.

Related

Get currently playing video in Youtube

I need to get the title of the currently playing video in my Firefox browser from an external app using youtube API, or at least my last played video in my YT account. The goal is to get the name of the song i'm listening to and putting it in a file. I've got another app (using Discord API) that will read it and use it.
My first idea was to get the watch history, but this function was removed from the API since late 2016.
I managed to authentificate my Google application to access my own channel with Oauth 2.0, but from here I'm stuck. There don't seem to be any request that gets your own last watched video.
I also thought of a completely different way, by using a Firefox extension to get the title, but storing it and passing it to the other app will not be an easy thing (localStorage and sessionStorage are both in AppData folder, and my other app can't access it).
Does anybody know a way to do this? I'm starting to be kind of desperate.
I was looking for something similar and came across this in my search: Cross-Domain Cookies
Sharing cookies between 2 applications via a 3rd party might be of help here although it would complicate things.

Upload image to imgur without exposing client_id, but directly from browser

OK, I want to start using imgur for my new web app (on all browsers and my server) and will submit anonymous images for paid storage, but from the user's browser to minimize loading on my server. Almost all the software runs in javascript client-side (with very few server interactions... hence fast and distributed).
Currently the only way I can see using the ID from imgur is to first bring the image to my server and then send to imgur with my ID. Because putting it into the javascript on the browser makes the ID visible to the world.
I was hoping for some kind of solution like: I call imgur to get a token good for ONE time use only. The user gets the token from my server (which I would have previously polled imgur to get) and then I send to my javascript code on their browser, which would upload the image directly to imgur with the token. The token is then dead, and it doesn't matter if someone else sees it, it cannot be used again.
Does imgur API have anything like this? Or maybe another solution? Key points are:
Don't upload to my server since I wont keep it there anyway
Don't expose my client ID to world on user's browser in Javascript
Any help would be appreciated.

How to upload an image with metadata like Description and title

I'm currently writing an WebApi endpoint that is to accept image uploads with associated Descriptions and titles. I want to be able to send this information up in one post rather than sending the image and then the meta data in a subsequent call.
The client sending this is a mobile application written in Xamarin.
Searching the internet I struggled to fine any direction to doing this kind of thing although I'm sure it's possible.
Any help or pointers would be appreciated.
USE CLOUDINARY
upload image to cloud with easy api like
https://res.cloudinary.com/demo/image/upload/w_150,h_150,c_thumb,g_face,r_20,e_sepia/l_cloudinary_icon,,x_5,y_5,w_50,o_60,e_brightness:200/a_10/front_face.png
The DotNet SDK is here
and a tutorial to add metadata along

Share private video to some google accounts through API

I'm trying to figure out wheter it is possible to have a private video on youtube that I could share with particular Google Accounts through API.
I would have a separate web application that would have a Google signup and after signup I would enable that Google Account to watch my private video.
Ideally I would also want to embed the video to the web application (but I think I can do this rather easily if I'm an owner of the video).
Ispossible to have a private video on YouTube that I could share with particular google accounts through API.
No you cant directly share a video with another user like you could a file on google drive.
You could show the video on your own site, but I am not sure its something I would want to try. The thing is being that its a private video you and you alone have access to see it. Your going to have to authenticate your application and get a refresh token back which will allow you to access the account and the videos on the account.
Then you will be able to use that refresh token to get an access token to show other people the video via your website. The problem you will have is if the refresh token stops working (rarely happens but can happen) you will have to authenticate it again before your solution will work.
Note: Service accounts don't work with YouTube API. So don't bother going down that road.
If you know the ID of a video, you can access it. You can share the ID,or an embedded link with someone.
The api only hides the info, not blocks it. So you would need to hold the info elsewhere for referencing.
So as long as you know the id's of the related video's, you can do what you want with them.
However, if you are wanting to monetise them on the side, I would recommend against it. Best to read the user agreement you have with YouTube.

Is there a general image service "unshort" api service?

I am currently updating my Twitter client Nymphicus to use http://unshort.me/ to unshorten all the links in tweets. Before that I implemented all the url shortener APIs myself but there are so many...
With images it is quite the same: I do implement all the different APIs out there to get thumbnails but I wonder if anyone knows a service similar to unshort.me which gives you back the url of a thumbnail if you send the image link?
http://embed.ly/ does it, 10k requests free. otherwise it's a pay service.

Resources