Tag Archives: flashplayer

TVersity: Media Server

I am sharing my experience while finding a good media-server (software that can store, transcode and serves various media formats to devices – computers, mobile, apple-tv, etc).

We all (parents, brother, sister-in-law, sister and myself) stay together, which means we have got more than one TV, various devices (mobile, computers, laptops, etc). We realized, it’s useful to host the media at one central computer.

  • Storage
  • Wiki – to jot down the links and ideas
  • Development and Testing – when we work at/from home
  • Media Server (software that serves media to various devices in home)

Most of the requirements (above) are sorted out except the last one “Media Server”. I looked at various options, some of these are listed below:

I found myself more comfortable with TVersity, though it’s not opensource and only runs on Windows, for following reasons

  • Ease in administration:
    • anyone in my family can add/remove media using it’s easy to use administration interface.
    • admin tool runs using Adobe Flash Player, has been built using OpenLaszlo framework and executable has been created using Zinc like tool.
  • Ease while using:
    • Web based interface for administration – runs on Adobe Flash Player
    • Web based interface for media library
      • Simple HTML
      • Flash based (built using OpenLaszlo) – where media is transcoded and played using Flash Player, awesome, isn’t it?
      • iPhone friendly interface
  • Support for Open DLNA and UPNP
  • Automatically detects (most of) devices, transcodes and serves media, if required
    • That means, ffdshow and other tools can be used to add subtitle and apply various filters before serving the videos.
  • XBMC/Boxee that runs on my macbook and apple-tv worked really well with TVersity

You can find the complete list of features on TVersity website.

So now life is simpler and easier, we all store our media at one place and can see it anytime and on most of our devices. Having web-based access to media makes life easier. I also feel, it’s lot easier to extend web-interface, which I plan to do in sometime.

I would love to post about detailed comparison between various options (media-servers and tools) mentioned above, perhaps in another post, sometime in future. Another post would be there to share how our home network looks like. Hope, I can spend sometime drawing diagrams which would be lot easier to understand.

Adobe Flash Player onwards allows setting Authorization HTTP header

There were some issues with some earlier version of players, where it was not possible to set Authorization http-header for HTTP/GET requests. I tried to hack a way to do it using Socket or custom http-client in actionscript.

I just happened to read one of the technotes at Adobe’s site, which says Authorization header is allowed for Flash Player onwards. If you are trying to send request to another domain (different from the one hosting the SWF), a crossdomain-policy file is required.

Which are your favourite features in Flash Player 10?

Just curious:
Which are your favourite features in Flash Player 10?

I find new Text engine very useful in most of the application-development. Text layout engine is powerful enough to solve various use-cases, true bidirectional text support is being one of those.

I like other features too. Hopefully, I would post my views on those as well as text-layout-engine later.

Technorati tags: , , , ,

Must Read: Security changes in Flash Player 9

With the release of Flash Player 9,0,115,0, there are lots of security changes are being introduced. Some are already there in the current release, more would be coming in later releases.

If your flash/flex applications require security settings for crossdomain data loading, cross domain scripting, socket connection or any other thing, you must read the Deneb Meketa’s article on Adobe Developer Center.

I am reading the same and believe me, there are lots of new stuff (terms and things). It’s good that Adobe is constantly trying to improve security features, though I feel, there can be more flexibility for Socket connections.

Technorati tags: , ,

Adobe Flash Player’s Security-Sandbox is very restrictive

Adobe Flash Player Security-Sandbox is very good and we have not heard any major security vulnerabilities so far. However, I think,¬†it can be made¬†more intelligent, I have some use-cases where I can’t do anything.

XMLSocket API is cool, since it’s inception, developers could create¬†cool applications (multi-player games, chat-apps, presence-apps etc). XMLSocket¬†servers (unity, swocket etc)¬†is needed to¬†comply¬†with a¬†specification in order to work with Flash Player (as a client). Since developers are using/creating custom-servers, they could control various things on server-side, f.ex: configuring right security-permissions, serving right policy-file (crossdomain.xml) etc.

With Binary Socket API, in Adobe Flash runtimes, things have changed a lot. Applications (for Adobe Flash runtimes) can now connect to servers using standard protocols (POP3, SMTP, Databases, HTTP etc). Totally cool feature which allows creation of kick-ass applications (Yahoo! Web Messenger, mySql driver etc). But Adobe Flash Player’s security-sandbox is limiting Binary Socket’s capabilities.

I have been working on a library (as3httpclient)¬†to do more things¬†(http-status-messages, http-authentication over GET request,¬†support for more http-methods etc)¬†which are not supported by URLLoader API. This library (as3httpclient)¬†doesn’t work in deployed web-application because Adobe Flash Player’s Security-Sandbox restricts it to.

I have following questions/concerns:-

  • When URLLoader (or other such native APIs) can connect on any port, why can’t custom APIs (as3httpclient and others) connect?
  • Why can’t Flash Player¬†be little more intelligent¬†to check, if connection is made to a HTTP server? Rules could be:- If connection is requested to same domain and destination-port is¬†assigned to HTTP server, let communication happen. If destination server:port is in different domain, check for valid crossdomain.xml and allow the¬†connection?
  • Why¬†doesn’t Flash Player consider to-ports attributes, if policy-file is served over HTTP?

With standards, we expect flexibility. We can’t expect a HTTP server to push policy-file to Flash clients? That’s not standard.

Technorati tags: , , , ,

Extending CSS capablities in Macromedia Flash Player

I am going to give a simple example using TextField.StyleSheet.transform(..). This is used to extend the CSS parsing capability. For example, “leading” is not parsed by CSS parser in Flash Player. Let’s make an example for the same.

First we would extend TextField.StyleSheet by creating a subclass(StyleSheetEx) and overriding it’s transform method.

  • StyleSheetEx.as

    import TextField.StyleSheet;
    class StyleSheetEx extends TextField.StyleSheet {
      // override the transform method
      function transform(style:Object):TextFormat {
    	var _fmt:TextFormat = super.transform(style);
    	for (var z in style) {
          if (z == "leading") {
            _fmt.leading = style[z];
    		delete style[z];
    	for(var i in _fmt) {
    		trace(i + " : " + _fmt[i]);
       	return _fmt;
    // end class definition

  • style.css

    p {

  • StyleSheetEx.fla

    import StyleSheetEx;
    this.createTextField("_txt",this.getNextHighestDepth(), 50,50, 400,200);
    _txt.multiline = true;
    _txt.html = true;
    _txt.wordWrap = true;
    _txt.text = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc erat est, dapibus id, porttitor a, nonummy nec, augue. Vivamus non felis. Quisque posuere, est et iaculis convallis, felis eros tempor lectus, vel tempor dolor diam quis nisl. Donec tincidunt pellentesque leo. Donec eget nisl. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Morbi sit amet arcu ac magna elementum tristique. Nam fermentum.";
    var _css:TextField.StyleSheet = new StyleSheetEx();
    _css["owner"] = this;
    _css.onLoad = function(bSuccess) {
    this.owner._txt.styleSheet = this;

You can also see demo this example.

Create above files with code and test it. I hope, “leading” works for you also. I know there could be many better ways, as I can see many enhancements in the above code. Please feel free to suggest.