Youtube video don't stop

Youtube video don't stop

Postby arainziliel_1 » Wed Jul 09, 2014 4:43 am

I'm doing an application that plays youtube videos.

It works fine but key event don't.

I have a js function that handle remote control key events:

Main.keyDown = function()
{
var keyCode = event.keyCode;

switch(keyCode)
{
case VK_PAUSE:
player.pauseVideo();
break;
case VK_PLAY:
player.playVideo();
break;
default:
break;
}
}

With onkeydown in html:



Twice are handled but calling player.stopVideo has not effect (player.playVideo has).

Please, help.
Thanks
arainziliel_1
 
Posts: 5
Joined: Mon Jul 27, 2015 4:52 am

Youtube video don't stop

Postby Support_STA » Thu Jul 10, 2014 12:31 am

Hi,

Could you make it clearly? Did you implement VK_STOP case in your keydown handle function?
In your above code, I don't see VK_STOP case in your code.
Hope this document helpful.

Regards,
STA Support
Support_STA
 
Posts: 136
Joined: Fri Aug 09, 2013 3:56 am

Youtube video don't stop

Postby arainziliel_1 » Thu Jul 10, 2014 1:25 am

Implementig VK_STOP case:

case VK_STOP:
player.stopVideo();
break;

Doesn't work neither. Both cases, Pause and Stop video, have not effect.

I have new info. Apparently, when pause or stop video, the player return state -1.

is(status == -1) alert(\"Video has not started\");

But I wait tofunction onPlayerReady(evt) execution. What I'm doing wrong?
arainziliel_1
 
Posts: 5
Joined: Mon Jul 27, 2015 4:52 am


Return to App development questions



cron