From de7ebc6d695bdd207a9176b350e6735a605b9a97 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 9 Feb 2009 16:15:41 +0000 Subject: [PATCH] an example video player in FIVE lines of javascript code :P svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=923866 --- .../script-mediaplayer/contents/code/main.js | 8 ++++++++ .../tests/script-mediaplayer/metadata.desktop | 20 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 scriptengines/javascript/tests/script-mediaplayer/contents/code/main.js create mode 100644 scriptengines/javascript/tests/script-mediaplayer/metadata.desktop diff --git a/scriptengines/javascript/tests/script-mediaplayer/contents/code/main.js b/scriptengines/javascript/tests/script-mediaplayer/contents/code/main.js new file mode 100644 index 000000000..0b66a4348 --- /dev/null +++ b/scriptengines/javascript/tests/script-mediaplayer/contents/code/main.js @@ -0,0 +1,8 @@ + +layout = new LinearLayout(plasmoid); +video = new VideoWidget(); +layout.addItem(video); +video.file = startupArguments[0]; +video.play(); + + diff --git a/scriptengines/javascript/tests/script-mediaplayer/metadata.desktop b/scriptengines/javascript/tests/script-mediaplayer/metadata.desktop new file mode 100644 index 000000000..d3e46f64e --- /dev/null +++ b/scriptengines/javascript/tests/script-mediaplayer/metadata.desktop @@ -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