Javascript and embedded viodes

1,387 views
Skip to first unread message

oskar

unread,
Oct 3, 2012, 12:27:36 AM10/3/12
to twitc...@googlegroups.com
Hi,

I'm trying to embedded a video that only plays part of the video, eg 2min->3min. I'm have managed to make the player start at 2min but not stop playing/giving me a javascript callback when it reaches 3min. It seems like that can't be done, it looks like the  javascript api is only for live streams, correct? I'm also having some problems getting auto_play=true to work. Got any pointers?

I'm tring to make a player that plays 1min of a video and then plays few minutes of another video or just skips a few minues of the video(seek).

Oskar

Mike Ossareh

unread,
Oct 3, 2012, 6:55:35 PM10/3/12
to twitc...@googlegroups.com
Hi Oskar,

We're just beginning to shape up to work on our new player - we'll be exposing a pretty rich JS API - you should be able to start using it before the end of the year.



Oskar

--
You received this message because you are subscribed to the Google Groups "Twitch API" group.
To post to this group, send email to twitc...@googlegroups.com.
To unsubscribe from this group, send email to twitch-api+...@googlegroups.com.
Visit this group at http://groups.google.com/group/twitch-api?hl=en.
 
 

Baran Kahyaoglu

unread,
Nov 2, 2012, 1:07:32 PM11/2/12
to twitc...@googlegroups.com
Wanted to post just so you know that there are people really looking forward to a new javascript player.
I've been hoping/waiting for it for almost 2 years now, oh please make it good ( and finish it quick! :) ). 
creating custom applications with flash player is painful.

4 Ekim 2012 Perşembe 01:55:56 UTC+3 tarihinde Mike Ossareh yazdı:

Mike Ossareh

unread,
Nov 2, 2012, 3:13:54 PM11/2/12
to twitc...@googlegroups.com
On Fri, Nov 2, 2012 at 10:07 AM, Baran Kahyaoglu <brnkah...@gmail.com> wrote:
Wanted to post just so you know that there are people really looking forward to a new javascript player.
I've been hoping/waiting for it for almost 2 years now, oh please make it good ( and finish it quick! :) ). 
creating custom applications with flash player is painful.

Yay, I'm glad there is excitement. Watch this space :)

oskar

unread,
Dec 7, 2012, 3:40:42 PM12/7/12
to twitc...@googlegroups.com
Hi!

The end of the year is getting closer, any word on the schedule?

Best regards,
Oskar

Mike Ossareh

unread,
Dec 7, 2012, 6:49:06 PM12/7/12
to twitc...@googlegroups.com
Yes, we have a dev working on the new player. Our aim is to get it up to parity with our current player - the design of it lends very well to a JS API. 

Mike Ossareh

unread,
Dec 7, 2012, 6:49:31 PM12/7/12
to twitc...@googlegroups.com
Oh, and he's making brilliant progress on it. I expect something usable by you by the end of Jan or so.

oskar

unread,
Jan 26, 2013, 10:02:41 AM1/26/13
to twitc...@googlegroups.com
Hi!

Oh great to hear, any news?

Best regards,
Oskar

Mike Ossareh

unread,
Jan 28, 2013, 2:04:44 PM1/28/13
to twitc...@googlegroups.com
Yes, in the next few days we'll have a majority of our on-site player usage on the new player. We'll then begin work on how external-site-embedded-players work.

Mike Ossareh

unread,
Feb 28, 2013, 5:14:01 PM2/28/13
to twitc...@googlegroups.com
Tracking well - we've a majority of our views in the new player. External site embedded players is a few weeks out still.


On Thu, Feb 28, 2013 at 1:02 PM, Vegard Andersen <fersk...@gmail.com> wrote:
Whats the update one month later?
To unsubscribe from this group and stop receiving emails from it, send an email to twitch-api+...@googlegroups.com.

To post to this group, send email to twitc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Francis Lavoie

unread,
Mar 23, 2013, 3:50:23 PM3/23/13
to twitc...@googlegroups.com
Any news on the new embedded players?

Mike Ossareh

unread,
Mar 23, 2013, 6:41:01 PM3/23/13
to twitc...@googlegroups.com
Hi Francis,

