Media Player control

You will be able to add a Media Player entity to any of the buttons pages and with a long press you will see the media player page.
This commit is contained in:
Edward Firmo
2023-09-12 20:06:58 +02:00
parent 39a5fcf434
commit 81d16343a7
13 changed files with 390 additions and 151 deletions

View File

@@ -74,6 +74,18 @@ Variable (int32) is_muted
Scope: local
Value: 0
Variable (int32) prg_current
Attributes
ID : 27
Scope: local
Value: 0
Variable (int32) prg_total
Attributes
ID : 28
Scope: local
Value: 0
Text page_label
Attributes
ID : 1
@@ -102,7 +114,7 @@ Text vol_text
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 10
Max. Text Size : 5
Text bt_vol_down
Attributes
@@ -424,3 +436,65 @@ Timer timer0
printh 00
printh FF FF FF
Timer prg_timer
Attributes
ID : 26
Scope : local
Period (ms): 1000
Enabled : no
Events
Timer Event
if(prg_current.val<prg_total.val&&prg_total.val>0)
{
prg_current.val++
time_progress.val=100*prg_current.val/prg_total.val
covx prg_current.val,time_current.txt,0,0
}
// Progress - Total
sys0=prg_total.val/3600 //hours
sys2=prg_total.val%3600 //remainder
sys1=sys2/60 //minutes
sys2%=60 //seconds
time_total.txt=""
if(sys0>0)
{
covx sys0,time_total.txt,0,0
time_total.txt+=":"
if(sys1<10)
{
time_total.txt+="0"
}
}
covx sys1,va0.txt,0,0
time_total.txt+=va0.txt+":"
if(sys2<10)
{
time_total.txt+="0"
}
covx sys2,va0.txt,0,0
time_total.txt+=va0.txt
// Progress - Current
sys0=prg_current.val/3600 //hours
sys2=prg_current.val%3600 //remainder
sys1=sys2/60 //minutes
sys2%=60 //seconds
time_current.txt=""
if(sys0>0)
{
covx sys0,time_current.txt,0,0
time_current.txt+=":"
if(sys1<10)
{
time_current.txt+="0"
}
}
covx sys1,va0.txt,0,0
time_current.txt+=va0.txt+":"
if(sys2<10)
{
time_current.txt+="0"
}
covx sys2,va0.txt,0,0
time_current.txt+=va0.txt