control vlc with java in Http interface

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

control vlc with java in Http interface

Postby BuBBleGum » 02 Aug 2006 14:17

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

BuBBleGum

Postby BuBBleGum » 02 Aug 2006 16:09

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

alec_robertson

Postby alec_robertson » 02 Aug 2006 16:14

Specify your playlist as a target (target="myplaylist") in the embed statement, or use the document.streamfree.add_item("myplaylist") function.
Last edited by alec_robertson on 02 Aug 2006 17:21, edited 1 time in total.

BuBBleGum

Postby BuBBleGum » 02 Aug 2006 17:08

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 ?

alec_robertson

Postby alec_robertson » 02 Aug 2006 17:20

<a href='javascript:document.streamfree.add_item("myplaylist")'>Playlist</a>

Note the single and double quotes...

BuBBleGum

Postby BuBBleGum » 02 Aug 2006 20:42

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 ?

alec_robertson

Postby alec_robertson » 02 Aug 2006 20:54

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.

BuBBleGum

Postby BuBBleGum » 02 Aug 2006 21:53

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.

alec_robertson

Postby alec_robertson » 02 Aug 2006 22:20

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.

Guest

Postby Guest » 02 Aug 2006 22:33

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

alec_robertson

Postby alec_robertson » 02 Aug 2006 23:07

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?

BuBBleGUm

Postby BuBBleGUm » 03 Aug 2006 09:56


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.

alec_robertson

Postby alec_robertson » 04 Aug 2006 01:57

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?

BuBBleGUm

Postby BuBBleGUm » 04 Aug 2006 11:22

My configuration :

Image

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

alec_robertson

Postby alec_robertson » 04 Aug 2006 14:39

Just add the following in your html (your server must support SSI):

Code: Select all

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

BuBBleGUm

Postby BuBBleGUm » 04 Aug 2006 15:49

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>

alec_robertson

Postby alec_robertson » 04 Aug 2006 20:44

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>


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 57 guests