Right now we're thinking it'll be about two weeks - but that is subject to a few dependencies - I think it would be safe to say about a month at most.

Francis Lavoie

unread,
Mar 23, 2013, 7:03:17 PM3/23/13
to twitc...@googlegroups.com
Sounds good. 

Can you tell us what new features will be coming with it? There's a few things I'd like addressed:
- ExternalInterface controls for more control of the streams. Stuff like play/pause, quality controls, volume controls, etc. We already have mute/unmute in the current player.
- Clicking on the embed redirects to the to the stream's page. This is pretty annoying for pages that are built with ajax and want to stay on the same page. Redirects should be allowed to be turned off. If there's just a link to the video page like the youtube player has (the YOUTUBE button at the bottom right of the controls) that would be much more ideal. 
- Again on the topic of clicking, often users think that clicking will pause the video and doubleclicking will fullscreen by convention. 

Thanks.

Mike Ossareh

unread,
Mar 23, 2013, 7:54:54 PM3/23/13
to twitc...@googlegroups.com
I'll ensure the dev responsible sees this list. I think most of it seems reasonable; we'll have to think about how to handle clicks on the player. I agree with your general thoughts in and around that.

Mike Ossareh

unread,
Mar 25, 2013, 2:20:30 PM3/25/13
to twitc...@googlegroups.com
Hey Bradford, 

FWIW, we hope that the JTV player and the Twitch player are the same code base, with minor changes to the UI/UX layer. But there is no guarantee of that coming true. You should ensure you're embedding from the correct domain at all times. 


On Sun, Mar 24, 2013 at 7:27 PM, Bradford Law <lawbra...@gmail.com> wrote:
+1 for allowing clicking on the player to NOT pull up the twitch page. Will this update also apply to Justin.tv?

Francis Lavoie

unread,
Apr 19, 2013, 12:39:32 PM4/19/13
to twitc...@googlegroups.com
Since we're nearing a month, as you said should be the expected time frame, is there any news when it comes to the embedded player?

I found other thing that's been irking me with the current player. If the user pauses the stream, after a few minutes, it will start back up on its own for some reason. This is pretty bad for obvious reasons.

Thanks!

Mike Ossareh

unread,
Apr 19, 2013, 1:54:46 PM4/19/13
to twitc...@googlegroups.com
Hi Francis,

Yes! An update on the player front:
  • A majority of our on-site player usage has migrated to the new player architecture
  • We're in the final stages of transferring over our larger partners
  • Expect two weeks until all on-site usage is migrated over.
  • Concurrently starting work on embeds
  • Embeds are now possible because the new player architecture is completely API driven (early versions relied on state that we put in the page)
  • We've begun to think about the JS API to the player
  • Stage 1 (completed): On site player emits events to update the page (viewer count, etc)
  • API likely to launch with the following:
    • select video (could be a live stream, could be a VOD)
    • alter volume
    • play / pause
Let us know what else you'd like to see - we'll probably not get it in V1 but we'll get it in later versions (PiP falls into this for example). 

Cheers,

mike

Francis Lavoie

unread,
Apr 19, 2013, 3:29:39 PM4/19/13
to twitc...@googlegroups.com
Great news!

I was hoping for a way to choose quality (to set defaults, etc) and to trigger fullscreen in the API if this can be included as well.

F

Mike Ossareh

unread,
Apr 19, 2013, 4:07:58 PM4/19/13
to twitc...@googlegroups.com
Ah, yes - those two are already on the list.

Gray Sadler

unread,
Apr 19, 2013, 2:21:29 PM4/19/13
to twitc...@googlegroups.com, twitc...@googlegroups.com
Being able to switch quality using the API would be nice. 

Sent from my iPhone

Mike Ossareh

unread,
Apr 19, 2013, 4:53:53 PM4/19/13
to twitc...@googlegroups.com
This is the list we've got:

+ Change channel
+ Volume Up
+ Volume Down
+ Play
+ Pause
+ get list of transcodes
+ select transcode
+ mute
+ fullscreen
+ boss mode (i.e. show something that looks like google or something)
+ set offline image (does not update twitch - only used for embeds).


Mike Ossareh

unread,
Apr 19, 2013, 10:35:45 PM4/19/13
to twitc...@googlegroups.com
Thanks for the ideas.

