Acquire shared Video Title - google-glass

I am pushing a contact card to the glass to allow user to "share" with me.
But how would I acquire a title for the video the user has shared with me.

The images or videos taken from Glass and shared with a Contact don't have a title by default. However, if your Contact has the ADD_CAPTION shareFeatures, this will let the user add a text caption before the media is shared with your Glassware.
The transcribed text will be in the text property of the timeline item.

Related

Google Photos API: Identify "motion photos"

For media items that are "motion photos", the Google Photos API allows you to append "=dv" to the base URL of a media item to get the item as a "video/mp4". Without the =dv, the item comes back as a "image/jpeg". This works more or less as described in the docs.
What I can't figure out is how to tell whether or not a given item is a motion photo. The metadata returned for motion photos looks to be the same as for regular photos. Is there something I'm missing or do I need to try loading each photo as a video and handling the 404s?

How to get direct permanent link to public image on Google Photos?

I have Google Photo public album and I want to receive direct links for photos form this album. This links I'll use on my blog web pages. How I can to do it?
P.S.: I know that Picasa Web Albums had this feature.
At this time Google actively changes its image service behavior. Now, there is not any algorithms how to receive direct and permanent links to your shared photos. The URLs are received by the right-button click, like https://lh3.googleusercontent.com/(LONGLONGCODE...)=w800-h600-no, are temporary and live one-two days and then will be closed.
You can try new Google service - Google Archive Album. This service was created as holder for albums from the deleted Picasa service. But it contains photos and albums from Google Photo too. The Google Archive Album have two greats advantages:
links are much shorter the from those of Google Photos,
this links are permanent!
For working with Google Archive Album you need to follow rules:
create standard (NOT PUBLIC) album in Google Photos.
go to Google Archive Album and make sure that you see the new album.
add to album required photos and only now change its type to the public by creating the shared link to it.
again go to Google Archive Album, open your album.
click on first photo.
right-clink on photo image and copy link to the clipboard.
insert received link where you need.
repeat steps 5-7 for others photos.
voilĂ !
But how long time Google Archive Album will working I don't know :(
P.S.: If you don't know - URL links from Google Photos and Google Archive Album can be tuned. For detail reads the special site.

how to clear session automatically after a single event in django

I am developing a e-commerce project using django.It is a image based project where user can download image after subscription.
There is a single image download subscription package available to the user where user can only download an image for a single time.My home page have an image thumbnail.
If any user wants to download any image ,he can click on the selected image and then will take the user in the image detail page of the clicked image with download button option.If he subscribed,he can download the image.
Though its a single image download subscription,so user can only download a single image.but the problem is,after a single download,if the user don't leave the page,he is able to download the same image for an unlimited time.I want to restrict it but i have no idea how to do this in django.
After a single download,redirecting the user to the home page or my image thumbnail page can be solution,but i don't think it will be great idea.Because there will be a possibility to disconnection of internet or something right after the download event which will create situation where may be the user can not complete the download action.
so i want to settle the user in the image download page after a single download and immidietly wants to clear the session and restrict him to download the same image for unlimited time.
Can it be possible to clear the session after a single download,i think if i can clear the session after a single download or an event or whatever you say,then the user can not download the image for twice.Is it possible to clear the current session after an event in django?

How is SoundCloud embedding an HTML5/JS widget on Facebook?

Here's the scenario I'm seeing -
You click to post a sound from SoundCloud to Facebook
It embeds a player in the post that can either be clicked on to take you to the original item on SoundCloud OR you can click a Play icon to play the sound right in your feed.
The player is a Javascript/HTML5 player (which you can see by viewing source) HOWEVER if you take the embedded URL and put it in the Facebook open graph debugger you'll see that it appears to be directing to embed a Flash SWF
How is SoundCloud doing, what appears to be, some kind of redirect trick to get a "og:video" SWF to turn into a JS/HTML5 player?
I notice that there is an "og:type" of "soundcloud:sound" so is it some kind of whitelist/Facebook application scenario?
Try it yourself with this:
OG debug: https://developers.facebook.com/tools/debug/og/object?q=https%3A%2F%2Fsoundcloud.com%2Fsystek_music%2Fcyberoptics-sub-antix-the%3Futm_source%3Dsoundcloud%26utm_campaign%3Dshare%26utm_medium%3Dfacebook
I did find this bit of info from the SoundCloud site about how they've switched to JS players (that fall back to Flash on older browsers): http://help.soundcloud.com/customer/portal/articles/1219149-where-has-the-flash-widget-gone-
This may only be a partial answer. But there exists a special Facebook Open Graph Music program which "is only available to whitelisted partners at this time". This includes a bridge which has the goal to "enable play buttons on feed stories on Facebook.com that can play and pause tracks and indicate which is playing."
However, apparently you can include both Flash (application/x-shockwave-flash) and HTML5 video (video/mp4) formats in the og:video:type property.

Application permissions

I have enabled a user of my application to enable permissions to view photo albums.
However, what I really want is to not only enable the application to access the photo albums but to enable the user to select one image from the album that other users of the application can then see thereafter.
This is a competition application so the user selects an image and that image is included in the competition but users of the application must be able to view so as they can vote on it.
Must I take the image from the photo album and upload to a hosting server or is there away I can do this?
What you need to do is an application in your server which saves the photo the user has selected. Then you save the reference of this photo into a database and when other users comes to your application you request all of these in the database and show them back to the user.
This is a pretty basic programming structure, so Facebook serves you with a lot of shared data through many profiles. On the other hand, you are in charge of what you do with these data, how you use it and in which applications you implement it. Remember when you do this, you have to provide a privacy policy and a terms of use document to avoid any legal consequence to your end.