Marquee OSD - Make relative?

Discuss your Lua playlist, album art and interface scripts.
Chromatic
Blank Cone
Blank Cone
Posts: 28
Joined: 27 Jun 2013 16:03

Marquee OSD - Make relative?

Postby Chromatic » 06 Jul 2013 13:50

Is it possible to make the Marquee display relative instead of a X pixels ?

I ask because the only way the size of a marquee OSD stays the size you want it is to play only one resolution video. If you play a higher or lower resolution video the marquee, because it is set in pixels, gets much too small to read, or much too large and blocks the video depending on the resolution of the file that is played at any given time.

So there must be a way to make the marquee a relative size to the screen/video. IE: Size = X% of screen at bottom-right, top-left or whatever position you have it at.?

I found this bit of code somewhere on the net with someone I believe scripting the marquee to change relative to the size of the video.. maybe it could spur some insight on an easy way to make this happen. A script that changes the marquee size based on video resolution -- Or any other options I just haven't come across to make it stay the same size.

Code: Select all

setupMarquee: function(x,y) { //try{ //this.vlc.video.marquee.size = 24; this.vlc.video.marquee.size = Math.max(Math.floor(this.vlc.video.width / 38), 12); //this.vlc.video.marquee.position = 8; //this.vlc.video.marquee.opacity = 200; this.vlc.video.marquee.refresh = 100; this.vlc.video.marquee.timeout = 0; if(x && y) { this.vlc.video.marquee.x = Math.floor(x); this.vlc.video.marquee.y = Math.floor(y); } else { this.vlc.video.marquee.x = 65; this.vlc.video.marquee.y = Math.floor(myvlc.vlc.video.height - (myvlc.vlc.video.width/34) - 45); } this.vlc.video.marquee.disable(); this.vlc.video.marquee.enable(); //vlc.video.marquee.color = 0; //}catch(e){console.log(e);} },
Any ideas or help would be appreciated.

Thanks,

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Marquee OSD - Make relative?

Postby Jean-Baptiste Kempf » 08 Jul 2013 16:21

So far, no simple way for that.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 6 guests