For the watermark idea, we're working on something else that'll get you that. We're definitely not going to emit an event when there is an ad - at least not in v1 - we may very well do that at some point in the future though... we had a hackweek a few weeks ago and a cool multiplayer game was built for it - we could have events for "in between match" which let us (and anyone else) pop open such a game.


On Fri, Apr 19, 2013 at 7:09 PM, Fire <dragon...@gmail.com> wrote:
The ability to set a custom watermark also comes to mind, as does emitting an event when an ad plays so you could, for instance, display something on your page while the ad is up ( Though I feel that could easily lead to abuse of a couple different types )

Mike Ossareh

unread,
Apr 24, 2013, 11:23:19 PM4/24/13
to twitc...@googlegroups.com
The only key that works in full screen is escape, that is so that people do not create convincing web page replacements that steal keyboard input (i.e. someone emulating your bank and nabbing your login details).


On Wed, Apr 24, 2013 at 6:45 PM, Thomas B <whinew...@gmail.com> wrote:
> Let us know what else you'd like to see - we'll probably not get it in V1 but we'll get it in later versions (PiP falls into this for example). 
There is one feature I'd really love to see, the ability to somehow have the flash player send keypresses back to the webpage, if at all possible. 

I'm embedding your player now, but the problem is that Flash completely consumes keyboard input in fullscreen.

I'd like to be able to do the following.

- Twitch player in fullscreen
- User hits keyboard button
- Button is sent back to page
- Page is able to order the flash player out of fullscreen if it wants. 

That would be very very sweet for what I'm working on =)

Sincerely
Thomas

Francis Lavoie

unread,
Apr 24, 2013, 11:27:23 PM4/24/13
to twitc...@googlegroups.com
I have to second this, I'd enjoy that feature. I've been doing pseudo-fullscreen in my app by making the embed 100% width and height of the window which still allows for the hotkeys to function, but actually triggering fullscreen would cause some issues for sure.


On Wednesday, April 24, 2013 9:45:10 PM UTC-4, Thomas B wrote:
> Let us know what else you'd like to see - we'll probably not get it in V1 but we'll get it in later versions (PiP falls into this for example). 
There is one feature I'd really love to see, the ability to somehow have the flash player send keypresses back to the webpage, if at all possible. 

Mike Ossareh

unread,
May 6, 2013, 1:09:04 PM5/6/13
to twitc...@googlegroups.com


On Sunday, May 5, 2013, Thomas B wrote:
I am aware, though I don't see how anyone could abuse this in twitch? Twitch is just a player broadcasting video, how would some dubious hacker get a twitch video showing on twitch page showing input boxes inside the player? 

Afaik we don't get to decide.. It is enforced by the flash runtime itself. Lmk if I'm wrong on this one.

 

 I would like you to add some ExternalInterface support so the webpage can catch keypresses in flash, just send every keypress back to a jscript function.

Now I've written a windows desktop application that works as a wrapper for my webpage and use windows events/hooks to do this instead... Having users install a desktop app instead of just using a webpage is well, a lot more to ask.

Sincerely
Thomas


On Thursday, April 25, 2013 5:23:19 AM UTC+2, Mike Ossareh wrote:
The only key that works in full screen is escape, that is so that people do not create convincing web page replacements that steal keyboard input (i.e. someone emulating your bank and nabbing your login details).
On Wed, Apr 24, 2013 at 6:45 PM, Thomas B <whinew...@gmail.com> wrote:
> Let us know what else you'd like to see - we'll probably not get it in V1 but we'll get it in later versions (PiP falls into this for example). 
There is one feature I'd really love to see, the ability to somehow have the flash player send keypresses back to the webpage, if at all possible. 

I'm embedding your player now, but the problem is that Flash completely consumes keyboard input in fullscreen.

I'd like to be able to do the following.

- Twitch player in fullscreen
- User hits keyboard button
- Button is sent back to page
- Page is able to order the flash player out of fullscreen if it wants. 

That would be very very sweet for what I'm working on =)

--
You received this message because you are subscribed to the Google Groups "Twitch API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to twitch-api+...@googlegroups.com.
To post to this group, send email to twitc...@googlegroups.com.
Visit this group at http://groups.google.com/group/twitch-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Oskar Lindgren

