Wednesday, September 8, 2010

New Sura Header Frame Images

As our previous sura header frame was non-free, Brother Muslih Al-Aqqad from Sabily project, designed a few new frames to be used in future Zekr releases. Here I put them together for comparison. All of them are nicely designed and it's hard to say which is better. We'll probably use the first one in the next release, Zekr 1.0.1 inshaAllah.

Header 1

Header 2

Header 3

Header 4

Monday, August 30, 2010

Zekr Audio Support

Zekr used a flash player for recitation playback
until version 0.7.5 beta 1.
Three years ago, Zekr 0.6.5 was released (code named Zekr Ramadan Edition, ZRE), in which we first introduced audio playback support. We used a tricky way of playing mp3 files, which was to have a flash script play audio, and controlled via JavaScript methods and callbacks. This method of playing was not easy to implement and we had to do a lot of hacks to have it work. For example, instead of loading page HTMLs from file://, we had to load it through http://. Otherwise, flash security prevents JavaScript intraction between Zekr and the player. As a result we integrated an embedded HTTP server (based on NanoHTTPD), which was there until Zekr 0.7.5 beta 1, in which we completely redesigned audio playback system.

Although integrating with a flash player was done, we had many issues with flash plugin in Linux, Mac and even Windows. Flash was a non-free package in Linux and it wasn't included in recent Linux distributions. Moreover we have other restrictions with flash player. We were
  1. not able to continue playing when end of a page was reached;
  2. not able to play an aya (verse) twice or more;
  3. not able to wait between consequent playbacks;
plus many other issues, from crashing to not being able to display Quran page due to the local HTTP server used in some situations (because of proxy settings). Add to the above issues that Zekr was not a completely free software because it included a mp3 player .swf file which was a non-free content. As a result we switched to a pure Java mechanism to handle audio files. By doing this, we had the following advantages:
  1. being able to continue playing in a special scope (sura, juz, continuous, etc.);
  2. being able to play an aya (verse) twice or more;
  3. being able to wait constant seconds between two consequent ayas;
  4. being able to play formats other than mp3: speex, ogg, wav, au, etc.;
  5. no more dependency to an embedded HTTP server;
  6. being able to control audio playback functions such as play/pause/stop, next/prev, seek forward/backward, volume up/down, by keyboard shortcuts.
  7. being able to play special items: Audhubillah, Bismillah and Sadaghallah
We gradually enhanced our recitation support up to Zekr 0.7.5: made recitation file format simpler, added shortcut key support, added different playing modes for special items, added playing scope, made installing offline recitations easier.

With the new audio player mode, although Zekr recitation support was meaningfully improved, there are some problems for our Linux and Mac. On Mac, Zekr cannot be closed if audio player is used (and should be forcefully closed). On Linux, although it works perfectly (related bug report), it's not very easy to have it work for a Linux newbie. Zekr audio player only works with Sun Java, but as it's not a completely free package, modern distributions do not include it by default. For example Ubuntu 10.04, only includes OpenJDK (which is a free implementation of Java, with a large portion of Sun's plus some re-coding) in standard repositories, and allow Sun Java only as a second option. OpenJDK audio support is still buggy, and if we forgot that gain support issue, Zekr usually crashes when user presses play/pause/stop buttons. Since OpenJDK is not mature enough, specially for Java development, Sun Java is still provided by almost all distributions, so a Linux user should set Zekr to work with Sun Java. Since Sun Java maintains exclusive access to audio device, it may fail if other applications (like a flash loaded in Browser, your music player, or other applications) use audio device, complaining: javax.sound.sampled.LineUnavailableException: Audio Device Unavailable. This can be fixed by wrapping Zekr with padsp, which redirects OSS applications to PulseAudio. A detailed instruction on how to fix Zekr Linux audio problems can be found here.

Tuesday, August 24, 2010

Ramadan 1431, Zekr 1.0.0 and new gifts from zekr.org

Five years after first release of Zekr, I'm delighted to write the first blog post of Official Zekr Project Blog by the time Zekr 1.0.0 is released.
Zekr 1.0.0, released with many new features
including a brand new audio player

Alhamdulillah, we finally released Zekr 1.0.0 (Download) this Ramadan, after over 5 years from our initial version (0.1.0). We provided a portable version of Zekr for the first time, including Java (JRE) for our end users. Having this they should not worry whether they already have Java installed or not. This portable version works both 32 and 64 bit Windows machines. Making Zekr portable is a matter of adding a command line to it, so users of Zekr on other platforms can also make their Zekr portable.

With help of our brothers and verse-by-verse Qur'an projects, we were able to provide about 20 new offline recitations in different bitrates, sizes and qualities, from ~400MB to +1.6GB packages. We still plan to extend our recitation set, specially translation recitations (currently we have Ibrahim Walk's English recitation based on Sahih/Saheeh International translation).

Our current translation pack archive has about 40 items and we plan to extend this to ~80 translation packs in the near future, before this Ramadan, inshaAllah. We recently changed translation pack acceptance policy to a more optimistic policy, and we may include all non-controversial translation packs in our archive if we receive no objection from its license holder.

We've setup a Facebook page a few weeks before Ramadan and it currently has +1700 fans, still growing. Join us and share Zekr Facebook Fan Page.

Zekr has the first rank in downloads among Religious & Philosophy projects hosted on SourceForge.net. We have an average of +1300 downloads per day only from SourceForge (and more if you add downloads from Linux repositories, or other mirrors).