I have ubuntu environment. I want to have a screenshare option in my webapplication. I am using red5 for that. I can stream using red5, so thus no problem with installation.
I am using screenshare application from here.
https://code.google.com/p/red5-screenshare/downloads/list
I have followed everything mentioned here
http://devsteps.blogspot.in/2012/02/red5-screenshare.html
I runned it and started screen sharing. But the problem is, its not creating any screen_share.flv file in my streams folder. And, when I access screenviewer.html via
http://localhost:5080/screenshare/screenviewer.html
its giving only blank screen.
What is the problem. Any suggestions?
Edit :
I don't know, whether its true or not. But red5-screenshare application is working with ubuntu-32 bit systems but not with 64-bit.
Now I installed 32-bit os. And, I say, partially this application is running.
But again getting few problems here.
I can able to see my screen but its giving output like this
Its may be because, I am viewing it in my computer (server and viewer is same) so, its coming like this (?).
And I have another problem also, Its not getting accessed in other systems. In other systems, I am only getting a blank screen. No console errors too. Unable to find a way to forward. Can anyone help me here.
To have an flv file created in your streams directory the client application would need to be publishing in "record" mode, it is more than likely that it is publishing "live" instead. If you need it to record, you have to change the publish call in the client source or turn on recording for all streams via the servers red5.properties file.
broadcaststream.auto.record=true
I solved it!
First problem, as I guessed its because I am viewing my own screen so mirror views are generating.
Second problem, Its because of static url declaration. Here is the modification. In screenviewer.html
var tot_url = document.URL; //url: http://192.x.x.x:5080/screenshare/screenviewer.html
var http_removed_url = tot_url.split("//")[1]; //remove http:// from original url
var ip_port = http_removed_url.split(":")[0];//filter only ip and port : 192.x.x.x:5080
var stream = getPageParameter('stream', 'screen_share');
var url = getPageParameter('url', 'rtmp://'+ip_port+'/oflaDemo');
And, it worked for me. A small bug is there, its not working in firefox. I think its different issue now.
Related
I wrote a java program, which manipulates Word documents (docx) with Apache POI. It runs fine within Eclipse, and it runs fine as a runnable JAR on my computer (Windows 10).
I copied that JAR to another computer, and it is starting up normally. The GUI behaves like expected.
The problem is the Word document I write out (docx).
I am performing two types of changes. The first one is the addition of new paragraphs or concatenation of content to the runs. If I stay with this, the document gets written into the file system correctly. The second type is the simple replacement of content within the runs (changes of words and some grammatical changes). I would see that part as the "simpler" one, but if I stay with this or if I combine both change types, no document is written out at all. It does look like there is a bug, but there isn't one because it worked fine on my system.
I wrote myself a function to write out an error log (txt) to get information about that issue. This one worked on both systems. But the log didn't get any information, why the document was not written out.
I suppose there are some Windows security settings which interfer with my program or something like that. The computer that does not like to run my program has Win 7 installed on it, and there are some security domain settings, which affect all other computers in the local network.
Does anyone experienced something similar yet? Any suggestions what to check? Suggestions how to find out if an error happened are appreciated as well.
OK, the problem got solved by simply updating the Java version. I saw that update icon in the system tray, which didn't open update the update dialog. So I wanted to update the Java-version at least.
When I wanted to de-install the current Java version first, I noticed that the Win7-machine hadn't a Java-update for three years now. It was just installed in 2014. As soon as the recent version was installed, everything worked like expected again.
The strange behavior that some parts of my program worked and some not, confused me. I hoped that the Java update would fix this, but I doubted that. I didn't knew that old versions make programs run unpredictably.
This is a repeat of a question I posted last month that I still haven't resolved. I'm trying to use jcifs in an Android app to talk to my Windows computer, but the app aborts without an error message when it tries to connect to the network. I don't see a problem my code nor the network parameters, and after a month of digging the only hints I've found are the two ideas below.
Can someone verify if either of these are true:
1. The Java SMB will not work in Android. If that is true then which do I have and how do I get the Android version?
2. Putting the jcifs.jar in the libs folder will not work with jcifs. If my program compiles correctly then does that mean the jar is ok?
Trying to use SmbFileInputStream
It works with Android, I am using jcifs-1.3.17.jar
Putting it into the libs folder works for me
Make sure, that you are executing your network code not in your GUI thread. Android does not like that and your app will crash on runtime. As a workaround for now you can add the following before doing your network stuff in the GUI thread:
ThreadPolicy tp = ThreadPolicy.LAX;
StrictMode.setThreadPolicy(tp);
But I highly recommend using this only for testing purposes.
I have an application that is having problems with some java old versions, I would like to know if there is a URL (that's not a web page for humans) that I could check and parse to know if there is a new version of java.
I want to do inform the user that there is a new version of java every time a new one is released. My application is done for Windows and Mac so it would be nice if this URL could give me information about different platforms.
Thank you so much.
P.S. Yes, I googled this question and I didn't find anything.
The answer is simple but unsatisfactory: no, there isn't. A work around might be if you embed a JEditorPane (possibly hidden), direct it to http://java.com/en/download/testjava.jsp, parse the content and look for "An old version of Java has been detected on your system." or so.
Update
I monitored the network traffic from testjava.jsp. Turns out it requests this URL http://java.com/applet/JreCurrentVersion2.txt which currently returns 1.7.0_10...which is the latest and greatest, indeed.
Java can tell you what version of java the client machine is running. I don't think the browser can discover this without running an applet. A Web service is running on some remote server; I would find it disturbing if that server could tell you what version of java the local machine is running.
Your application can display an error message if the user has an older version of java. Otherwise JNLP is a greatest out of the box solution. See http://javatester.org/version.html
The code to determine your java version is simple :
System.getProperty("java.version")
Sorry if my title is unspecific, I couldn't think of a better way to word it.
Here's the situation. I've set up one box to stream webcam footage, I'll call it Box A. I'm on my computer and trying to get that footage; I'll call my computer Box B. (I'm using Ubuntu on both computer.) I followed the instructions here pretty much verbatim:
http://hacktivision.com/index.php/2009/06/16/setting-up-an-ubuntu-webcam-server.
I'm using "webcam-server" to set it up. I downloaded Apache2 and am using that to set up the web interface. The webcam on Box A take footage and streams it to "HTTP://localhost/webcam". I'm trying to hit "HTTP://[Box A's internal IP]/webcam". However, when I do, it just gets stuck at the "Connecting..." screen.
I tried hitting the /index of Box A and that worked. I can also hit "[Box A's internal IP]:8888", which gives me snapshots of the webcam on Box A. For some reason though, I'm not receiving the data from the applet (the /webcam).
I've tried to figure out this problem for quite a few hours, with no success. Is there perhaps some kind of permissions that Box B needs to use Box A's applet? Or maybe I need to make the HTML file on Box A public?
Feel free to ask for whatever info you need to try to fix the problem. I apologize if I left out any relevant information.
Okay, here is an idea for a solution.
If you simply copied the applet's HTML file, then this applies (from the instructions you linked):
The java applet in the webcam.html file is, by default, configured to stream at 1 frame per second.
It is also configured by default to use “localhost” as the domain.
As localhost in your box B browser refers to box B, the applet tries to connect to this computer ... and this firstly is not allowed (if the applet is not signed - no idea if it is), and secondly there is no webcam-server running there.
The solution is in the following sentence:
Here’s an example of a webcam.html
file with a maximum FPS of 60 and hosted on hacktivision.com:
Copy this example, and replace hacktivision.com with box A's IP address (or the computer name, if you have an internal DNS or fitting hosts configuration).
(By the way, my Ubuntu 11.04 seems to have no webcam-server package.)
I am working on a demo for a client of what's possible with GWT-Ext for GWT. After browsing for the simplest way to get up and running, I decided on installing the Google Plugin for Eclipse and using the New Web Application Wizard.
First time around, I followed these steps for create the default application:
Selected File > New > Web Application Project from the Eclipse menu.
In the New Web Application Project wizard, entered a name for the project (ExtDemo) and a java package name, com.extdemo.
Unchecked the "Use Google App Engine" check box.
Clicked Finish.
Right clicked it in package explorer and selected Run As > Run Configurations
Put a check in the Automatically Select Unused Port checkbox.
Clicked Run to see the default GWT 1.7 application
This worked fine... it launched GWT's hosted browser and the app worked as supposed to.
(I then continued to import GWT-Ext and add all sorts of widgets building up a nice little demo app)
However at some point when relaunching the app in hosted mode, the hosted browser displays an empty iframe. I even reverted the code to a point where everything was working as supposed to and... same thing, an empty iframe with the surrounding static content.
Now what is really strange is when I go through the process of creating the default application again by following the steps above, the hosted browser launches with an empty iframe again.
However when I click on Compile/Browse, this sometimes allows the app to launch in Firefox.
Anyone have this happen to them?
I have seen some odd behaviors occasionally. Here are some basic suggestions (some are dumb and you might have tried them already):
Use a new workspace
I do not know if GWT plugin somehow caches stuff in the embedded Jetty. If you are re-creating the default app/project, try and use a different name for the project.
Try and re-use a fixed port so that there is no possibility of having multiple servers running.
Update: Found a new "classic" solution:
Delete the cache in IE and possibly Firefox too. Apparently the 'script' tag content tends to be cached by IE. If this works, we can all try tearing our hair out!
Found the updated answer at this link:
I have had the same problem in the past and found it is much more likely to happen if limited CPU is available. For example if my older laptop was running on battery and had stepped down the CPU speed to save power it frequently happened. When running on mains in max performance mode it only happened occasionally. Now I have a much newer and more powerful laptop and the problem has gone away.
Another cause I found was too many breakpoints set up in eclipse and removing breakpoints would often clear the problem.
I've had issues with the browser caching.
Try clearing your browser cache, refresh a few times after a failed load, etc.
You can also try using a different port so the URL is different.
It takes some time to download and run the GWT app, particularly if you are using extra libraries, so wait for a few seconds to see if the app finally loaded.
What makes the app loading to fail randomly is something I don't know yet, but I suspect, as stated by Daniel Vaughan, that is related with a lack of computer resources, CPU, memory, etc.