XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Dec 11日 14:59

All times are UTC - 8 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: 2016年 Apr 20日 16:19 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
This is a simple media player Xwidget based on the old Steampunk Volume XWidget that will play your music and take up only a tiny amount of your desktop. It is a lovely piece of eye-candy as well as being useful on your desktop. An old trial widget that I never quite completed, knocked into minimal shape. It works. I was going to do a lot more but it'll have to suffice.

Image

Image

Image


Last edited by yereverluvinuncleber on 2017年 May 14日 03:50, edited 4 times in total.

Top
 Profile  
 
PostPosted: 2016年 Apr 28日 09:13 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
Due to the limitations of the Xwidget engine's media player core I decided to create a Yahoo widget using the same design. It is worthwhile noting the differences between the two widgets. The design on the Xwidget was significantly easier to accomplish given the graphical GUI and the use of the media player core. I was able to assign functionality to various parts of the widget without much coding at all. The documentation of the mediaplayer and its controls is sketchy to say the least but by divination and looking at other's widgets I was able to see how the media player core operates. It is a working widget but it is awkward for the user to operate as the media player core does not easily allow you to play a file immediately, instead you have to open the actual media player in order to play a playlist. Rather defeats the purpose. Adding a file to the playlist is easily achieved but the widget won't play it straight away.

Coding for the yahoo widget is much more tricky as there are no cores to interface into the Windows Media player, although there is complete and thorough documentation. You have to interface the widget via a COM object to the windows player OCX. You can then submit player commands to operate the player so you have complete control via code. Unfortunately you need to do everything by hand, things such as play/pause buttons changing and the widget reacting to the track duration all have to be controlled by timers, xml and javascript. The Yahoo widget took twice as long to create as the Xwidget version but the end result is better than the Xwidget version. The user can select the track to play, choose a complete folder to play and it will restart using the same default music folder. Some of the complexity is due to the use of the Windows Media player which is not a native player to the Yahoo widget engine. It has a complete API for itunes and it would have been much easier to create an itunes-controlling widget.

I'll add the yahoo widget here too (later when it is finished) so you can try it to see the difference, you can even also disassemble the widget and view the code to see how much more complex the Yahoo widget is. It will also help you realise what complexity is built into the Xwidget media player core.


Top
 Profile  
 
PostPosted: 2016年 May 8日 04:21 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
The Yahoo version of the Xwidget Media player is almost complete but I have to say it was a lot more of a workload than the Xwidget version. The mediaplayer core in Xwidget does a lot of the heavy lifting for you so you can just create a widget in a short time. The Yahoo widget has all the API calls to the Windows Media Player, in fact it has a lot more than the Xwidget core provides but the coding to implement sliders &C all has to be done by hand. It is relatively simple enough to do but there is interaction between the various controls that needs to be considered and it requires thought and careful programming in javascript.

The end result is a working Konfabulator widget in javascript. It is still being tested and used on my desktop and I won't post it here until it is bug free. I will update the Xwidget version too in order to keep them in synch. The Konfabulator/Yahoo version will stand as a comparison as to how much extra complexity is required without the heavy-lifting being done by one of Tony's cores. It will also show how limited Tony's mediaplayer core is and how much more functionality is required, as Jim said the mediaplayer core in Xwidget is lacking functionality.


Top
 Profile  
 
PostPosted: 2016年 May 10日 02:25 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
I have finished the Yahoo widget version of the steampunk Media Player.

Image

Image

Image

You can find it here at Deviantart Art. It is worth opening up and looking into as it really shows the difference between javascript Yahoo widgets and Xwidget 'core' widgets.

http://yereverluvinuncleber.deviantart.com/art/Steampunk-Media-Player-Yahoo-Konfabulator-Widget-605742870

My next task is to update the Xwidget version so it partially matches functionality. It is quite close as it is but a few subtle changes will be needed.

(Jim, please do not delete this post just because it is not specifically referring to an Xwidget. It is very pertinent to Xwidget as it shows the difference in complexity between Xwidget/Ywidgets - not just that, it is also an indicator of how much work needs to be done to Xwidget media player core to complete functionality - In addition I will also be testing the Xwidget version to see whether it can incorporate some of the COM embedding functionality to allow more functionality in the Xwidget version)


Top
 Profile  
 
PostPosted: 2016年 May 18日 07:09 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
I have knocked the steampunk media player yahoo widget into shape having based it entirely on the Xwidget version.

Image You'll see it looks identical and is functionally equivalent except for a few important enhancements.

I have attached it here as a zipped-up .widget file for playing with the konfabulator/yahoo widget engine. It is named Steampunk MediaPlayer Ywidget.zip.

It can be disassembled from a widget to a folder and flatfiles using the widget converter here:http://lightquick.co.uk/downloads/yahoo-widget-converter.html?Itemid=264

This will allow you to access the source code and images just as you would for Xwidgets. The source code is contained within the .js files. I have added one of the .js files in mediplayer.zip attached.

If you take the opportunity to have a look at the code you'll see how much more complex the yahoo widget version is with regard to the amount and complexity of the code. The Xwidget cores do all the heavy-lifting for you lucy Xwidgeteers.

