an example video player in FIVE lines of javascript code :P

svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=923866
This commit is contained in:
Marco Martin 2009-02-09 16:15:41 +00:00
parent 0a4aa1f37c
commit de7ebc6d69
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,8 @@
layout = new LinearLayout(plasmoid);
video = new VideoWidget();
layout.addItem(video);
video.file = startupArguments[0];
video.play();

View File

@ -0,0 +1,20 @@
[Desktop Entry]
Name=script-mediaplayer
Comment=Javascript media player
Icon=applications-multimedia
Type=Service
X-KDE-ServiceTypes=Plasma/Applet
X-Plasma-DropMimeTypes=video/mpeg,video/quicktime,video/ogg,video/x-msvideo, audio/mpeg, audio/x-vorbis+ogg, audio/x-flac
X-Plasma-MainScript=code/main.js
X-KDE-PluginInfo-Author=Marco Martin
X-KDE-PluginInfo-Email=notmart@gmail.com
X-KDE-PluginInfo-Name=script-mediaplayer
X-KDE-PluginInfo-Version=0.0
X-KDE-PluginInfo-Website=http://plasma.kde.org/
X-KDE-PluginInfo-Category=Utilities
X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
X-Plasma-API=javascript