kiosk application

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions

kiosk application

Postby loocser on Mon Nov 02, 2009 11:41 pm

hi everybody, i'm sorry for my poor english... :oops:
i'm doing a simple kiosk application using HTML + javascript:
a index page contains many buttons, each of them links to a page with an embedded VLC player.
In that page i put a button play/stop (vlc.playlist.togglePause()) and a button that manually return to home page. Everything works good.
But...
I need that when the video has finished, automaticaly return to home page.
i tried using [vlc.playlist.isPlaying] property whitout success... :(

could someone help me?

thanks,
Luca
loocser
New Cone
New Cone
 
Posts: 2
Joined: Mon Nov 02, 2009 11:14 pm

Re: kiosk application

Postby hjk on Tue Nov 03, 2009 4:36 am

Hi,

hmm, it has been a while but I remember, that I also had some difficulties with vlc.playlist.isPlaying, but this works:

first I add the file to a playlist:
var id = vlc.playlist.add(file);
vlc.playlist.playItem(id);

next I set up a timeout:
window.setTimeout("timecheck()", 1000); // call function every second

and I check in the function timecheck() for the vlc-player states:
if (vlc.input.state == 0 || vlc.input.state == 6 || vlc.input.state == 7)
// 0=IDLE 6=ENDED (end of playback) 7=ERROR
( maybe check only for 6 and 7 - see http://wiki.videolan.org/Documentation: ... put_object )

and of course, don´t forget to set up the timeout in the function timecheck():
window.setTimeout("timecheck()", 1000);


Everything clear?
hjk
New Cone
New Cone
 
Posts: 2
Joined: Mon Nov 02, 2009 5:43 am

Re: kiosk application

Postby loocser on Tue Nov 03, 2009 11:24 am

Great!!! :D
It works

next I set up a timeout:
window.setTimeout("timecheck()", 1000); // call function every second

maybe you intended:
window.setInterval("timecheck()",1000); :wink:


Thank you very much!

Luca
loocser
New Cone
New Cone
 
Posts: 2
Joined: Mon Nov 02, 2009 11:14 pm


Return to Web and scripting

Who is online

Users browsing this forum: No registered users and 4 guests