PDA

View Full Version : Blackout a portion of the screen




Shadowbadger
Jun 12, 2012, 02:22 PM
I am not sure where to post this as there could be all kinds of solutions.

I watch the NFL online, it comes via what I think is an embedded Java app for streaming. The problem is that the channels which broadcast the games (CBS/Fox) put an update banner at the bottom of the screen showing the scores of games other than the one you are watching.

Over the course of the week I will watch many games and prefer not to know the result (living in the UK makes it easy to not be spoiled).

The effect I would like to achieve is blacking out this banne.

Some ideas I have are:


Making an app which is just a black banner of x pixel thickness. This banner would be draggable and would have to be layered above the fullscreen Java applet which sits in Chrome
Turning of entire lines of the display from say 750 to 800.
Turning off entire lines in Chrome fullscreen (not sure if the applet would be affected by that).


Hopefully you can see what I am trying to do, any ideas?



chown33
Jun 12, 2012, 03:30 PM
Masking tape?

Or maybe some Post-its stuck on the screen, since their adhesive may be less trouble to remove than masking tape.

I would be looking for a solution that involves no programming or scripting whatsoever. And I say that as an experienced programmer.

sero
Jun 12, 2012, 03:37 PM
Assuming you're on a mac, why not just use the zoom function? On my macbook, if I hold control and swipe 2 fingers up, the screen zooms in. You could just crop the screen this way.

Shadowbadger
Jun 12, 2012, 04:04 PM
Masking tape?

What I did last season :P

Assuming you're on a mac, why not just use the zoom function? On my macbook, if I hold control and swipe 2 fingers up, the screen zooms in. You could just crop the screen this way.

I am, sorry I should have said OSX 10.6, Mabcook Pro 3,1 2.2GHz

The zoom thing works although I lose about 1/5 of the width of the screen.

If there is a possible programming solution I am confident in being able to do it. I should have said that I am a software developer although working mostly with business systems. The correct route or terminology even to look at first would help a lot as I can go away and investigate it.

Just now I do not know where to start.

chown33
Jun 12, 2012, 04:46 PM
What I did last season :P

If it ain't broke, don't fix it.


Just now I do not know where to start.

I would start by finding out exactly how the content is being presented now. Is it a Java applet? Is it something else?

If it's a Java applet, is it possible to wrap the applet in a different webpage with different HTML, and specify a height that clips the bottom part off? Or how about using HTML5 with CSS and absolute positioning, to overlay the applet's subview with a floating CSS object that's opaque black?

If it's not a Java applet, is some other HTML surround possible?

Since you haven't told us anything about where the website is, no one else can look at it and make informed suggestions.

As to an app that shows a black banner you can overlay, how about QuickTime Player opening an audio file. Or there are any number of text editors that would let you configure the window color and text color. Open a window, paint it black, position window as desired.

Shadowbadger
Jun 12, 2012, 08:06 PM
It is "broke".

If I judged it adequate I would not be looking for another solution and would not have posted here.

Taking it off all the time is annoying and I cannot leave it on the big TV all the time as I am not the only one who uses it and the NFL is not the only thing I watch.

It is a Flash player, not sure why I thought it was Java, possibly it was in the past as the player did change a couple of years back. The reason I did no link it was I assumed you did not want to pay for it in order to answer this post.

