<onclick>videoplayer.videoaspect</onclick>
#1
Hi guys!

I want to make a button for toggle aspect ratio of a movie. Problem is, that I can't manage it to work. My code looks like this

Code:
<control type="button">
            <description>Aspect Ratio</description>
            <width>44</width>
            <height>44</height>
            <texturefocus>other_textures/OSD/BookMarksFO.png</texturefocus>
            <texturenofocus>playercontrols/video_osd/monitor.png</texturenofocus>
            <onclick>VideoPlayer.VideoAspect</onclick>
        </control>

Any help is appreciated, thanks in advance! Smile
Reply
#2
Try <onclick>AspectRatio</onclick>
Reply
#3
Hitcher Wrote:Try <onclick>AspectRatio</onclick>

Thanks for your answer, Hitcher! Tried it, but didn't work. Is it supposed to have an id, incase I don't know which?.

Thanks again!
Reply
#4
Had a play around and it only works when the VideoOSD is closed so the button needs to close this first. Then you have the problem that the first press only brings up the aspect dialog so you need to send two aspect ratio calls.

Anyway, this is how to get it to work -

PHP Code:
<onclick>Dialog.Close(VideoOSD,true)</onclick>
<
onclick>AspectRatio</onclick>
<
onclick>AspectRatio</onclick
Reply
#5
Hitcher Wrote:Had a play around and it only works when the VideoOSD is closed so the button needs to close this first. Then you have the problem that the first press only brings up the aspect dialog so you need to send two aspect ratio calls.

Anyway, this is how to get it to work -

PHP Code:
<onclick>Dialog.Close(VideoOSD,true)</onclick>
<
onclick>AspectRatio</onclick>
<
onclick>AspectRatio</onclick

Great thanks Hitcher! It worked! Smile
Well, now I was just thinking, instead of making a button for Aspect, as it wouldn't be wise as there already is a shortcut key for it. Maybe it should be a toggle button for subtitles, I tried to play around with it, but can't get that to work either?

Any idea?
Reply
#6
There is - 'z'.
Reply
#7
on/off?


Code:
<onclick>Dialog.Close(VideoOSD,true)</onclick>
<onclick>ShowSubtitles</onclick>
 
  • Intel NUC Kit DN2820FYKH ~ Crucial DDR3L SO-DIMM 4GB ~ SanDisk ReadyCache 32GB SSD ~ Microsoft MCE model 1039 RC6 remote
Reply
#8
xbs08 Wrote:on/off?


Code:
<onclick>Dialog.Close(VideoOSD,true)</onclick>
<onclick>ShowSubtitles</onclick>

No, but it worked. Smile What I want is, to have the OSD open, but when pressing the subtitle button, you can get trought the movies subtitles (like pressing 'L' on the keyboard). Is it possible without having to close the OSD first?

Thanks!
Reply
#9
NextSubtitle
Reply
#10
Hitcher Wrote:NextSubtitle

It only works if the Dialog (VideoOSD) is closed first, as I can see. I want to leave the VideoOSD open while browsing?

Anyway, my code looks like this:

Code:
<control type="button" id="6">
      <description>Subtitles</description>
      <width>44</width>
      <height>44</height>
      <texturefocus>other_textures/OSD/BookMarksFO.png</texturefocus>
      <texturenofocus>playercontrols/video_osd/subs-nofocus.png</texturenofocus>
      <onclick>Dialog.Close(VideoOSD,true)</onclick>
      <onclick>NextSubtitle</onclick>
</control>
Reply

Logout Mark Read Team Forum Stats Members Help
<onclick>videoplayer.videoaspect</onclick>0