How Eliminating Geography is Disrupting Healthcare

by Martin Westin in

My first article over at the Trice blog:

From smoke signals to Skype, humans have always tried to invent communication tools to transcend geography. Today, the internet is our most versatile technology that allows us to communicate without physical implications.

At Trice, we leverage the power of the internet, also known as the cloud, to help physicians optimize financial, clinical, and patient outcomes by making geography irrelevant.

In order to optimize outcomes, we had to eliminate 3 major restrictions caused by geography...

Read the whole thing at

Implementing GUI persistence in an iPhone App

by Martin Westin in ,

With iOS 4, Apple pushes everyone to build our apps so that we preserve the state of the application when it terminates. This is because to the normal user there is no difference between an app being "pushed" to the background and an app being terminated. Apple want the users to feel like our apps never terminate. That they just leave them in the background a while. I'll explain how I implemented this behaviour using NSUserDefaults in my app, Extraction. It may not be the most advanced technique or the best in any way. I just know it works for me.

Read More

Modifying a Projekktor Theme

by Martin Westin in ,

Projekktor is a most excellent open-source video player for the web. It requires javascript but that is totally worth it. You get cross-browser compatibility, flash fallback, consistent GUI across browsers and much more. What i will explain in this short article is how to modify the GUI part. The first thing I wanted to know was: What does the html look like? Since it is generated by javascript it is not readily apparent so here is the html structure of the video "controls".

Wrath - YOUTUBE Flash API 2/4
00:18 / 03:46

The enclosing div (classed ppcontrols) is itself enclosed inside a set of tags that are positioned and make fixed-size box (the size of the video element). This makes things nice and workable. You can position and set the size for ppcontrols and then place each element in relation to this div.

I will continue to call each control element by it's class name since these are what you target in your css. Just to make things really obvious, here is a screenshot with the class-names added.

Projekktor Controls

If you want a different look but like the general dimensions you can just start replacing the graphics in the theme folder of projekktor.

To my eyes the standard theme looks very nice. I wanted to keep the same look but make it resize to fit various video sizes. To achieve this I needed to make the size of the main ppcontrols div relative to the video frame. Instead of a fixed width I ended up with this css.

.ppcontrols {  
    position: relative;
    left: 20px;
    margin-right: 40px;
    display: block;
    width: auto;
    height: 87px;
    margin-top: -110px;
    border: solid 2px #fff;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    border-radius: 12px;
    background: transparent url(projekktor/ctrl-bg.png) 0 0 repeat-x;
    padding: 0px;

This creates a control area that always stretches to 20px from the left and right edges. As you can see I also added a css border (with radius) and a new background to get close to the original graphics of the theme while still being flexible horizontally.

The I proceeded to position the elements relative to one of the edges or the middle of the controls area. For example:

.ppfsenter {
    top: 50px;
.ppplay {
    left: 50%;
    margin-left: -17px;
.ppscrubber {
    left: 13px;
    right: 13px;

With these minor changes to the css the full-screen buttons stick to the right edge and the play/pause buttons stick to the center. Items like the scrubber and the title are positioned in a similar way to the main ppcontrols div. I chose a different css to get the results this time ... just for the variation. Use whichever one you prefer.

The results of my modifications are available for download if you want to take a look at all of it or give it a test-drive.

"demo" (just the v0.6.1 release unpacked and edited)

the css and images in a zip-file