unread,
May 6, 2013, 1:35:25 PM5/6/13
to twitc...@googlegroups.com
But in this case we are talking about javascript, right?

"*Security concerns* � Browser vendors are well aware of the potential
security issues with fullscreen. For example, a malicious site could
show a full screen Windows or Mac login window and steal a password.
That�s why they are disabling keyboard support by default and only
enabling by explicitly asking." -
http://johndyer.name/native-fullscreen-javascript-api-plus-jquery-plugin/

Or will the javascript player still use flash somehow?

Best regards,
Oskar
> <javascript:_e({}, 'cvml',
> 'twitch-api%2Bunsu...@googlegroups.com');>.
> To post to this group, send email to twitc...@googlegroups.com
> <javascript:_e({}, 'cvml', 'twitc...@googlegroups.com');>.
> Visit this group at http://groups.google.com/group/twitch-api?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Twitch API" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/twitch-api/ebjNIjVPrKQ/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to

Mike Ossareh

unread,
May 6, 2013, 5:45:25 PM5/6/13
to twitc...@googlegroups.com
We've  a miscommunication here - there is no "javascript player", there is a flash player that has a better javascript interface. 


On Mon, May 6, 2013 at 10:35 AM, Oskar Lindgren <osk...@cs.umu.se> wrote:
But in this case we are talking about javascript, right?

"*Security concerns* – Browser vendors are well aware of the potential security issues with fullscreen. For example, a malicious site could show a full screen Windows or Mac login window and steal a password. That’s why they are disabling keyboard support by default and only enabling by explicitly asking." - http://johndyer.name/native-fullscreen-javascript-api-plus-jquery-plugin/
    <javascript:_e({}, 'cvml',

    To post to this group, send email to twitc...@googlegroups.com
    <javascript:_e({}, 'cvml', 'twitc...@googlegroups.com');>.

    Visit this group at http://groups.google.com/group/twitch-api?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to a topic in the Google Groups "Twitch API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/twitch-api/ebjNIjVPrKQ/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to twitch-api+unsubscribe@googlegroups.com.

To post to this group, send email to twitc...@googlegroups.com.
Visit this group at http://groups.google.com/group/twitch-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Twitch API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to twitch-api+unsubscribe@googlegroups.com.

Michael Poon

unread,
Jun 3, 2013, 5:20:14 PM6/3/13
to twitc...@googlegroups.com
We're still working on it. Hopefully soon!

On Sunday, June 2, 2013 2:28:10 AM UTC-7, Dan Rice wrote:
Any chance of exposing an HTML5 stream in the API instead of the flash player stream? I see there is currently partial html5 support (live streams work, but not vods?) on the website. I'd really like to gain access to the video stream without using the flash player.

-Dan
    send an email to twitch-api+...@googlegroups.com
    <javascript:_e({}, 'cvml',

    To post to this group, send email to twitc...@googlegroups.com
    <javascript:_e({}, 'cvml', 'twitc...@googlegroups.com');>.

    Visit this group at http://groups.google.com/group/twitch-api?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to a topic in the Google Groups "Twitch API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/twitch-api/ebjNIjVPrKQ/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to twitch-api+...@googlegroups.com.

To post to this group, send email to twitc...@googlegroups.com.
Visit this group at http://groups.google.com/group/twitch-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Twitch API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to twitch-api+...@googlegroups.com.

Vodoo

unread,
Jun 29, 2013, 9:55:38 AM6/29/13
to twitc...@googlegroups.com
Will there be an option to use a chromeless player (no UI) or show/hide the UI via javascript? If not I would like to suggest a player with a dynamic control bar like the one if you fullscreen a twitch stream. I found the static bar to be quite annoying if you do anything else than just embedding a video to a generic site.

GrayBlue

unread,
Dec 19, 2013, 4:06:15 PM12/19/13
to twitc...@googlegroups.com
+1 on chromeless

Wiwiweb

unread,
Feb 5, 2014, 11:05:24 AM2/5/14
to twitc...@googlegroups.com
+1 on chromeless, just like the old live_api_player.swf

Also, the ability to precisely set volume.
Reply all
Reply to author
Forward
0 new messages