GNOME Bugzilla – Bug 462544
Be compatible with the vlc plugin
Last modified: 2008-02-16 21:49:35 UTC
Free (french ISP) provides a new service: some tv channels are accessible at http://tv.freebox.fr/ for their customers. However, on this page, the plugin that is used is the vlc one: <EMBED pluginspage="http://www.videolan.org" type="application/x-vlc-plugin" progid="VideoLAN.VLCPlugin.2" width="400" height="300" name="vlc" autoplay="yes" loop="yes" target="logo_freebox.jpg"> </EMBED> It seems like the plugin should also implement some javascript API or something like this so it can be controlled by the buttons on the webpage (I know nothing about all this, so I can be wrong ;-)). I can provide the webpage if you need it.
Created attachment 93378 [details] [review] totem-support-vlc.patch Simple patch to make Totem handle the mime-type.
We probably need more Javascript than what's supported by the Basic plugin though, so we might need to create a separate plugin. Vincent, could you go to the website, and check which Javascript-commands are used but unimplemented in the "Javascript console" of Firefox? I believe this is the "new" API: http://trac.videolan.org/vlc/browser/trunk/activex/axvlc.idl With an implementation for Mozilla: http://trac.videolan.org/vlc/browser/trunk/mozilla/control/npolibvlc.cpp
The API mentioned in the docs look quite a bit more straight-forward: http://www.videolan.org/doc/vlc-user-guide/en/ch07.html#id308026
Okay, I can't get a full list of commands in the error console of Firefox. But it looks more like what you linked to in comment #2 than the doc you point to in comment #3. Here's what I can find in the file: vlc.playlist.stop() vlc.playlist.items.clear() vlc.playlist.add() vlc.playlist.play() vlc.input.state vlc.audio.toggleMute() vlc.audio.volume vlc.video.toggleFullscreen() It also checks that VersionInfo is superior than some value (I'd guess 0.8.6, but that's just a guess since I'm a bit tired ;-)).
I'm wondering... Would it be worth discussing with vlc people and other people doing similar plugins to standardize an API?
Here's the first half of the grunt work done. Christian, do you fancy doing the Javascript stubs, or do you want me to take care of it? Implementing the rest of the API should be pretty easy. Vincent, could you please upload the HTML/javascript somewhere so I could cook a test page? 2007-08-29 Bastien Nocera <hadess@hadess.net> * browser-plugin/Makefile.am: * browser-plugin/idl/Makefile.am: * browser-plugin/idl/totemICone.idl: * browser-plugin/idl/totemIConeAudio.idl: * browser-plugin/idl/totemIConeInput.idl: * browser-plugin/idl/totemIConePlaylist.idl: * browser-plugin/idl/totemIConeVideo.idl: * browser-plugin/totemConePlugin.cpp: * browser-plugin/totemConePlugin.h: * browser-plugin/totemPlugin.cpp: * browser-plugin/totemPluginGlue.h: * configure.in: Add the Cone plugin, a plugin to mimic the VLC plugin, write IDL files from the web developers documentation available on their site (Helps: #462544) * browser-plugin/totemBasicPlugin.h: * browser-plugin/totemComplexPlugin.h: * browser-plugin/totemGMPError.h: * browser-plugin/totemGMPPlugin.h: * browser-plugin/totemMullYPlugin.h: * browser-plugin/totemNarrowSpacePlugin.h: Fix some includes #ifdef
Created attachment 94587 [details] Tarball of the freebox tv web page
Created attachment 94828 [details] [review] JS stubs Not really useful, but lets the build succeed at least.
(In reply to comment #8) > Created an attachment (id=94828) [edit] > JS stubs > > Not really useful, but lets the build succeed at least. Committed. Would you have the time to look at stubs for the other objects as well?
I think we should first look at what that web page actually uses and only implement on-demand. Vincent, could you get the output of the plugin to see which methods it calls ?
(In reply to comment #10) > I think we should first look at what that web page actually uses and only > implement on-demand. Vincent, could you get the output of the plugin to see > which methods it calls ? See comment 4, and the tarball in comment 7 :)
Supporting .playlist isn't going to be easy...
You mean the add()? The rest looks pretty straight forward to implement.
Yes. This makes it necessary to transfer the playlist to and from the plugin to the viewer.
Lucky vuntz, I went on holidays with somebody with a Freebox TV. The mute button and the play/stop buttons' states can get out of sync because the way the webpage is coded sucks, and I'm also not so certain about the volume handling (VLC uses 0-200, and the web page expects 10 steps increments). The audio also doesn't seem to play back properly with the current versions of gstreamer and plugins. I'll file a bug about that later on when the plugins have got updated to the latest version (I captured one of the MPEGTS streams with MPEG-4 video and AAC audio). 2008-02-15 Bastien Nocera <hadess@hadess.net> * browser-plugin/org_gnome_totem_PluginViewer.xml: * browser-plugin/totem-plugin-viewer-constants.h: * browser-plugin/totempluginviewer-marshal.list: * browser-plugin/totem-plugin-viewer.c: (totem_embedded_class_init), (totem_embedded_save_volume), (totem_embedded_stop), (totem_embedded_set_volume), (totem_embedded_set_fullscreen), (totem_embedded_toggle_fullscreen), (cb_vol), (on_tick), (totem_embedded_action_volume_relative), (totem_embedded_construct): Implement a property change signal when fullscreen state or volume changes * browser-plugin/totemPlugin.cpp: * browser-plugin/totemPlugin.h: As above and implement SetFullscreen() * browser-plugin/totemComplexPlugin.cpp: * browser-plugin/totemComplexPlugin.h: * browser-plugin/totemGMPSettings.cpp: * browser-plugin/totemGMPSettings.h: * browser-plugin/totemNarrowSpacePlugin.cpp: * browser-plugin/totemNarrowSpacePlugin.h: Fix for changes above * browser-plugin/totemConePlugin.cpp: * browser-plugin/totemConePlugin.h: Implement ToggleFullscreen/ToggleMute, state, mute, volume and fullscreen properties (Closes: #462544) 2008-02-14 Bastien Nocera <hadess@hadess.net> * browser-plugin/totemConePlugin.cpp: * browser-plugin/totemConePlugin.h: Implement stubs for the Audio and Video objects * src/backend/bacon-video-widget-gst-0.10.c: (bacon_video_widget_stop): Fix warning when _stop() is called in logo mode 2008-02-14 Bastien Nocera <hadess@hadess.net> * browser-plugin/org_gnome_totem_PluginViewer.xml: * browser-plugin/totem-plugin-viewer.c: (totem_pl_item_free), (totem_embedded_clear_playlist), (totem_embedded_add_item), (totem_embedded_open_uri), (totem_embedded_open_stream), (totem_embedded_set_local_file), (totem_embedded_set_playlist), (totem_embedded_push_parser): * browser-plugin/totemPlugin.h: * browser-plugin/totemPlugin.cpp: Implement ClearPlaylist and AddItem, to manipulate the playlist * browser-plugin/idl/totemIConePlaylist.idl: Fix prototype for add * browser-plugin/totemConePlugin.cpp: Implement ::Add, and ::Clear * browser-plugin/totemPluginGlue.cpp: Fix a compilation warning 2008-02-13 Bastien Nocera <hadess@hadess.net> * browser-plugin/idl/Makefile.am: * browser-plugin/idl/totemIConeAudio.idl: * browser-plugin/idl/totemIConeInput.idl: * browser-plugin/idl/totemIConePlaylist.idl: * browser-plugin/idl/totemIConePlaylistItems.idl: * browser-plugin/idl/totemIConeVideo.idl: Update the IDL for VLC 0.8.6 and above * browser-plugin/totem-plugin-viewer.c: (totem_embedded_open_uri), (totem_embedded_open_stream), (totem_embedded_update_menu): Add more debug for some remote functions, and try to use the stream_uri when it's available * browser-plugin/totemConePlugin.cpp: * browser-plugin/totemConePlugin.h: Implement stubs for Playlist and PlaylistItems objects
Bastien, you might want to try to use fluendo MPEG demuxer (if you're not already), since it is supposed to handle MPEG TS in addition to MPEG PS. http://core.fluendo.com/gstreamer/src/gst-fluendo-mpegdemux/
That's already what I was using, couldn't find any other TS demuxers that'd work.
Does the recently released gst-fluendo-mpegdemux 0.10.15 do it for you?