From PC to Mobile: EF Player

In the beginning of last month, I joined a computing camp at Kuala Lumpur. After coming back from there, I was basically busy at maintaining YMCA Volunteer Management System (VMS) together with my teammates. Although I was quite busy, I still contributed time to do GCL Project, my personal projects, as well.

However, due to the fact that the first two activities mentioned above: Computing camp and VMS maintenance were time consuming, there were only two products successfully completed one month after Google Docs Notifier was released. The two products are EF Player and EF Player (Mobile).

The Motivation
In December 2008, I was finding a way to store and play the music in YouTube. Downloading the videos from YouTube seemed like a simple way. However, in January 2009, I found a more simple way to do it, which is using YouTube API. Thus, I built several versions of YouTube Re-Player to do the job.

Last month, I couldn’t find the full version of the song Emotional Flutter in YouTube. However, there was one available in Tudou. In this case, YouTube Re-Player couldn’t be used. I remembered that my tutor once told me that browsers, such as Firefox and Chrome, actually downloaded videos to their cache folder when a YouTube video was loaded. So, I tried to look for the cache folder and later found that Chrome actually kept one copy of playing video from Tudou in its cache folder as well.

Since the copy in the cache folder is in .flv format, I had to find another player to play it. Hence, I built a new player: EF Player. I named it EF Player as I started this project because of the song Emotional Flutter.

EF Player

EF Player

Third Party Plugin: JW Player
After searching on Google for few days, I found a very powerful FLV player known as JW Player ( By referencing the code used in YouTube Re-Player (Desktop) that I built last year, I easily built another C# app which worked together with SWF (The JW Player itself is just a swf file).

Supported File Types: FLV, MP4, MP3 + YouTube Online Video

Supported File Types: FLV, MP4, MP3 + YouTube Online Video

JW Player is so powerful that it can actually play quite a lot of different types of audio and video files. Hence, by doing simple C# coding, I can easily make EF Player supports the following file types: .flv, .mp4 and .mp3. Hence, because of EF Player, I not only don’t have to download FLV player, but also stop using QuickTime Player because most of my audio and video files are in these three formats. Besides playing local files, EF Player can also play online YouTube videos by the help of JW Player. Thus, JW Player plays an important role in EF Player.

Different Approach To The Problem
The reason why I build EF Player and YouTube Re-Player is the same. I want to not only view, but also store my favourite YouTube (or other sites such as Tudou) music videos. In YouTube Re-Player (Desktop), I tries the parallel video downloading approach to solve the problem of viewing YouTube videos offline. However, it is not efficient. The correct way is to store the videos in the local machine, instead of always retrieving videos from YouTube site. Well, since I don’t want to get the video through direct downloading, I have to use the cache to help me achieve the goal of having YouTube videos stored in my computer.

As the browser already caches the YouTube videos that I watched before, now by using EF Player, I can use EF Player to watch the videos again without visiting YouTube site. So, I basically can keep a collection of YouTube videos in local machine so that I can view them anytime, anywhere without the requirement of having internet connection.

EF Player is more powerful than YouTube Re-Player in terms of the number of supported file types and EF Player actually makes replay to be optional, EF Player becomes a threat to another product of GCL Project: YouTube Re-Player. Hence, I currently try not to do anything related to the YouTube API in the EF Player.

However, the replay function in EF Player does not work as good as the one in YouTube Re-Player. EF Player will actually retrieve the video every time it replays it. I have no idea why.

From PC To Mobile
After I finished the EF Player, I tried to build one in Windows Phone 7.

EF Player (Mobile) on Windows Phone 7

EF Player (Mobile) on Windows Phone 7

It is not a simple task. First of all, Flash is not supported in Windows Phone 7 (poor Flash T.T). Hence, the JW Player cannot be used on Windows Phone 7. Secondly, my computer performance is highly decreased when I deploy my app on the Windows Phone 7 Emulator. So, I usually need to wait after pressing F5 in Visual Studio because the emulator takes time to setup my app. Thirdly, XAML returns. Well, I am still learning XAML, so I am not that pro in XAML yet (although I did a lot of XAML programming in CS3215 project).

Anyway, the EF Player (Mobile) does not support FLV, MP4 and YouTube online videos. It still supports MP3 though. Also, it can now play WMV and WMA files.

Learning While Doing
When I was doing CS3215 project, VS2010 was released few days before the end of the course. So, unfortunately, we didn’t have too much opportunity to use VS2010 in our project. Hence, I decided to learn how to use it in this summer vacation. EF Player and the GCL Homepage (completed in May) are then chosen to be the first three projects done using VS2010. Of course, EF Player is just a starting point. Starting from now, I will try to explore VS2010 more.

This is the first time I try out the third party tool in GCL Project, I think. Fortunately, the API documentation of JW Player is well written. Hence, I can easily learn how to make my C# code work together with their API.

This is also the first time that I build application for Windows Phone 7. As I said earlier, it is not that simple because it is a bit different from building app for PC. There are a lot of stuff working in PC cannot be run on Windows Phone 7. However, it is fun to see your app running on mobile phone, isn’t it? =)

Auto Rotate Feature (Thanks WP7)

Auto Rotate Feature (Thanks WP7)

Future Work
Summer holiday is going to end soon. However, I still need to plan the future work for EF Player Project.

First, learn how to improve it by adding in more useful features. Here, I try not to give any example of “useful features” that I want to add.

Second, make it to be another open source GCL Project. However, due to the fact that YouTube Re-Player is not yet an open source project and EF Player is more powerful than YouTube Re-Player, I will only publish EF Player after YouTube Re-Player is made open source. In addition, I am using third party app in EF Player, so I am not sure whether I’ll be sued if I publish EF Player.

Third, improve EF Player (Mobile) because there are still some features missing in the app. =)


One thought on “From PC to Mobile: EF Player

  1. Pingback: JBoss Workshop and My YouTube RePlayer | cuteprogramming

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s