API for VLC Plugin 1.1.0

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
ijesh
Blank Cone
Blank Cone
Posts: 11
Joined: 24 Jun 2010 18:19

API for VLC Plugin 1.1.0

Postby ijesh » 24 Jun 2010 19:47

Does anyone know if there is an API for the latest version of VLC (1.1.0) or any api that works for this version. I am trying to embed a vlc player to stream videos and I got most of the things working with my old code for the new player but seems like the fullscreen function has changed or something. I also need to resize the video dynamically (like using a button) in the internet explorer which is already working in all other browsers which vlc supports.

Any help would be appreciated and I can also provide the code if needed.

Ilasir
Cone that earned his stripes
Cone that earned his stripes
Posts: 139
Joined: 14 Apr 2010 18:57

Re: API for VLC Plugin 1.1.0

Postby Ilasir » 24 Jun 2010 23:48

I dropped back to 1.0.5 because the stop function wasn't working in 1.1.0. But resizing a video is easy, just change the style.width, style.height properties.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: API for VLC Plugin 1.1.0

Postby Jean-Baptiste Kempf » 25 Jun 2010 01:25

FIle a bug then.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ijesh
Blank Cone
Blank Cone
Posts: 11
Joined: 24 Jun 2010 18:19

Re: API for VLC Plugin 1.1.0

Postby ijesh » 25 Jun 2010 17:09

@ Ilasir->>The stop function is working for me in all browsers, but when I do the resize(which I did the same way as you explained) it works for all other browsers except for Internet explorer. Any idea on how we would do that. IN IE it just takes the video to the new position and doesn't resize it. The embed code looks like this:

Code: Select all

<div id="video"> <object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="./" width="500" height="370" id="vlc" events="True"> <param name="MRL" value="udp://@239.226.16.5:30120" /> <param name="ShowDisplay" value="True" /> <param name="AutoLoop" value="False" /> <param name="AutoPlay" value="False" /> <param name="Volume" value="80" /> <param name="StartTime" value="0" /> <embed pluginspage="http://www.videolan.org/mirror-geo.php?file=vlc/1.0.5/win32/vlc-1.0.5-win32.exe" version="VideoLAN.VLCPlugin.2" type="application/x-vlc-plugin" width="500" height="370" name="vlc" class="player" id="vlcplayer" > </embed> </object> </div>
I have the embed for "Other browsers" and Object tag for IE...This works fine but when I do the resize function like this:

Code: Select all

function resize(height, width) { document.getElementById("vlcplayer").setAttribute("width", width); document.getElementById("vlcplayer").setAttribute("height", height); }
It resizes for other browsers but not IE. I am wondering if there is a solution and if there is one, how do I do that?

@ j-b ->>How do I file a bug?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: API for VLC Plugin 1.1.0

Postby Jean-Baptiste Kempf » 25 Jun 2010 17:21

trac.videolan.org/vlc
And you are using ActiveX :D
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ijesh
Blank Cone
Blank Cone
Posts: 11
Joined: 24 Jun 2010 18:19

Re: API for VLC Plugin 1.1.0

Postby ijesh » 25 Jun 2010 17:49

For your stop function you should be able to say

Code: Select all

vlc.playlist.stop();
and it should work...it worked for me...if this doesn't, try creating a vlc object before you call that stop function
:)

ijesh
Blank Cone
Blank Cone
Posts: 11
Joined: 24 Jun 2010 18:19

Re: API for VLC Plugin 1.1.0

Postby ijesh » 25 Jun 2010 17:51

@j-b ->>Yes I am using ActiveX. I can tell because the video works it is just the resize function that doesn't...And thanks for the link

Ilasir
Cone that earned his stripes
Cone that earned his stripes
Posts: 139
Joined: 14 Apr 2010 18:57

Re: API for VLC Plugin 1.1.0

Postby Ilasir » 25 Jun 2010 22:17

I use the object tag and conditional comments to embed vlc. For resize, I use document.getElementById("vlc").style.width/height. I'll install 1.1 and give it a try. I'm pretty sure it worked the last time.

Ilasir
Cone that earned his stripes
Cone that earned his stripes
Posts: 139
Joined: 14 Apr 2010 18:57

Re: API for VLC Plugin 1.1.0

Postby Ilasir » 25 Jun 2010 22:49

It seemed to work. I had several other problems with the api, but the dynamic resize option worked.

ijesh
Blank Cone
Blank Cone
Posts: 11
Joined: 24 Jun 2010 18:19

Re: API for VLC Plugin 1.1.0

Postby ijesh » 28 Jun 2010 19:27

Ok I did so and it worked like a charm...I did have to change some embedding code but it was worth it...Thanks a lot for the code :D ...Now the only problem remains is with the fullscreen function...Is it working for you?

Ilasir
Cone that earned his stripes
Cone that earned his stripes
Posts: 139
Joined: 14 Apr 2010 18:57

Re: API for VLC Plugin 1.1.0

Postby Ilasir » 29 Jun 2010 05:57

I don't know. I've not tried it in 1.1, sorry.

