FireMonkey2 ExamplesJust another Embarcadero Blogs weblog2012-10-22T07:44:56ZWordPresshttp://blogs.embarcadero.com/stefanb/feed/atom/stefanbhttp://blogs.embarcadero.com/stefanb/?p=102012-10-22T07:44:56Z2012-10-19T10:47:48ZFM2 introduces TMediaPlayer, a non visual control similar to the Vcl TMediaPlayer but this one works on both Windows and Mac. It can play audio and video files which are displayed using TMediaPlayerControl.
To get the list of the supported files you can use TMediaCodecManager in FMX.Media which contains functions such as GetFileTypes : string or GetFilterString : string. The last is created to help opening media using open dialogues and setting the Filter property so you can open only supported files. I have built a demo application that will show you how to use TMediaPlayer for audio files. The demo allows you to load multiple media files into a TListBox and play them as a playlist. You have shuffle and repeat all options, volume control, drag and drop into the TListBox and custom open dialogues that use the application style. You will find more in the code, such as the use of actions and transparent forms.
You can download it from code central if you have an account, the download link is :http://cc.embarcadero.com/Item/29058
Hope you enjoy it and I will come back with more samples.
]]>0