Is it possible to get parameters from URL?
We would like to enable time stamped embeds (&t=1).
It would be nice if we could get parameters in a dictionary or maybe even typed support for time stamp
With my next version I am looking at storing more of the metadata for the video. I hadn't though of grabbing the timecode from the URL, which I think is a good idea. I've added it to the github issue so that I remember to add it in.
As a work around for now, you can get the original URL pasted into the property editor.
The following code should get you out of trouble:
//Get the URI from the Video Url Parameter
Uri myUri = new Uri(Model.Content.GetPropertyValue<VideolizerVideo>("myVideo").Url);
//Parse "t" from the querystring
string timecode = HttpUtility.ParseQueryString(myUri.Query).Get("t");
Brilliant, I was actually looking for this (how to get the "raw" URL).
But thought I could only get the Embed URL which doesn't have the parameters (correct?).
Yes, that correct, the URL is the original URL to the video (including query string parameters), however the embed URL doesn't include any of the query string, so you should be able tack the ?t=X to the end of the embed URL.
Time stamp support
Is it possible to get parameters from URL? We would like to enable time stamped embeds (&t=1). It would be nice if we could get parameters in a dictionary or maybe even typed support for time stamp
Thanks Sean,
With my next version I am looking at storing more of the metadata for the video. I hadn't though of grabbing the timecode from the URL, which I think is a good idea. I've added it to the github issue so that I remember to add it in.
As a work around for now, you can get the original URL pasted into the property editor.
The following code should get you out of trouble:
Brilliant, I was actually looking for this (how to get the "raw" URL). But thought I could only get the Embed URL which doesn't have the parameters (correct?).
Thanks for your help and useful datatype!
Thanks! Glad that its been useful to others too!
Yes, that correct, the URL is the original URL to the video (including query string parameters), however the embed URL doesn't include any of the query string, so you should be able tack the ?t=X to the end of the embed URL.
is working on a reply...