Things are running smoothly regarding the update of the player object. In this post I will briefly describe what has been done so far.
The first step was the refactoring of the MCPlayer related code. Formerly, the MCPlayer class used ifdefs in most functions, based on whether it was using the ‘platform player’, ‘quicktime’, or was on Linux. Now, MCPlayer is split into two classes in separate files (player-legacy.cpp/.h and player-platform.cpp/.h). The former is the pre-platform API version; the latter the platform API version. This made it easier to update the platform-player version to use its own controller.
The next step was to implement a custom controller bar. For the reasons described in the previous blog post for Multimedia on Mac OS, we had to implement our own controller. After some discussion, and some research on the appearance of modern video controllers, we are almost there! Below is a preview of the current, and probably final version.
Because some users may not like this color, we thought it is better to make it customisable. So we added some properties to the player object. In fact, we tied in some existing properties that were not used for the player object. For example, the hiliteColor. For the player object, the hiliteColor is the color of the played area, as well as the color of the volume area in the volume popup window. It is also the color of a button background when this button is clicked. So, if you don’t like the purple color that is set by default, all you have to do is add a new button (or just type in the message box) with the following code:
on mouseUp
set the hiliteColor of player 1 to red
end mouseUp
The result is the following:
In the player object, you can also set the foreColor, which is the color of the selected area, i.e. the color of the area between the selection handles. This is dark grey by default.
Modify the code in your button, to change both the hiliteColor and the foreColor:
on mouseUp
set the hiliteColor of player 1 to “127,255,0″
set the foreColor of player 1 to “106,156,56”
end mouseUp
The result is the following:
Finally, we had to move from Quicktime/QTKit to AVFoundation. This transition is now done, and the new player object seems to work perfectly with the AVFoundation APIs. Some tweaks have still to be done, in order to ensure similar (or at least as similar as possible) behaviour with the old Quicktime/QTKit controller. Next, and final step as far as the player object is concerned, is to test it thoroughly and fix any bugs that may arise.
16 comments
Join the conversationSean Cole - July 7, 2014
Eager anticipation. Thanks for the update Panagiotis
Jack Phillips - July 7, 2014
Jack Phillips liked this on Facebook.
Simon Smith - July 7, 2014
Simon Smith liked this on Facebook.
Stephan Uijthoven - July 7, 2014
Stephan Uijthoven liked this on Facebook.
oab - July 7, 2014
@runrev How about update about IDE updates promised (one now crashes on 10.9+ all the time, is one major reason why I stop using livecode)
malte - July 7, 2014
The inevitable question: What about the other (desktop) platforms? Besides that, I really like the use of the properties.
ben - July 8, 2014
Hi Malte,
LiveCode 6.7 will features the media replacement on Mac. We’ll then start looking at the other platforms.
Warm regards,
Ben
XojoNews - July 7, 2014
RT @runrev: Multimedia on Mac OS – A quick progress update: Things are running smoothly regarding the update of the pl… http://t.co/rO87x…
Faber Muñoz Perez - July 7, 2014
Faber Muñoz Perez liked this on Facebook.
BvG - July 8, 2014
Those default colours adhere to no HIG rulebook, and are extremely arbitrary. I also think they’re ugly (violet) and too hard to see (dark grey).
Why not use the platform defaults instead? Those exist for a reason!
Ben - July 8, 2014
Hi BvG,
Thanks for your comment. The player colour properties allow you to choose whatever colour your like for your UI. If you would like to conform to the platform HIG rules you can do so. Especially if Panos’ choice of colour isn’t to your liking. These screenshots are taken with a slightly older prototype, the appearance of the bar has progressed since so you’ll be able to try it for yourself when the next release of LiveCode 6.7 comes out.
Warm regards,
Ben
Klaus Major - July 8, 2014
Very cool, but we might have to talk abou the default color… 😉
Short question:
QT 7 had this great feature to change speed and pitch of a movie independently from each other. Does AVKit also support this extremely handy (not only for musicians like me) feature?
Thank you!
Panagiotis Merakos - July 9, 2014
Hi Klaus,
Well, as far as I know AVFoundation does not support this feature. It has facilities for setting the time pitch algorithms, where one can choose from 3 available choices, balancing between quality and computational cost. But this feature is available in OSX v10.9 and later. With the new player, you will be able to change the movie rate (as this was the case with the old one). However, in the future we can take a look and see what is possible. Thanks for the feature request 🙂
Iain Sledger Ledger - July 8, 2014
Iain Sledger Ledger liked this on Facebook.
Devin Asay - July 9, 2014
As long as you are adding properties to the player object, how about letting us set the playIcon, the volumeIcon, the reverseIcon, etc., along with hilite, hover, and disabled versions of all of them.
That would be a huge boon for skinning and theming!
Dougy - July 19, 2014
Good stuff, Pana. I may have missed something, but are we ever going to see multiple, simultaneous audio channels (with cached audio files for instant playback) addressed on OSX as it is on iOS?