{"id":729,"date":"2009-02-14T16:23:12","date_gmt":"2009-02-14T16:23:12","guid":{"rendered":"http:\/\/www.notmart.org\/index.php\/BlaBla\/The_smallest_media_player_in_the"},"modified":"2009-02-14T16:23:12","modified_gmt":"2009-02-14T16:23:12","slug":"the_smallest_media_player_in_the","status":"publish","type":"post","link":"https:\/\/notmart.org\/blog\/2009\/02\/the_smallest_media_player_in_the\/","title":{"rendered":"The smallest media player in the world"},"content":{"rendered":"<p>As I was showing <a href=\"http:\/\/www.notmart.org\/index.php\/BlaBla\/Rotating_your_adult_content\">here<\/a> now Plasma in trunk can also play video\/audio files, so what will be there in KDE 4.3? Basically two components:<\/p>\n<p>The first is a media player widget (or applet, or whatever&#8230;). It will be the basis for a future media center written totally with Plasma technologies (one of the exciting discussions we had at Tokamak2 \ud83d\ude42 as today it&#8217;s in playground and plays video files dropped in plasma, can open arbitrary audio\/video files, has some usual control buttons and exposes the standard org.mpris D-bus interface used to control media applications, can be controlled for instance from the now playing widget, as shown <a href=\"http:\/\/www.youtube.com\/watch?v=wzsZeiy4_4M\">here<\/a>.<\/p>\n<p>\nThe most central component is in libplasma right now and instead is well, a media player widget :p<br \/>\nThe difference is that it is a widget in the sense of reusable control to be used in the applets\/widgets\/plasmoids you write (so, wanna for instance make a youtube browser?:), it uses various components of Phonon, like Videowidget, MediaObject and AudioOutput and has a default set of control buttons that do a nice slide in\/slide out on mouse over, and the reallt cool thing is that using it from the javascript bindings is ridicolously easy.<br \/>\nThis is a complete plasmoid written in javascript in the minboggling amount of 6 lines of code:\n<\/p>\n<\/p>\n<pre>\nlayout = new LinearLayout(plasmoid);\nvideo = new VideoWidget();\nvideo.usedControls = DefaultControls;\nlayout.addItem(video);\nvideo.url = startupArguments[0];\nvideo.play();\n<\/pre>\n<p>\nAll it does in sequence is: make a layout, make a video widget, enable a default set of buttons, add the widget in the layout, load the argument as the video if any (i.e, the file that was dag and dropped on the desktop), and finally, play.<br \/>\nThis thing is in kdebase in the <a href=\"http:\/\/websvn.kde.org\/trunk\/KDE\/kdebase\/workspace\/plasma\/scriptengines\/javascript\/tests\/\">tests<\/a> folder of the javascript based plasmoids.\n<\/p>\n<p>\nNow, switching for a moment in hype-machine mode, think about <a href=\"http:\/\/www.youtube.com\/watch?v=eEH14Dx5oyw\">putting together<\/a> media content distribution, javascript, <a href=\"http:\/\/grundleborg.wordpress.com\/2008\/09\/05\/return-of-the-plasma-browser-plugin\/\">plasma, browsers<\/a> and the not really happy state of these things in Linux right now, really far fetched for now and not for the immediate future, but good things can happen \ud83d\ude00<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I was showing here now Plasma in trunk can also play video\/audio files, so what will be there in KDE 4.3? Basically two components: The first is a media player widget (or applet, or whatever&#8230;). It will be the basis for a future media center written totally with Plasma technologies (one of the exciting [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[2,10,21,7],"class_list":["post-729","post","type-post","status-publish","format-standard","hentry","category-blabla","tag-kde","tag-kde4","tag-linux","tag-plasma"],"_links":{"self":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/posts\/729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/comments?post=729"}],"version-history":[{"count":0,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/posts\/729\/revisions"}],"wp:attachment":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/media?parent=729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/categories?post=729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/tags?post=729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}