I currently have an iframe on my site with a vimeo player.
What I need is: the moment the user pauses the video or closes, store the timestamp so that in another when the user returns to the video, it returns at the point of the stored timestamp. Like Netflix video player.
It's possible?
Accessing the timestamp is possible with Vimeo's Player Api. Making use of the timeupdate listener, the current playback position can be saved. As for how the timestamp is saved, there are many different options (you could store the data client side, server side, in a db, etc...). Then when a user returns to the page you could check if a timestamp exists and set the video's playback position accordingly with setCurrentTime()
Related
I have coded this app that onClicklistener fetch data from the database and store them in fragments that are displayed in a frame layout on the main activity, Now I want the data to be stored in a device permanently in order to be not fetched every time the button with onclicklistener is clicked.
Sorry I am new to this.
You can do
localStorage.setItem('keyname', itemtostore)
But this is to simple. We need to know that type of data you want store, to do the right treatment
Question about Marketing Cloud Connect - In case of Individual Email Result in Salesforce, an email preview is sent from MC to SF object along with a thumbnail preview of the email template (as base64 encoded image). This thumbnail has two problems.
a. isn’t clear enough for the sales agent to see what was sent to customer
b. can’t find what offer percentage was given to customer as the preview has ampscript value instead of actual value.
There is no way to change the default configs of MCC to increase the thumbnail size. To solve this and improve the image resolution, I’ve thought of below solutions. Is there any other possible way that you’ve done?
From customer send log, take ‘view_email_url’ and get the html using a visual force page and remove all the ‘https://click…xx.com/’ links to ensure click/ open counts aren’t impacted. Downside - # of api calls to make are higher
For every email, create a jpg preview of the email template and store it in MC and store this in SF in a custom object as ‘EmailName vs EmailPreviewUrl’. And, whenever a marketer creates a new email, they have to ensure that they create a jpg copy in MC and update associated record in Saleforce custom object. Downside - sales agent will not know what % of offer is given to customer (ps - % of offer is decided in MC automation based on raw order information we’ve about this customer). To manage this downside, we can send the offer details of each customer to SF using updateSingleSalesforceObject method everytime an email is sent. To do this, all the campaigns should be standardized to some extend.
Any other thoughts? is there any configs that I can flip to increase the image size?
To answer this question, we ended up creating a cloudpage code resource (similar to API) that returns the complete HTML of 'view_email_url' (aka view as web page) for a given email + Subscriber + datesent + BU. We used SSJS to query sendLog DE using these inputs to figure out the view_email_url value. To avoid counting view_email_url opens to tracking opens, we wrapped the open counter pixel inside a context variable - something like below.
%%[
IF _messagecontext != 'VAWP' THEN
]%%
<custom name="opencounter" type="tracking" />
%%[ ENDIF ]%%
I am currently using the Web Player SDK / Web Api to control spotify playback in my application. The current issue I am running into is that whenever I play a song, I cannot detect the end of the playback of the song because the
state.track_window.next_songs
when listening through
player.addListener('player_state_changed', state => { });
always has items in the "Play Queue", which causes detection almost impossible.
this:
state && state.paused && state.context && state.context.metadata && state.context.metadata.uri == null typically works for, however in the case that state.track_window.next_songs has anything in it, paused is never triggered.
I am wondering if anyone has a solution for this, or if there is a way to clear our the play queue for a specific spotify player instance?
Thanks!
I'm not sure if I understood correctly, but if you want to detect when a song finished playing you can have an object called currentlyPlaying with the ID of the currently playing song and then when there is a state update, check the ID of the state.current_track. If it's different from your currentlyPlaying.id then it means the song finished and the next one started.
----- EDIT ------
There is a way to have the next_tracks array empty. If you play songs using the "uris" body parameter you can add an array of songs to play and in the end of it the next_tracks array is empty. See this screenshot:
To achieve this take a look at the Spotify API:
https://developer.spotify.com/console/put-play/?device_id=&body=%7B%20uris%3A%20%5Bspotify%3Atrack%3A3BQHpFgAp4l80e1XslIjNI%5D%20%7D
I am only using the "uris" parameter not the "context_uri" and I am passing only 1 song in the array. After the song is played nothing is played after.
Could you please guide me how doing this. I have to get used location changes and have to send some information depend on that location.
See https://developers.google.com/glass/location and https://developers.google.com/glass/v1/reference/locations for complete information about using Locations with Google Glass.
Keep in mind that you need to request the additional scope https://www.googleapis.com/auth/glass.location in order to get any location information.
Once you have done this, Glass will attach the most recently known location (usually where you have been sometime in the past 10 minutes) to any timeline items reported to you.
At any time you can get a list of location updates available, or the "latest" location available from Glass. Additionally, you can subscribe to the "locations" collection (see https://developers.google.com/glass/v1/reference/subscriptions) and you will receive a location change notice roughly every 10 minutes which includes an ID to fetch the associated location.
We can insert subscription for location changes when a user subscribes our Glassware application. After that mirror API will notifies location changes to given url.
Like this
//create a Subscription for location changes
Subscription subscriptionLocation = new Subscription()
{
Collection = "locations",
UserToken = userId,
CallbackUrl = Url.Action("Notify", "Notify", null, Request.Url.Scheme)
};
//insert a Subscription
mirrorService.Subscriptions.Insert(subscriptionLocation).Fetch();
Here is the link to where the data can be found. Scrolling down to Surface Data : Daily and selecting the Global and U. S. Web Page Icon. On the next page, Select the radio button Country and press continue. From the next page's drop down menu, select any state and then press the radio button for entire state (I need more than 100 stations per day).
The next page allows you to select the date range.
I am dumping these data files into excel and sorting (which is a pain, since it could obviously be
automated).
Is there a way I can access the most current data via a script (VBA or otherwise)?
My main problem is that I can't send the server a simple request to obtain the data. Also, there is an FTP site but only allows .gz files to be downloaded, each over a gig, so its not reasonable for my situation.
Any help would be appreciated!
There National Climatic Data Center has several data APIs available for this.