About This File
This file includes the source code for zPlayer, which is a stand-alone, simple, intuitive and easy-to-use, yet fully functional media player. I made this to suit my purpose and you can tweak it to your taste. The source code is only about 2500 lines and only standard #include files were used.
As of its release date, the compiled exe file of this player, as attached hereto, is not flagged by Windows Defender with latest Security Intelligence Update.
This player has the following features:
- This player is based on winmm.dll, not IE-embedded WMPlayer.ocx.
- Play back all formats of media files as far as proper codecs are installed in your computer
- Video window is independent of other windows. Minimal GUI for music.
- Load files or folders for playback and save the playlist if a folder was loaded
- User can manaually make their own playlist
- Sort or shuffle the playlist
- Forward, backward, pause, repeat function
- A-B repeat function for the current file and function to repeat multiple files out of a large playlist
- Increase/decrease/mute program sound volume
- Save play-back environment when terminating a session and resume that environment in the next session
- 'Resume playback' option for a file you left off in the middle of playback of a folder. Audio fade-in when playback is resumed
- Playlist has context menu for Play this file, File properties, Search internet, Go to this folder and Remove from playlist
- With a double-click, you can play back an item in the playlist
- Search strings in the playlist
- Hotkeys available for most of the functions
- Very small footprint: very low CPU and memory usage
If you find an error, please download the latest version as most probably the error may have been corrected already. Otherwise I would appreciate it very much if you kindly let me know.
Note: zPlayer is the name I used when I introduced the early version of this player in my blog back in early 2009 and, therefore, has nothing to do with the mobile media player of the same name which started marketing in 2015.
Version 6.0.1.5 - November 22, 2023
1. Corrected: An error occured when the following sequence of actions took place:
(1) While a video file is playing, click the taskbar icon of zPlayer and minimize all GUIs.
(2) While all GUIs are minimized, the player moves on to the next file, which happens to be an audio file.
(3) While an audio file is playing, click the taskbar icon of zPlayer again.
(4) I would expect to see the main GUI only. But an empty $hVideoGUI remained on the screen as well.
2. Changed the function of Ctrl+Alt+w hotkey. Now it will bring up all open GUIs to the foreground and move them to their default positions.
Version 6.0.1.4 - November 14, 2023
1. Corrected: Error when "Find Next" button is clicked in the playlist window. There must have been some foul-up in making changes somewhere else.
Version 6.0.1.3 - November 3, 2023
1. Corrected: The closing parenthesis missing for the folder name in the playlist column header when a root folder of a drive is loaded.
2. Corrected: A-B repeat and multi-file repeat setup windows not working as intended when the video window is in maximized or fullscreen mode.
3. Eliminated redundant process of getting the total length of a playlist when the playlist is shuffled or sorted. Previously, _GetLength() function was called as a part of _PlaylistLoad() function , but now it is called separately as needed.
4. Changed the term "shuttle" to "progress bar" and "streaming" to "playback" to alleviate any confusion. The small rectangular progress bar moves along the slider to indicate current media position.
Version 6.0.1.2 - October 10, 2023
1. Corrected the problem of total media length of the playlist not showing after removal of an item from the playlist by way of context menu.
2. Revised Help file to show file types which can be played back by winmm.dll without installing additional codecs.
Version 6.0.1.1 - September 28, 2023
1. Corrected the problem of Windows Defender incorrectly detecting zPlayer.exe as malware. Through comparison of codes, I found that using WinSetState function to hide video control GUI caused the false detection. The problem was solved by using GUISetState instead of WinSetState.
Version 6.0.1.0 - September 26, 2023
1. A minor error was found and corrected. When I clicked zPlayer icon on the taskbar to hide all open GUIs, the video control on video window, which is almost transparent, remained on the screen.
2. Some spelling mistakes in Help window were corrected.
Version 6.0.0.9 - September 22, 2023
1. When a folder is selected, and if the folder has media files in both the top-level and sub-level folders, an option will be given to include or exclude the files in sub-level folders. If a playlist file already exists in the folder, this option will be skipped. If the user wants to change the scope of inclusion, the playlist should be deleted before selecting that folder, or the Rescan button clicked in playlist window.
2. If the mouse moves over zPlayer icon on the Windows taskbar, the current file name will appear in a tooltip. Clicking this icon will hide or show all open GUIs.
Version 6.0.0.8 - September 12, 2023
1. Made changes here and there including some major ones, to accomodate virtual listview, which was not as a simple task as it seemed at first.
Version 6.0.0.7 - September 09, 2023
1. Changed the method of adding items to playlist from _GUIListView_AddArray() to virtual listview, which is much faster and allows colored background without flickering.
2. Added multi-file repeat function, which can be set-up in a little GUI invoked by clicking the total length label at the right side of progress bar. As I listen to a large playlist, sometimes I feel like repeating several items, Beethoven's Symphony 9, movements 1 to 4, for example, out of a collection of several hundred classical music titles. In order to visualize this set-up, the player displays selected items in pink background.
Version 6.0.0.5 (August 27, 2023) and Version 6.0.0.6 (August 29, 2023)
1. Added Ctrl+Alt+s hotkey to perform shuffle/sort functions. - Version 6.0.0.5
2. Fixed error in the process of removing an item from the playlist, an aftermath of adding length column in the playlist. - Version 6.0.0.6
3. Added a column to playlist to show length of each file. The total length of the playlist is also displayed in the file name column header. - Version 6.0.0.5
Note: When you load a folder for the first time, the player will get media lengths in the background and fill the Length column of the playlist. During this time, media will keep playing but Shuffle/Sort, Load/Unload, Rescan and Reshuffle functions will be disabled and media title will be displayed in red color. This process will take about 15 seconds for a folder containing 500 media files. Playlists created by the former versions are compatible with this version, but it is recommended that all previous playlists be deleted before running this version. If you have a manually-made playlist, you may keep it.
Version 6.0.0.4 - August 14, 2023
1. Added $SS_NOPREFIX in the style of title display label, so that "&" symbol contained in the file name is displayed correctly.
2. Improved A-B repeat set-up and cancel procedures.
Version 6.0.0.3 - August 7, 2023
1. A new hotkey(Ctrl+Alt+t) was defined to set "Always On Top" attribute of main GUI on or off.
2. Provided for the possibility of A-P Repeat set-up window to be positioned on the left side of main GUI, in case the user has moved the main GUI to the right side of the screen.
Version 6.0.0.2 - August 4, 2023
1. Changed the color of media control icons(Unicode characters) in main GUI from default black to gray. The black icons looked too conspicuous compared to other components nearby.
2. Corrected a minor error in A-B repeat set-up function where starting and ending positions entered in seconds instead of mm:ss format failed to work correctly.
3. Corrected errors in re-creation of playlists after 'Reshuffle' or 'Remove from playlist' operations.
4. Added a procedure to ensure the integrity of existing zPlaylist.txt and zPlaylist-Shuffled.txt files when loading a folder.
Version 6.0.0.1 - July 29, 2023
1. Changed writing mode of files from UTF-8 to UTF-16 to handle double-byte characters correctly.
2. Added a function to accommodate manually-made playlist which contains files from different folders.
3. Added some details about playlist in Help contents and changed zPlayer_ReadMe file format from text to PDF.
Version 6.0.0.0 - July 23, 2023
1. Changed playback engine from IE-embdded WMPlayer.ocx to Winmm.dll.
2. Reduced the main GUI to a bare minimum and the playlist window is hidden by default.
3. To cope with the reduced GUI, the name of current file flows in marquee style.
4. Added an option to load files instead of folders.
5. Implemented A-B repeat function.
6. Implemented audio fade-in when resuming playback from the last streamed position.
7. Changed default position of video window from right upper corner of screen to center.
8. The media control in video window is hidden by default and becomes visible when mouse hovers over the bottom of the window.
9. The length of progress bar in video window is as long as the width of the window.
10. Eliminated file installs and used unicode characters instead for all media controls.
11. Unless the video window is maximized or stretched to fullscreen, its size is forcefully adjusted to keep the source aspect ratio.
Edited by CYCho
What's New in Version 6.0.1.5
Released
Version 6.0.1.5 - November 22, 2023
1. Corrected: An error occured when the following sequence of actions took place:
(1) While a video file is playing, click the taskbar icon of zPlayer and minimize all GUIs.
(2) While all GUIs are minimized, the player moves on to the next file, which happens to be an audio file.
(3) While an audio file is playing, click the taskbar icon of zPlayer again.
(4) I would expect to see the main GUI only. But an empty $hVideoGUI remained on the screen as well.
2. Changed the function of Ctrl+Alt+w hotkey. Now it will bring up all open GUIs to the foreground and move them to their default positions.