Blackberry buffered playback demo? - networking

Can someone help me to buffer a mp3 file on a server using the Blackberry buffered playback demo app provided with the jde?
I have loaded it in the simulator and my mds is started but I'm unable to play the audio.
There is no error but it doesn't play/load.
The code looks all fine.

This may help:
Blackberry Enterprise Server Limitations
By default, the BlackBerry Enterprise Server (BES) limits the response size of a single HTTP response to 128K. If you try to fetch anything bigger your application will receive a 413 (Request Entity Too Large) response code. To get around this you must use the BES management console to change the value of the Maximum number of kilobytes per connection field to a higher value, up to 1024K.
Note that this limit also applies to the MDS simulator, so you'll need to change the simulator's settings as well. Edit the mds\config\rimpublic.property file in your JDE installation directory and change the value of the IPPP.connection.MaxNumberOfKBytesToSend property to match the BES setting and then restart the simulator.
Also check if you using correct ip instead of localhost
In the end you might want to check file in Blackberry browser before open it in app, don't forget to enable streaming in browser settings.

Related

Characterize network camera stream

I am trying to play a network camera stream in an application, but first I need to identify how to access the stream. Unfortunately, the manufacturer seems to prefer that I access the local web page of the camera and use it's built-in viewer, so there's no documentation on how to access the raw stream with another application.
For starters, I opened up the camera's web viewer and captured the connection traffic, trying to identify an address to point a player at. Here's the traffic that caught my attention: (IP edited)
GET http://127.0.0.1/mpeg4 HTTP/1.1\r\n
So I point Chrome (with VLC) at 127.0.0.1/mpeg4 and I get the VLC plugin. The tab is "busy" downloading but it never stops or plays the stream. My thought is that the plugin thinks the stream is a file, so it waits for end of file to play, which never comes.
Then I switched to VLC standalone and pointed it at the same address with the same results. No errors, but there's no buffering indicator or progress.
IE pointed to the address wants to download a file called mpeg4.mpeg from 127.0.0.1, but again it keeps downloading infinitely.
So with that backstory, my question is: How can I detect exactly what this stream is and how to play it with VLC?

How to live stream a desktop to html5 video tag

I have some output from a program I'd like to stream live to a html5 video tag. So far I've used VLC to capture the screen, transcode it to ogg, and stream it using its built-in http server. It works insofar that I see the desktop image in the browser window.
The catch is this: Every time I refresh the page, the video starts from the top, where I'd like to see only the current screen, so that I can use it to build a sort of limited remote desktop solution that allows me to control the ubuntu desktop program from the browser.
I was thinking websockets to send the mouse events to the program, but I'm stuck on how to get the live picture instead of the whole stream.
Thanks in advance!
If you are building server side as well, I would suggest handle that operation yourself.
What you can do, is use mjpeg for html streaming. And you can write server application that will accept http connections and will send header of mjpeg stream and then every update will send picture it self. That way you will have realtime stream in browser.
This option is good due to ability of having control over stream from server side, and for client side it is just tag with mjpeg.
Regarding WebSockets - yes you can build it, but you will have to implement input devices control on remote computer side.
Here is server of streaming MJPEG that might be interesting to you: http://www.codeproject.com/Articles/371955/Motion-JPEG-Streaming-Server

Testing http connections on device

Hallo, developing a bb app I need to make http connections to get files, images etc.
In simulator all works, but not in device.
I bought a BlackBerry but I want to test my app without a sim then without a bes.
How do I need to set my device? and how do I have to compose my url?
I just have a bb device with wifi available
Thanks all :)
Sergio
As answered for this duplicate question...
This was a tough one for me!
As Mark said you have to put some parameters in the url to make it work on the device. You shouldn't do it by hand but use the ConnectionFactory instead.
As you may thing this would just make it work but it doesn't!
The real problem is that not the url has been altered because it has ;interface=wifi;deviceside=true in it (in my case). Depending on the webserver accepting your request this could broke the code.
A solution I tried and that works is try to happend a fake parameter like
&foo=true -> &foo=true;deviceside=true
This will result as a standard parameter for the webserver but your device would use it to driver your connection.
On the simulator this work without this extra code because behind it there is a BIS server for you. On the device (as in my case) there isn't because I'm using a development device unregistered and without SIM (just wifi).
Another point is that the HttpConnection class doesn't handle HTTP 302 Redirect and if you get one you have to handle it manually.
Try appending ";interface=wifi" onto the URL when using a device (instead of ";deviceside=true"). This will force a Wi-Fi connection (assuming the device has Wi-Fi).

when a web application serves a video file, is it stream automatically? what options are there?

when a web application serves a video file, is it stream automatically? what options are there?
Your question is vague. The behavior you get will depend on what Content-Type header your "web application" (or container) gives your file.
Different types will do different things depending the browser.
http://en.wikipedia.org/wiki/Internet_media_type
If you want to check what headers your application is sending, use Firefox + Live HTTP Headers.
By default, video files are sent from IIS to clients in burst mode, at the highest bandwidth that the connection can support.
There is an extension for IIS that provides support for streaming and bit rate throttling:
http://www.iis.net/extensions/BitRateThrottling
It support many media types, but not all of them--although it is extensible.

Blackberry 9000 getting HTTP error 406 When using WiFi

So, I have a Blackberry 9000 application doing simple networking using HttpConnection. Everything works fine normally, when I go to urls of the form:
http://url.com
But I've discovered that I need to test this in wifi only situations (that is, without a BES or equivalent in sight). After some digging, I discovered that I need to add:
;interface=wifi
To all of my URLS, of the form:
http://url.com;interface=wifi
However, I'm noticing that this does not actually work, it gives me back a HTTP error 406. Which according to wiki is a:
406 Not Acceptable
The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.[2]
Am I doing something completely wrong? Does Blackberry wrap wifi only requests in headers that require particularly formatted websites?
As explained on this page, you also need add "deviceside=true" to the URL.
To specify that the underlying TCP
connection should be opened directly
from the handheld, set this parameter
to "true". Specify "deviceside=false"
when receiving or sending data through
the BlackBerry MDS Connection Service.
So your full URL would be:
http://url.com;interface=wifi;deviceside=true

Resources