ijesh
Blank Cone
Blank Cone
Posts: 11
Joined: 24 Jun 2010 18:19

Re: API for VLC Plugin 1.1.0

Postby ijesh » 01 Jul 2010 18:11

Does the vlc plugin work for the Safari browser on Mac. I cant figure out why it is working in Safari on Windows and not on Mac. It just says vlc.playlist [undefined] is not an object and vlc.input is not an object...has anyone been able to make it work with safari on Mac? If yes, what did you have to do?
I think that vlc object itself is not being created...This is for 1.0.5/1.1.0

garlantinapple
New Cone
New Cone
Posts: 9
Joined: 14 Jul 2010 06:02
VLC version: windows
Operating System: windows
Location: USA
Contact:

Re: API for VLC Plugin 1.1.0

Postby garlantinapple » 21 Jul 2010 11:10

I also need to resize the video dynamically (like using a button) in the internet explorer which is already working in all other browsers which vlc supports.

Ilasir
Cone that earned his stripes
Cone that earned his stripes
Posts: 139
Joined: 14 Apr 2010 18:57

Re: API for VLC Plugin 1.1.0

Postby Ilasir » 21 Jul 2010 21:10

What method are you currently using?

klsc
Blank Cone
Blank Cone
Posts: 30
Joined: 20 Jan 2006 15:43

Re: API for VLC Plugin 1.1.0

Postby klsc » 02 Aug 2010 14:09

I used version 1.1.2 and have problems clear the playlist.
I use vlc.playlist.add and then vlc.playlist.play. If I stop and do vlc.playlist.clear the playlistcount is 0 but if I add a new playlistitem and start vlc.playlist.play it plays the file I used at the first time.

have anyone an idea how can i solve this problem?

I have this problem from version 0.9x to now :(

ijesh
Blank Cone
Blank Cone
Posts: 11
Joined: 24 Jun 2010 18:19

Re: API for VLC Plugin 1.1.0

Postby ijesh » 03 Aug 2010 18:51

used version 1.1.2 and have problems clear the playlist.
I use vlc.playlist.add and then vlc.playlist.play. If I stop and do vlc.playlist.clear the playlistcount is 0 but if I add a new playlistitem and start vlc.playlist.play it plays the file I used at the first time.

have anyone an idea how can i solve this problem?

I have this problem from version 0.9x to now
What are you trying to do?

ijesh
Blank Cone
Blank Cone
Posts: 11
Joined: 24 Jun 2010 18:19

Re: API for VLC Plugin 1.1.0

Postby ijesh » 03 Aug 2010 18:52

Does anyone know how to make vlc play a video in IE 7.. I have to be able to make it work on IE 7 and everything works fine without errors except that it doesn't play the video. It doesn't even show any errors. Has anyone been able to do it?

klsc
Blank Cone
Blank Cone
Posts: 30
Joined: 20 Jan 2006 15:43

Re: API for VLC Plugin 1.1.0

Postby klsc » 03 Aug 2010 20:01

I would connect to other urls and save the files to disk. with version 0.8.6i it works well, but with all newer versions that I tested, it doesn't work. first the problem with the playlist clearing that I workaround with playlist-playitem. and now the activex doesn't save the raw input to file.

all things that works with version 0.8.6i but there is a verry bad bug in rtsp package.

I'm waiting since over a year for a newer version, with correct working activex. but I think I must wait for a long time or switch to other programs :cry:

tru
New Cone
New Cone
Posts: 4
Joined: 10 Aug 2010 07:57

Re: API for VLC Plugin 1.1.0

Postby tru » 11 Aug 2010 00:46

I used version 1.1.2 and have problems clear the playlist.
I use vlc.playlist.add and then vlc.playlist.play. If I stop and do vlc.playlist.clear the playlistcount is 0 but if I add a new playlistitem and start vlc.playlist.play it plays the file I used at the first time.

have anyone an idea how can i solve this problem?

I have this problem from version 0.9x to now :(
try doing a loop after clearing instead of just checking if the count is 0. like this:

vlc.playlist.items.clear
do 'nothing
loop until vlc.playlist.items.count = 0

it says in the api that it is being cleared async thats y its possible that there will remain items.

klsc
Blank Cone
Blank Cone
Posts: 30
Joined: 20 Jan 2006 15:43

Re: API for VLC Plugin 1.1.0

Postby klsc » 11 Aug 2010 11:15

count is 0, but when i add a new playlistitem (then count=1) and start playlist-play, it plays the old deleted entry and ignore the new one.
I can solve this only with playlist-playitem(0).

but I can not save a stream to file. this works well in version 0.8.6i but in version 1.1.2 activex, nothing. no file no errors, same code. but the same options as commandline options and start vlc .exe in an cmd window, the file is written. but why not with the activex ??? :?:

tru
New Cone
New Cone
Posts: 4
Joined: 10 Aug 2010 07:57

Re: API for VLC Plugin 1.1.0

Postby tru » 11 Aug 2010 23:39

Syntax/API is slightly different from 0.8.6i to 1.1.2. Try using the Web Interface API wiki on the main page. For example the playlist handling has been modified aka your problem.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 20 guests