Nevertheless, the yahoo widget version is unfortunately better than the widget due to the xwidget media player core lacking some key features.


Last edited by yereverluvinuncleber on 2017年 May 14日 03:44, edited 1 time in total.

Top
 Profile  
 
PostPosted: 2017年 May 14日 03:40 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
This is version 2.0.0 RC of the Steampunk Media Player XWidget - updated.

It is now functionally identical to the Yahoo widget version. I have stripped out all Tony's Xwidget media player functionality and now it uses only ActiveX calls to select and play the tracks. if you look at the code within the two widgets it is almost exactly the same.

Image

// fixed a bug preventing the autoplay selection from working
// fixed a bug with next/previous play not working after a restart with autoplay disabled

// tooltips for all items
// checks for valid folder before playing
// when saving a playlist, checks it is an XML file.
// default music folder should be C:\Users\Public\Music
// selecting a CD from the folder menu works from the menu too.
// unknown file types such as .flv - if Windows will not play the filetype then pop up an error message.

// allows dragging and dropping onto an existing playlist.
// utilises the fonts read from the registry.
// all prefs save successfully
// all prefs opened successfully
// play list text highlighted correctly
// loads of smaller bugfixes.
// refresh after shuffle
// fixed the lack of keypress capture
// drag drop onto the playlist areas
// drag drop onto the pipes
// "Page No." needs a background to be readable
// .MPG capitalised suffixes handled
// write a .xml playlist
// dragging three files to the playlist, it excludes the last file
// bug when selecting the beyond the first chunk not found
// all the prefs need to be read when the widget is opened
// xml write/read bug with path e:\music not setting correctly
// font issue resolved - now reads the fonts from the registry
// preference screens added

Having two widgets from two different engines using the same code base is exceedingly useful. When one receives an enhancement it can be easily applied to the other. Testing is the same and bug-fixing in one is equally applicable to the other.

The biggest benefit to me is the removal of Tony's poor quality media player core that was so limited in functionality. Working with the windows media player using ActiveX means that you have full control over your audio media. In comparison to Tony's crippled media player core you now have a fully working media player.


Last edited by yereverluvinuncleber on 2017年 Aug 1日 09:35, edited 16 times in total.

Top
 Profile  
 
PostPosted: 2017年 May 14日 05:16 
Online
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4567
Great work! Thanks for sharing :)

_________________
Image
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
PostPosted: 2017年 Jul 4日 11:57 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
Just submitted 1.0.9 of the yahoo widget media player and RC 2.0 of the xwidget

Bugs fixed.


Top
 Profile  
 
PostPosted: 2017年 Jul 7日 05:20 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
The conversion process for migrating from yahoo to xwidget is here:

http://yereverluvinuncleber.deviantart.com/journal/Guide-to-converting-Yahoo-Widgets-to-Xwidget-Pt1-677100991


Top
 Profile  
 
PostPosted: 2017年 Jul 15日 01:19 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
Just submitted 1.0.10 of the yahoo widget media player and another release candidate for version 2.0 of the xwidget

// added a message when a root folder is selected.
// added a preference to allow the bottom tracklist buttons to be retained on screen.
// added deletion buttons
// changed red tap to a hints toggle
// added sounds for the chain pull and the keypresses
// bundle the Centurion SF light font with the widget
// added the extraction of the font and the menu option to install
// bug when cancelling after pressing the F to read an XML file - fixed


Top
 Profile  
 
PostPosted: 2017年 Jul 17日 01:36 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
Just submitted another RC 1.0.10 of the yahoo widget media player and another release candidate for version 2.0 of the xwidget

// allow deletion of a track from the playlist via a pop up metal/red X when the mouse hovers over a track
// grouped the bottom keys, to correspond to the Xwidget changes that allow correct fade
// modify the drop position to take into account the page number
// added the ability to delete a track from the playlist
// fixed a bug with the zorder of the position slider


Top
 Profile  
 
PostPosted: 2017年 Aug 1日 09:34 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
This is version 2.0.1 of the Steampunk Media Player XWidget - updated - please try it. This is now the final version so if it does not work for you please tell me! There were two remaining bugs, one with the menu failing to update and the other concerned saving the preferences in Win10. Win10 has a problem saving .INI files in the program's default folder if that folder is within one of the two program files folders. When UAC is enabled and switched to secure it prevents the .INI file that is used to store preference data from being written to. When the user makes a change that requires the preference file to be written, the write doesn't happen. As a solution, I have created a default .INI in the program's folder which it copies into the user's documents folder. It uses that version from that point onward.

// added code to better handle the prefsFileName
// added read from default ini file in Xwidget folder
// added write to new ini file in user documents folder due to Win10 protection of the program files folders
// saves the chosen folders to the main menu

I still have a tiny bit more to do but it should work better now.

The Yahoo widget version provided here for reference and comparison, the code is more or less identical.


Attachments:
Steampunk MediaPlayer Ywidget.zip [2.51 MiB]
Downloaded 31 times
xwidget_steampunk_mediaplayer_xwidget.xwp [2.6 MiB]
Downloaded 32 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB® Forum Software © phpBB Group