Page 1 of 1

control vlc with java in Http interface

Posted: 02 Aug 2006 14:17
by BuBBleGum
Hi !

I want to use an interface http on my siteweb, but my siteweb isn't on my computer.
So i can't use the http with commande vlc ?
I installed interface OrrentDesign.com,present in the wiki, but the commande are for the local only.

So my last choose is the java with the plugin for firefox.
I see an exemple with two or three commande for play,stop and fullscreen video, but i lost this.
If somebody can find this example or better.

Thanks

----------------------------------------------------------

Bonjour,

Je voudrais utiliser une interface http pour controler VLC, Mais cette interface est palce sur un serveur web distant et pas en local.

J'ai installe l'interface present dans le wiki "OrrentDesign.com", mais les commandes fonctionne seulement en local.

Donc je pense que mon seul choix, est d utiliser des commandes java avec le plugin Mozilla/firefox.
J'ai trouve un exemple avec 2 ou 3 commande pour lecture/stop, et fullscreen video, mais je l'ai perdu.
Si quelqu'un peut la retrouver, ou un exemple meilleur, je suis partant.

Merci

Posted: 02 Aug 2006 16:09
by BuBBleGum
Ok, i found the code :

Code: Select all

<embed type="application/x-vlc-plugin" name="streamfree" autoplay="yes" loop="no" target="XXX" height="240" width="320"> <br> <a href="javascript:;" onclick="document.streamfree.play()">Play Stream</a> <a href="javascript:;" onclick="document.streamfree.pause()">Pause Stream</a> <a href="javascript:;" onclick="document.streamfree.stop()">Stop Stream</a> <a href="javascript:;" onclick="document.streamfree.fullscreen()">Fullscreen</a> </br>
it work very good !
now, i want a playlist, but i don't do that.
Please help me :wink:

--------------------

J'ai retrouve le code en question :

Code: Select all

<embed type="application/x-vlc-plugin" name="streamfree" autoplay="yes" loop="no" target="XXX" height="240" width="320"> <br> <a href="javascript:;" onclick="document.streamfree.play()">Play Stream</a> <a href="javascript:;" onclick="document.streamfree.pause()">Pause Stream</a> <a href="javascript:;" onclick="document.streamfree.stop()">Stop Stream</a> <a href="javascript:;" onclick="document.streamfree.fullscreen()">Fullscreen</a> </br>
Il marche tres bien.

Maintenant j'aimerais pouvoir avoir acces a la playlist, mais je sais pas le faire.
Si quelqu'un peut m'aider. :wink:

Merci

Posted: 02 Aug 2006 16:14
by alec_robertson
Specify your playlist as a target (target="myplaylist") in the embed statement, or use the document.streamfree.add_item("myplaylist") function.

Posted: 02 Aug 2006 17:08
by BuBBleGum
I prefere to use java function.
document.streamfree.add_item(myplaylist)

But i don't know insert in my code.

I do :

Code: Select all

<a href="javascript:;" onclick="document.streamfree.play()">Play Stream</a> <a href="javascript:;" onclick="document.streamfree.pause()">Pause Stream</a> <a href="javascript:;" onclick="document.streamfree.stop()">Stop Stream</a> <a href="javascript:;" onclick="document.streamfree.fullscreen()">Fullscreen</a> <a href="javascript:;" onclick="document.streamfree.add_item()">Playlist</a>
Bu it doesn't work.

There is a modification in vlc server ?

Posted: 02 Aug 2006 17:20
by alec_robertson
<a href='javascript:document.streamfree.add_item("myplaylist")'>Playlist</a>

Note the single and double quotes...

Posted: 02 Aug 2006 20:42
by BuBBleGum
I noob !!

I try this :

Code: Select all

<br> <a href="javascript:;" onclick='document.streamfree.play()'>Play Stream</a> <a href="javascript:;" onclick='document.streamfree.pause()'>Pause Stream</a> <a href="javascript:;" onclick='document.streamfree.stop()'>Stop Stream</a> <a href="javascript:;" onclick='document.streamfree.mute()'>mute</a> <a href="javascript:;" onclick='document.streamfree.fullscreen()'>Fullscreen</a> <a href="javascript:;" onclick='document.streamfree.add_item("myplaylist")'>Playlist</a> <a href='document.streamfree.add_item("myplaylist")'>Playlist2</a> </br>
But it doesn't work for the playlist :(

I have need open a new network port for the playlist ?

Posted: 02 Aug 2006 20:54
by alec_robertson

Code: Select all

<a href='javascript:document.streamfree.add_item("http://web.mit.edu/alecr/www/cwf/soundtrack.m3u")'>Playlist</a>
The playlist needs to be an explicit url, not just a filename. If you start firefox from a command line, then vlc will write its log to that window and you will be able to see what is going wrong.

