Skip to specific times in a player?

594 views
Skip to first unread message

Michael Parker

unread,
Dec 15, 2011, 5:27:26 AM12/15/11
to Justin.tv API Developers
Hi all,

I was wondering if, either using the JS API or the lower-level Flash
API, it's possible to skip to specific times of a non-live video? (Or
any video whose length I can get from the REST API.)

Thanks,
Mike

Mike Ossareh

unread,
Dec 15, 2011, 9:47:00 AM12/15/11
to justintv-ap...@googlegroups.com
Hi Mike,

You mean using the t variable? similar to: http://www.twitch.tv/vodhighlighter/b/302291635?t=5m

t takes a range of formats, defaults to seconds if no unit is specified.

Cheers,

mike


--
You received this message because you are subscribed to the Google Groups "Justin.tv API Developers" group.
To post to this group, send email to justintv-ap...@googlegroups.com.
To unsubscribe from this group, send email to justintv-api-deve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/justintv-api-developers?hl=en.


Michael Parker

unread,
Dec 15, 2011, 2:59:08 PM12/15/11
to justintv-ap...@googlegroups.com
Hi Mike, thanks for the prompt reply!

I'd like to create a table of contents for a video, making it easy to
skip around to different parts. So I was thinking I'd embed the video
using the JS API with custom=true next to the ToC, and then using some
method on the returned object to skip around. But it looks like I can
only do pause_video and resume_video.

Any ideas on a workaround? The only one I can think of is every time
you click a link in the ToC, it removes the last embedded player from
the DOM, and then creates a new embedded player that was created with
the new t parameter that you pointed out. (Assuming that the JS API
recognizes that t parameter, as I couldn't find it on the wiki page.)

Thanks!

- Mike

Mike Ossareh

unread,
Dec 15, 2011, 3:04:35 PM12/15/11
to justintv-ap...@googlegroups.com
The t parameter is new, the JSAPI may or may not support it - let us know if it doesn't. 

We're working on our VOD stuff right now, I'll forward your thoughts to the main dev on that project.

Mike Ossareh

unread,
Jul 2, 2012, 2:17:21 PM7/2/12
to Michael Parker, justintv-ap...@googlegroups.com
Hi Mike,

We're beginning to think more about the architecture and expectations of a new player. We expect to start a very basic version in the next month; over time we'll build that version up to be a full replacement for our current player. 

A key part of the design for this new player is around where to draw the lines around what can be done in JS, and what can't be done in JS. I personally believe the player should expose the ability to fetch the time from the player. As for setting it - I can see some cases where our state machines might not play nicely with that (you could cause viewers to skip ads, etc) so that will take a bit more time to get straight.

I'll forward this email on to our player guys and I'll keep you in the loop as we build this out.

Cheers,

mike

On Fri, Jun 29, 2012 at 11:54 PM, Michael Parker <michael....@gmail.com> wrote:
I know this is a really old thread, but I was wondering if anything
came of this? I watch a lot of competitive TF2, and a lot matches are
defined by key, pivotal plays that may only last a few seconds or so.
What I'm looking to build is a site where when these plays happen, a
viewer can create a public bookmark associated with the video so that
other players can find them easily. And so you can crowdsource a
highlight reel.

All I'd need is a way to get the current time from the player (for
when the user creates a bookmark), and a way to set the current time
of the player (for when the user clicks on a bookmark). It's seems
like this is just programmatically running whatever code is used to
display the current time in the player, and whatever code allows the
user to jump around the video when clicking on the progress bar,
respectively. I know you have a lot of other people clamoring for
features but pleeeeeeease I would kill to have this >.<

- Mike

moocat

unread,
Jul 2, 2012, 6:08:18 PM7/2/12
to justintv-ap...@googlegroups.com, Michael Parker
So the t parameter doesn't work with the API player?
I've also got something like this on my todo list, but if a specific time can't be set in the player the whole archive functionality is kind of pointless really.
mike


>> >> To unsubscribe from this group, send email to

>> >> For more options, visit this group at
>> >> http://groups.google.com/group/justintv-api-developers?hl=en.
>> >>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Justin.tv API Developers" group.
>> > To post to this group, send email to

>> > To unsubscribe from this group, send email to

>> > For more options, visit this group at
>> > http://groups.google.com/group/justintv-api-developers?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Justin.tv API Developers" group.
>> To post to this group, send email to

>> To unsubscribe from this group, send email to

>> For more options, visit this group at
>> http://groups.google.com/group/justintv-api-developers?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Justin.tv API Developers" group.
> To post to this group, send email to

> To unsubscribe from this group, send email to

Michael Parker

unread,
Jul 2, 2012, 6:15:24 PM7/2/12
to Mike Ossareh, justintv-ap...@googlegroups.com
Thanks for the update, Mike. As for setting the time, if the JS
behavior respected the same advertising "rules" as manually clicking
around on the progress bar does, that would be fine by me.

Thanks!

moocat

unread,
Jul 3, 2012, 3:49:06 AM7/3/12
to justintv-ap...@googlegroups.com, Mike Ossareh
The t param is nowhere in the documentation, I found it through twitter http://twitter.com/TwitchTV/statuses/127182020089614336 
I haven't looked into the api player yet but I assume its basically the same as the onsite one(?) so doing something similar should be possible

Hi moocat,

Since I've only read the API documentation and don't have any real
practical experience, are you asking if you can pass a "t" parameter
to the options object that is used when creating the player, as
described at http://apiwiki.justin.tv/mediawiki/index.php/Javascript_API?

Does it seem like a reasonable work-around to programmatically jump
around in the video is to re-create the player each time?

Thanks,
Mike 

burd...@gmail.com

unread,
Dec 20, 2013, 10:08:13 PM12/20/13
to justintv-ap...@googlegroups.com, michael....@gmail.com
I am very interested in updates to the following questions, raised in this thread a while ago:

Is it possible to set a start time for an embedded VOD using the object code or some other method?
Is it possible to fetch the current time that the VOD is playing?

Reply all
Reply to author
Forward
0 new messages