Securely Streaming Videos in Flutter with MongoDB based on authorization - mongodb

I am working on a video streaming platform where I only want to allow premium users to access certain videos. I can store videos in CDN and save their URLs in MongoDB but that would give access to the video to everyone having that link. Is there any way to implement this in flutter based on authorization?

Related

Connect Google Analytics to Youtube analytics

I want to track my YouTube engagement with Google Analytics how do I connect my Youtube to Google Analytics? I have tried to obtain the tracking number of the Youtube channel and import it to Google Analytics but Im not sure where to embed it.
YouTube analytics and Google analytics are two separate applications which have no connection to eachother.
If you want to import data from YouTube analytics into your google analytics account you may want to check out the YouTube analytics api which will allow you to extract data from YouTube analytics. Then you can check out the measurement protocol which will allow you to insert hits into Google analytics.
This will be something you will need to code yourselves. TBH not sure why you would want to the data is not the same you will be comparing your website or application analytics with video performance. these things are unrelated and should not be part of the same analytics.

Embed Live Streaming From Facebook Page When They Start Streaming

I am trying to know how get just the live video stream from a facebook page. In my case, I want to build an app to my church and I need just their live stream. On their facebook page are a lot of videos that was streamed, but I'm not interested that, I want just their live stream.
Problem: I don't know when they start streaming and I don't know how get it, I'd like to have just the streaming video that they start streaming.
Someon can help me with that?
IIRC you also asked this question in the FB Dev group and added the info that you do not have access to those pages. W/o access to them or having admin users granting your app access to them you cannot retrieve notifications/callbacks whenever a broadcast starts. Even when just polling them (using the endpoint CBroe mentioned) you need a page access token to do so.

Get list of Offline/Saved Videos through YouTube API

I need some help to get list of videos which is downloaded(or taken offline) by a user.
Does YouTube Rest API provide us any API to get list of saved video?
AFAIK, you will not be able to list offline videos from other users, even your own offline videos. This stack exchange post discussed the reason.
Those "offline" videos can only be played using official YouTube App,
and those videos simply can not be played using any other Video/Media
player application.
YouTube (means Google) controls the access to the offline file.
The permission is controlled on their server to access those
downloaded files and Since they are part of specific device, you
cannot access/view those using Google Account, from another device.
But if you want to list videos in youtube api, you can refer to this documentation.

How to use Google Api to upload to a single Youtube channel on a User-less app

I'm building an app that will allow users to upload videos to my Youtube channel. I have checked online about using Google Api to access the data/upload videos, but all references and examples seem to assume videos will be uploaded to the user's youtube channel, hence the process always involves using OAuth to gain approval from the user.
However, in my case the only youtube channel all users will access is mine. And I'm not even asking them to create an account on my app to upload the videos. Is there a way to do this directly from the app.
My app is an iOS app, but if you have a solution in any other language, I welcome your suggestion.
Thanks in advance
I had the same problem not so long ago. Youtube Documentation doesnt make it easy. Even though you getting access to your own Youtube channel, You still need to be authenticated using OAuth. Google makes hard for you to be vulnerable to attacks.
My solution is using a server side(API) application. What you can then do is make your iOS app hit the API.
So the tricky thing is getting the refresh token. Its hardly documented anywhere. What you can then do is follow documentation of your preferred language for the API.
The documentation can be found here https://developers.google.com/youtube/v3/guides/auth/server-side-web-apps
Get the Refresh token:
Step 1 : Hit this url in the browser https://accounts.google.com/o/oauth2/auth?client_id=ClientID_Here&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://gdata.youtube.com&response_type=code&access_type=offline
It will make you log in using your youtube credential which is your google account.
You will then have to agree for google to access your account by clicking allow.
At the end it will give you a code.
Step 2 : You should then authenticate using a clientless platform.
(eg instead of browser) Use curl instead. (There plenty of 3 minute tutorials on how to use curl)
Hit this url endpoint :
curl https://accounts.google.com/o/oauth2/token -d "code=CodeFromGoogleOAuth&client_id=ClientIDHere&client_secret=ClientSecretHere&redirect_uri=urn:ietf:wg:oauth:2.0:oob&grant_type=authorization_code"
You should then get a refresh token in the response.
There are alot of examples of how to upload from then on like
https://developers.google.com/youtube/v3/code_samples/dotnet
In the example above you have to avoid using the GoogleWebAuthorizationBroker use Googles one instead. Look for RefreshToken Field
It is not possible to allow third parties to upload videos to a single YouTube account with the YouTube Data API, and that is by design. See this Google Blog, explaining "It’s tempting to design a system in which all videos are uploaded to a single “master” YouTube account, but this is always the wrong approach."
A potential workaround is to use YouTube Direct Lite, which allows you to easily build and moderate a playlist on your YouTube account comprised of videos uploaded by your users on their accounts.

Facebook Manage copyrights without uploading video's or audio files

So my friends and I are doing a project which involves copyrights and we want to manage copyrights of our songs without having to upload a video with the audio in it. So we took a look at the facebook rights manager API, but the only thing we could find was that we have to upload a video in order to be able to check if our audio and/or video matches another video. This will be a lot of work because we are talking about hundreds of video's which would make an impossible job to upload all of the video's. So our question was "Is it possible t?o whitelist video's or manage the copyrights of audio and video's on facebook without having to upload the video's first?"
The only way to copyright files without uploading them to your Facebook page is to use the Media Fingerprint endpoint.
It allows you to specify a local copy of a file, and generate a media fingerprint that you can copyright with Facebook's Rights API. Here's a guide on doing so from facebook.
This supports music files specifically, as well as videos.