I tried putting the flash in an iframe but even with a really high z-index I could not get another element to go on top of the flash when the flash is in fullscreen mode (the player cannot be resized, it is the slightly bigger youtube size (close to at least) or fullscreen

I have made some progress though. Opening a folder in slideshow mode (Opt-Cmd-Y) but not in fullscreen gives a mostly opaque draggable window. Better still, when dragged to the external monitor over the running, fullscreen flash video the slideshow is on top.

The problem though, it is not quite opaque enough. The file open of TextWrangler works as well but something black is easier on the eyes.

Something like the slideshow but darker is what I need. Be in the form of an existing app or creating something.

The programming question would be what do I need to call on a cocoa window to bring it to the foreground in exactly the same way as this slideshow . . . in front of the fullscreen external monitor.

Another solution could be making the slideshow backing less transparent, I cannot see how to do that though.

Which text editior allows you to configure the background of the file open window? Mine (TextWrangler) opens a standard OSX file browser.

chown33
Jun 12, 2012, 09:38 PM
You didn't say it was pay-to-play, so how would I know?


When I referred to a text editor, I meant an open empty window, whose background color is set to black (TextWrangler can do this). Not that useful, though, because the title bar won't be black.


You haven't said what programming languages you know, so I'm unsure what to recommend there. Some might be easier (like Java). Others might be more difficult.

You haven't said if you have Xcode installed or not, or which version. Knowing your available tools would be useful.

You haven't said which OS version, either, so I don't know whether a simple Java JFrame would work or not. (Java isn't installed by default on Lion.)


Example:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

// To compile: javac BlackBar.java
// To run: java BlackBar

public class BlackBar
{
public static void
main( String[] args )
{
JFrame bar = new JFrame();
bar.setUndecorated( true ); // no titlebar, etc.
bar.setLocation( 10, 600 ); // x, y
bar.setSize( 1000, 100 ); // width, height
bar.setBackground( Color.black );
bar.getRootPane().putClientProperty( "Window.shadow", Boolean.FALSE );
bar.getRootPane().putClientProperty( "apple.awt.draggableWindowBackground", Boolean.TRUE );
bar.setVisible( true );
}
}

Copy and paste into a file "BlackBar.java". Compile and run per comments.
To change initial position or size, edit numbers of setLocation and setSize, recompile, rerun.

The bar is movable by clicking and dragging anywhere in the window.

davidambler
Jun 13, 2012, 03:30 AM
Is geektool an option here? Create a image of the right size and set it to always be on top of windows?

Shadowbadger
Jun 13, 2012, 10:37 AM
You didn't say it was pay-to-play, so how would I know?

Firstly,

Please take this the right way. You need to relax, like a lot.

Yeah so I forgot to mention absolutely everything in the initial post. There were so many possible solutions that I left it quite open. Try being less critical as well, more "which languages do you know" or "which operating system version are you using" and less "you did not tell us" or "you did not say". It is confrontational and needlessly critical.

This will help productive discussion as well as reduce your stress levels. If there are so many things wrong with my post then ignore it, you do not have to read it, or reply.

Perhaps you are not stressed, just unaware of how you come across on the internet . . . Richard.

I did in fact tell you that I was using OSX 10.6 earlier in the thread.

I did not mention which languages I know because I do not view programming that way. For something like this I felt able to implement in any language. What I needed were some pointers into which language, API or app was capable of something like this before I started blindly at the first on the list. I was expecting answers with Cocoa which I am not familiar with but felt confident in learning for a simple thing like this.

I compiled and ran the Java code, thank you for that. It created a black banner but it was not on top of the fullscreen video. I had a look at it though and added setAlwaysOnTop(true) which worked, now I just need to adjust the size of the border. I may make it into a proper little app and have the size adjustable through a config box.

I tried Geektool although as far as I got with it the background is the same kind of transparency as the slideshow, which is the same as stacks, it must be a fixed kind of window in OSX. Good suggestion though it looks like a cool little app, may come in handy at some point.

----------

Oh, and telling me that I need to not do this in the first place.

I see this a lot on forums, somebody asks a question then gets a reply from someone who does not have an answer but thinks the question is wrong. I have come across many a thread like this and I wanted the same answer as the original poster but all that has happened in the thread is he has been talked out of asking the question.

chown33
Jun 13, 2012, 11:48 AM
I compiled and ran the Java code, thank you for that.

You're welcome.

ScoobyMcDoo
Jun 13, 2012, 04:15 PM
Looks to me like NFL network uses flash, not java.