Mozilla plugin seek() function

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
cs02rm0
New Cone
New Cone
Posts: 5
Joined: 24 Jan 2008 11:58

Mozilla plugin seek() function

Postby cs02rm0 » 24 Jan 2008 12:05

Seek doesn't seem to be working in the Mozilla plugin for me?

This is a test case:

Code: Select all

<html> <head> <script type="text/javascript"> function play() { var vlc = document.getElementById('vlc'); vlc.style.display = "block"; setTimeout(function () { vlc.clear_playlist(); vlc.add_item('file:///X:/toby/bbc1.ts'); vlc.play(); }, 0); } function seek() { var vlc = document.getElementById('vlc'); vlc.seek(30, false); } </script> </head> <body> <a href="javascript:play();">play</a><br/> <a href="javascript:seek();">forward</a> <br/><br/> <embed type="application/x-vlc-plugin" width="400" height="300" flex="1" id="vlc" style="display: none"/> </body> </html>
It seems to be calling the function correctly because nothing appears in the error console and the video seems to freeze for a second but no seeking happens.

This is in firefox on Windows XP.

Any suggestions? Thanks.

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: Mozilla plugin seek() function

Postby revolunet » 24 Jan 2008 15:10

seek works for me on mozilla/activex

an exemple (try a local file or mov) : http://vc.revolunet.com
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

cs02rm0
New Cone
New Cone
Posts: 5
Joined: 24 Jan 2008 11:58

Re: Mozilla plugin seek() function

Postby cs02rm0 » 24 Jan 2008 16:24

Hmmn. No, seeking with the bar on that page didn't work either. Play/pause/stop were absolutely fine.

I can seek with the test files I have using the VLC desktop application though.

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: Mozilla plugin seek() function

Postby revolunet » 24 Jan 2008 16:29

strange, it works for me with the default .mov in the inputbox at the bottom of the page (batman) no ?
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

cs02rm0
New Cone
New Cone
Posts: 5
Joined: 24 Jan 2008 11:58

Re: Mozilla plugin seek() function

Postby cs02rm0 » 24 Jan 2008 17:00

That one doesn't even play for me, that might be the company firewall though.

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: Mozilla plugin seek() function

Postby revolunet » 24 Jan 2008 17:03

i can seek in this file too : http://code.revolunet.com/VLCjs/rambo.mpg
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

cs02rm0
New Cone
New Cone
Posts: 5
Joined: 24 Jan 2008 11:58

Re: Mozilla plugin seek() function

Postby cs02rm0 » 25 Jan 2008 16:53

Thanks, that file did work on the test page, but still didn't work in my code. I dug a little deeper and found that the script on the test page didn't use the seek() function but set [vlc object].input.time to a new value - this didn't work on my code until I added the attribute:

Code: Select all

version="VideoLAN.VLCPlugin.2"
Now it works with your test file but not with mine, so I guess it's now a file specific issue and at least my code's correct.

Thanks.

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: Mozilla plugin seek() function

Postby revolunet » 25 Jan 2008 16:56

great news

you should use the new plugin API :
http://wiki.videolan.org/Documentation: ... d_above.29
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 10 guests