Posted: 02 Aug 2006 21:53
by BuBBleGum
Ok,
In my VLC server, i launch my playlist located in my server (http://xxx.free.fr/tv/playlist.m3u), and diffuse it

Then i modify the source code :

Code: Select all

<a href="javascript:;" onclick='document.streamfree.play()'>Play Stream</a> <a href="javascript:;" onclick='document.streamfree.pause()'>Pause Stream</a> <a href="javascript:;" onclick='document.streamfree.stop()'>Stop Stream</a> <a href="javascript:;" onclick='document.streamfree.mute()'>mute</a> <a href="javascript:;" onclick='document.streamfree.fullscreen()'>Fullscreen</a> <a href='javascript:document.streamfree.add_item("http://xxx.free.fr/tv/playlist.m3u")'>Playlist</a>
I click on link "playlist" but nothing.

Posted: 02 Aug 2006 22:20
by alec_robertson
You need to click play as well :)

Or write a javascript function that does both, and call that from your "Playlist" link. If that doesn't work, try opening it in a normal vlc session to make sure your server is working.

Posted: 02 Aug 2006 22:33
by Guest
Actually, i click on "play" and after on "playlist", but nothing, the video play correctly, but the playlist doesn't work.
Just for information, in my playlist have channels TV, so never stop. i want just a list differents channels.
I visit your site web, for testing your playlist, but i don't see a playlist.
Just the soundtrack who ravel.

The option playlist, can post a playlist ?
for exemple

1 - OneChannel
2 - TwoChannel
3 - ThreeChannel

Posted: 02 Aug 2006 23:07
by alec_robertson
Hmmm. My soundtrack.m3u playlist is just a list of mp3 songs of the form:

Code: Select all

http://web.mit.edu/alecr/www/mp3/concern-s.mp3 http://web.mit.edu/alecr/www/mp3/damo-s.mp3
If I add a video file (eg http://web.mit.edu/alecr/www/cwf/trailer-i.mkv) then it still plays fine.

Can you post a few entries of your playlist. Does it play in the normal vlc (Playlist - Open Playlist)? Or can you build a playlist in vlc and save it, then use that in your website?

Posted: 03 Aug 2006 09:56
by BuBBleGUm

Can you post a few entries of your playlist. Does it play in the normal vlc (Playlist - Open Playlist)? Or can you build a playlist in vlc and save it, then use that in your website?
Yes, i can modify, my playlist, save, and open, and play in my normal vlc.
And if i modify or add a new entries in my playlist in my vlc normal, it'll be play on my website.

But, i don't see my playlist on my website.

Posted: 04 Aug 2006 01:57
by alec_robertson
I'm not sure I understand what the problem is. If the playlist is given by an explicit url and vlc can play said playlist, then you should be able to link to and view the playlist in a regular browser?

Posted: 04 Aug 2006 11:22
by BuBBleGUm
My configuration :

Image

I would like, my playlist readable on my website, and launch a channel if i want.

Posted: 04 Aug 2006 14:39
by alec_robertson
Just add the following in your html (your server must support SSI):

Code: Select all

<!--#include file="playlist.m3u" -->

Posted: 04 Aug 2006 15:49
by BuBBleGUm
Just add the following in your html (your server must support SSI):

Code: Select all

<!--#include file="playlist.m3u" -->

Sorry but i don't know where put the code ?

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>.: JBO Streaming V 1.0 :.</title> </head> <body> <div class="page"></div> <div class="screen"> <embed type="application/x-vlc-plugin" name="streamfree" autoplay="yes" loop="no" target="http://xxx" height="240" width="320"> </div> <br> <a href="javascript:;" onclick="document.streamfree.play()" ><IMG src="boutons/play.png" border="0" hspace="13"></a> <a href="javascript:;" onclick="document.streamfree.pause()"><IMG src="boutons/pause.png" border="0" hspace="13"></a> <a href="javascript:;" onclick="document.streamfree.stop()"><IMG src="boutons/stop.png" border="0" hspace="13"></a> <a href="javascript:;" onclick="document.streamfree.fullscreen()"><IMG src="boutons/fullscreen.png" border="0" hspace="13"></a> <a href='javascript:document.streamfree.add_item("http://xxx/test/playlist.m3u")'>Playlist</a> </br> </body> </html>

Posted: 04 Aug 2006 20:44
by alec_robertson
Put it where you want the playlist to be :)

Code: Select all

<table width="100%"> <tr> <td width="50%"> <embed type="application/x-vlc-plugin" name="v1" width="200" height="200" /> </td> <td width="50%"> <!--#include file="soundtrack.m3u" --> </td> </tr> </table>