Timestamp from URL

QuickTime, iTunes and other multimedia players allow to get the time stamp (a specified time in a movie or music) via scripting,

But I wonder if there isn’t a more universal way to get the time stamp, simply by targeting the url of the running movie /music, which should contain the time stamp as well.

Maybe my assumption applies only to online videos / music - I’m not sure, so I’m asking you. What’s your experience?

I’m not sure that it works that way. A movie file doesn’t know what a URL is, and a URL doesn’t know what a timestamp is. I don’t think there is a standardized method of passing on this information.

Youtube provides a way to connect the two. If you play a portion of a video there and then right-click, you should get the options to ‘copy video url’ and ‘copy video url at current time’. If you select the latter, you will get an url with a time element appended in seconds, e.g. ?t=163. But this isn’t universal. Note that on youtube, you don’t get the standard contextual menu when you right-click a video… you get a custom menu. While Youtube offers it, Dailymotion does not (right-click offers a standard contextual menu). It depends on the site (or the site’s player).

Browsers are generally painful (at best) to control with applescript, but as javascript is integral to modern web pages and web video players, you might be able to do some things using javascript.

As an aside, youtube generally avoids working without javascript enabled but I played a video, switched it off, reloaded the page and it began playing the video. I immediately right-clicked and got a standard contextual menu. I have a setting that automatically turns JS on for youtube so it came back on and a second later I got the custom menu the site typically offers but it showed how the video experience relies on javascript.