We need to decide if we want an embedded iframe or an embedded video in a Flutter control. As far as embedding is concerned, I would vastly prefer if we embedded the video directly in Flutter (assuming we can). An iframe will be quite hacky and is unlikely to respond to the user's device nicely. I would also prefer if we avoid webviews, including webviews internal to the video player library we choose. I'm willing to be convinced otherwise... but I will need to be convinced. 😉
The Vimeo API provides both a player_embed_url and a complete iframe. For example:
<iframe src=\"https://player.vimeo.com/video/1011864064?badge=0&autopause=0&player_id=0&app_id=288763\" width=\"1920\" height=\"1080\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write\" title=\"The Simpler Side of Buddhist Doctrine\"></iframe>
Resolve privacy settings
Unfortunately, at the moment both of the above methods return:
"Sorry ... Because of its privacy settings, this video cannot be played here."
I will check with @brihas whether or not we can loosen these privacy settings on Pariyatti's Vimeo account. If not, we will need to download each video in the job that indexes them and play them from inside of AWS. It's preferable to stream them from Vimeo, since Pariyatti already pays for Vimeo and it is definitely the simpler and faster path forward, to begin with.
I'm not sure which privacy settings Pariyatti is setting on its videos. Here is a matrix comparing them:
I would almost assume "unlisted", except that the videos are most certainly discoverable through Google. Unlisted videos can be embedded using a privacy hash. (See: Overview of video privacy settings)
I'm not sure how the videos are getting that "whitelist" setting. I'm guessing that's "specific domains"? Perhaps there is finer-grained control of privacy settings somewhere. Hopefully we can whitelist the Pariyatti mobile app, somehow? Requests from the app do not come from a single domain, obviously, so limiting access that way is problematic, if that's how it's currently done.
This task coincides with the work done in https://github.com/pariyatti/kosa/issues/101
Which embed method to use?
We need to decide if we want an embedded iframe or an embedded video in a Flutter control. As far as embedding is concerned, I would vastly prefer if we embedded the video directly in Flutter (assuming we can). An iframe will be quite hacky and is unlikely to respond to the user's device nicely. I would also prefer if we avoid webviews, including webviews internal to the video player library we choose. I'm willing to be convinced otherwise... but I will need to be convinced. 😉
The Vimeo API provides both a
player_embed_url
and a complete iframe. For example:https://player.vimeo.com/video/1011864064?h=28f45fba0b
...is equivalent to...
Resolve privacy settings
Unfortunately, at the moment both of the above methods return:
I will check with @brihas whether or not we can loosen these privacy settings on Pariyatti's Vimeo account. If not, we will need to download each video in the job that indexes them and play them from inside of AWS. It's preferable to stream them from Vimeo, since Pariyatti already pays for Vimeo and it is definitely the simpler and faster path forward, to begin with.
I'm not sure which privacy settings Pariyatti is setting on its videos. Here is a matrix comparing them:
I would almost assume "unlisted", except that the videos are most certainly discoverable through Google. Unlisted videos can be embedded using a privacy hash. (See: Overview of video privacy settings)
Looking at the API response, I see this:
I'm not sure how the videos are getting that "whitelist" setting. I'm guessing that's "specific domains"? Perhaps there is finer-grained control of privacy settings somewhere. Hopefully we can whitelist the Pariyatti mobile app, somehow? Requests from the app do not come from a single domain, obviously, so limiting access that way is problematic, if that's how it's currently done.