It is currently April 19th, 2024, 9:03 am

Simple MP3 player

Media controls, music players, video and animated visualizers
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Simple MP3 player

Post by jsmorley »

Someone was asking about playing a .mp3 file in Rainmeter when a skin is first loaded (or on demand) so I thought I would post one approach for this here.

Here is one that will play any .mp3 file without opening any bulky player or a separate window.
It requires a small external executable, which is included in the .rmskin.

https://lawlessguy.wordpress.com/2015/06/27/update-to-a-command-line-mp3-player-for-windows/

PlayMP3_1.2.rmskin

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnCloseAction=[!CommandMeasure MeasureKill "Run"]

[Metadata]
Name=PlayMP3
Author=JSMorley
Information=Uses the external cmdmp3win.exe to play any .mp3 file.
Version=Sep 20, 2019
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[Variables]
Song=#@#Songs\Vienna Teng - Lullabye for a Stormy Night.mp3
PlayerPath=#@#cmdmp3\
PlayerName=cmdmp3win.exe

[MeasureKill]
Measure=Plugin
Plugin=RunCommand
Parameter=taskkill /IM "#PlayerName#" /F
State=Hide

[RunOnceMP3]
Measure=Calc
Formula=Counter
IfEqualValue=1
IfEqualAction=[!CommandMeasure MeasureKill "Run"][!Delay 500]["#PlayerPath##PlayerName#" "#Song#"]
IfAboveValue=1
IfAboveAction=[!DisableMeasure RunOnceMP3]

[MeterPlay]
Meter=Image
W=25
H=25
SolidColor=101,244,0,255
LeftMouseUpAction=[!CommandMeasure MeasureKill "Run"][!Delay 500]["#PlayerPath##PlayerName#" "#Song#"]

[MeterStop]
Meter=Image
X=5R
W=25
H=25
SolidColor=255,45,7,255
LeftMouseUpAction=[!CommandMeasure MeasureKill "Run"]
You do not have the required permissions to view the files attached to this post.