(2021-09-14, 00:56)Dumyat Wrote: I actually caught sight of this post yesterday, which was a bit freaky as I was trying to implement the same kind of feature for my own skin mod tail end of last week. Do you mind if I check out your code and see if the same will work on my Estuary mod?
I did find this this piece of code on Estuary which auto hides the Top Seek bar when media is paused after 5 secs, but I couldn't get it to work properly for the regular OSD in the way you describe on the last line above:-
@
Dumyat , by all means, go ahead and check out the code and use whatever you need.
(2021-09-14, 00:56)Dumyat Wrote: Also, what is the current version of Amber right now, as I don't seem to have this option on my version which is 3.4.11. Do I have download from the git to get the latest version?
Cheers
Matrix is 3.4.29. You can use the Amber repo for Matrix to keep it updated, but GitHub will always have the latest features/fixes.
In terms of the auto close for the OSD, I use two methods:
1. Without need for addons, I basically have on the onfocus for all the OSD buttons an alarm that changes the focus to a hidden button that closes the OSD. The include that does this is the following:
xml:
<include name="OSDButtonOnFocus">
<onfocus condition="String.IsEmpty(Skin.String(OSDTimeout))">AlarmClock(osd_timeout,SetFocus(99220),00:05,silent)</onfocus>
<onfocus condition="Skin.String(OSDTimeout,three)">AlarmClock(osd_timeout,SetFocus(99220),00:03,silent)</onfocus>
<onfocus condition="Skin.String(OSDTimeout,five)">AlarmClock(osd_timeout,SetFocus(99220),00:05,silent)</onfocus>
<onfocus condition="Skin.String(OSDTimeout,ten)">AlarmClock(osd_timeout,SetFocus(99220),00:10,silent)</onfocus>
<onfocus condition="Skin.String(OSDTimeout,fifteen)">AlarmClock(osd_timeout,SetFocus(99220),00:15,silent)</onfocus>
<onfocus condition="Skin.String(OSDTimeout,twenty)">AlarmClock(osd_timeout,SetFocus(99220),00:20,silent)</onfocus>
<onfocus condition="Skin.String(OSDTimeout,thirty)">AlarmClock(osd_timeout,SetFocus(99220),00:30,silent)</onfocus>
<onfocus condition="Skin.String(OSDTimeout,oneminute)">AlarmClock(osd_timeout,SetFocus(99220),01:00,silent)</onfocus>
<onunfocus>CancelAlarm(osd_timeout,true)</onunfocus>
</include>
And all of the OSD buttons have this on their onfocus, if the setting to auto close the OSD is enabled. One example:
xml:
<!-- Previous -->
<control type="radiobutton" id="600">
<include content="OSDButtons" condition="!VideoPlayer.Content(livetv)">
<param name="icon">OSD/OSDPreviousNF.png</param>
</include>
<include content="OSDButtons" condition="VideoPlayer.Content(livetv)">
<param name="icon">OSD/OSDChannelDownNF.png</param>
</include>
<include condition="Skin.HasSetting(AutoClose.VideoOSD) + !Skin.HasSetting(AutoClose.withInfoService)">OSDButtonOnFocus</include>
<onclick>PlayerControl(Previous)</onclick>
<oninfo>Skin.ToggleSetting(OSDInfo)</oninfo>
</control>
2. Use the functionality of script.skin.info.service (versions 1.0.8 and higher). This addon has an auto close feature for the video OSD. You just need to set the skin string SkinInfo.AutoCloseVideoOSD to the number of seconds that you want. In Amber I provide a select dialog for the user to choose how many seconds, and the include that has the selections for the dialog is this:
xml:
<include name="SelectOSDTimeout2">
<item>
<label>$LOCALIZE[13113]</label>
<onclick>Dialog.Close(1121)</onclick>
<onclick>Skin.Reset(SkinInfo.AutoCloseVideoOSD)</onclick>
</item>
<item>
<label>1 $LOCALIZE[32340]</label>
<onclick>Dialog.Close(1121)</onclick>
<onclick>Skin.SetString(SkinInfo.AutoCloseVideoOSD,1)</onclick>
</item>
<item>
<label>2 $LOCALIZE[32047]</label>
<onclick>Dialog.Close(1121)</onclick>
<onclick>Skin.SetString(SkinInfo.AutoCloseVideoOSD,2)</onclick>
</item>
<item>
<label>3 $LOCALIZE[32047]</label>
<onclick>Dialog.Close(1121)</onclick>
<onclick>Skin.SetString(SkinInfo.AutoCloseVideoOSD,3)</onclick>
</item>
<item>
<label>4 $LOCALIZE[32047]</label>
<onclick>Dialog.Close(1121)</onclick>
<onclick>Skin.SetString(SkinInfo.AutoCloseVideoOSD,4)</onclick>
</item>
<item>
<label>5 $LOCALIZE[32047]</label>
<onclick>Dialog.Close(1121)</onclick>
<onclick>Skin.SetString(SkinInfo.AutoCloseVideoOSD,5)</onclick>
</item>
<item>
<label>6 $LOCALIZE[32047]</label>
<onclick>Dialog.Close(1121)</onclick>
<onclick>Skin.SetString(SkinInfo.AutoCloseVideoOSD,6)</onclick>
</item>
<item>
<label>7 $LOCALIZE[32047]</label>
<onclick>Dialog.Close(1121)</onclick>
<onclick>Skin.SetString(SkinInfo.AutoCloseVideoOSD,7)</onclick>
</item>
<item>
<label>8 $LOCALIZE[32047]</label>
<onclick>Dialog.Close(1121)</onclick>
<onclick>Skin.SetString(SkinInfo.AutoCloseVideoOSD,8)</onclick>
</item>
<item>
<label>9 $LOCALIZE[32047]</label>
<onclick>Dialog.Close(1121)</onclick>
<onclick>Skin.SetString(SkinInfo.AutoCloseVideoOSD,9)</onclick>
</item>
<item>
<label>10 $LOCALIZE[32047]</label>
<onclick>Dialog.Close(1121)</onclick>
<onclick>Skin.SetString(SkinInfo.AutoCloseVideoOSD,10)</onclick>
</item>
</include>
For reference, you can look at the following files in Amber:
- Includes_FullScreen.xml - All of the OSD includes are here
- VideoOSD.xml
- Includes_CustomSelect.xml - All of the includes for custom select dialogs are here
- Custom_1121_InfoSelect.xml - this is the custom select dialog
- SkinSettings.xml - so you can look at the settings I implemented for auto close for the video OSD
- Startup.xml - this is where I run script.skin.info.service if available
Please let me know if you need any help with this. Thanks.
Regards,
Bart