ActionScript 3.0 :: Stream Video Over Socket Class (or XMLSocket)?
Nov 3, 2009How to stream video over Socket Class (or XMLSocket) IN as3?
View 1 RepliesHow to stream video over Socket Class (or XMLSocket) IN as3?
View 1 RepliesIn what situations should i use Socket class or XMLSocket when trying to connect from Flex to a Java Server that is going to listen to a port?
View 1 RepliesI am trying to adapt an existing flash web chat application for the Android mobile phone and I am having this really annoying issue. The server is a custom based solution and can send back both binary messages or XML. So I can use either XMLSocket class or the Socket class to get data from the server. Everything works fine when deployed and I connect from the desktop but when I try it from the android mobile I get the infamous errors #2031, followed by #2048. Now the crossdomain.xml file is rock solid and works well for desktop. When the connect socket method runs I see that the server replies with the crossdomain file but I get the error when running on the mobile. Has anyone bumped into this? Is there some limitation from the mobile phone part. I wasn't able to find anything relevant for this issue, in terms of the phone not allowing Socket or SMLSocket connections
View 5 RepliesI'm extending XMLSocket to work with a daemon, written in Java, that a peer is using to interface with his PLC controller.What I should be seeing from the daemon is simple digital io info in the form:
Code:
d0i,d0o,
Which represents a 'button' dowm/up. The strings are terminated with commas to make it easier for me to parse them. I've got my XMLSocket working just fine, but I'm receiving the data more like this:
Code:
socketDataHandler:
socketDataHandler: D
socketDataHandler: 4
[code]....
So, there's a null character, followed by individual chars that make up the message I'm expecting, only last "," is truncated. It does come through on the next dataEvent:
Code:
socketDataHandler: ,
socketDataHandler: D;
socketDataHandler: 4;
socketDataHandler: O;
Lastly, I checked raw data in a shell, and it looks like:
Code:
0000000: 0044 0034 0049 002c 0044 0034 004f 002c
0000010: 0044 0034 0049 002c 0044 0034 004f 002c
When dumped to hex. It is my understanding (mostly from a sdocs) that Each XML message is a complete XML document, terminated by a zero (0) byte.I can see that he's sending each CHAR separated by a 00 byte, but they are prepended, not appended like:
Code:
0000000: 44 00 34 00 49 00 2c 00 44 00 34 00 4f 00 2c 00
0000010: 44 00 34 00 49 00 2c 00 44 00 34 00 4f 00 2c 00
or even better:
Code:
0000000: 44 34 49 2c 44 34 4f 2c 00
0000010: 44 34 49 2c 44 34 4f 2c 00
I would like to create a XML object and after this send it via XMLSocket class. The XML must have a special form:
Code: Select all<?xml version="1.0"?><Colour xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Value="red"/>
simple Tutorial showing the use of XMLSocket class with some amount of server code included?
View 1 RepliesThis will create an flv video file on flash media server:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.publish("yourCamera", "record");
ns.attachVideo(Camera.get());
How can I generate an image for the current video frame every 2 seconds?
For fun I'd like to recreate [URL]. Basically i need to be able to stream webcam video from one computer to another using flash.
View 1 RepliesI'm working on a small school project, and I'm grabbing video from my webcam like this:
camera = Camera.getCamera();
if (camera == null) {
Security.showSettings(SecurityPanel.CAMERA);
} else {
camera.setMode(960, 600, 30, true);
camera.setQuality(0, 100);
outgoingVideo = new Video();
[Code] .....
And I would like to now send this video to a server I am connected to using an XMLSocket. Is this possible?
So far the solution I found requires a crossdomain.xml to work,but this is not available on an IP camera:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()">
[code]....
this is my flash as3 code :
var cam:Camera;
cam= Camera.getCamera();
var video:Video=new Video(200,200);
[code].....
I'm writing my first AS3 class and basically I'm trying to take code from an AS3 .fla and incorporate it into the class. I've been getting plenty of errors, but this one seems to be at the crux of the problem:Code:1120: Access of undefined property socket.Here is all the code that is required to cause this error:
PHP Code:
package{ public class ScratchSocket { import flash.events.Event import flash.events.ProgressEventimport
[code]......
I am working on a project involving two actionscript clients and a java server. XML messages are sent from the clients to the server (and vice versa) via the XMLSocket class. The problem I am running into is that when messages are sent too quickly to one of the clients the client seems to lose track of them (it will not respond to them at all). The wierd part is when subsequent messages come in, the client will respond to old messages instead. It's as if the XML messages are getting queued up somewhere, but the signal that prompts the program to deal with them gets lost.
View 4 RepliesI am migrating an application from flex sdk 3.4 to flex sdk 4.5.I am using a telnet example of AS3 tutorials as base to construct a generic socket class that implement a specific protocol.The main problem is that the new application with the validated socket class does not fire any event (no error - no connected - no data - nothing). The try catch with the connect method does not throw any error. I checked if the events were successfully connected, but they are not fired never.Update: I used the suggestions to modidy the code. Actually, now I am receiving an error on the security policy.
This is the constructor:
public function GenericSocket(server:String, port:int, output:TextArea) {
// set class variables to the values passed to the constructor.
[code].....
build a chat application in Flash/Flex and Actionscript using XML Socket class.
View 1 RepliesCould you please explain how to disable this unnecassery, bogus, and semantically invalid behavior of the network communication classes when it receives a 0 valued byte? (specifically the Socket class.)
View 8 RepliesI'm new here, so maybe i'm posting in the wrong channel. Please tell me if it is the case. I'm trying to get a simple client socket class to work with events. I have tried each example found with google with no luck, i just tried the "radio listeners" example from here, which worked fine until i put the broadcaster object within my class.
[Code]...
is possible to connect to a mySQL database directly through the socket class?
View 1 RepliesI am building an AIR application where I receive UDP messages from Max/MSP using the Socket class. When testing in an internal loopback environment ( messages sent from 127.0.0.1 at port 7400 ) I can see the UDP messages being sent, as in: I can receive the messages I'm broadcasting in Max/MSP by listening to port 7400.However, the AIR app throws IO errors when trying to connect ( via the Socket class, using Socket.connect ) to aforementioned IP and port and I for the life of me can't find out why the app has no access to the internal loopback sending UTP ( if for instance, I start a Apache server at the same IP but at different port, the Socket class connects immediately to that IP - it won't receive data of course, but at least it can establish a connection )I am thinking the problem lies outside of the AS app and is an internal networking issue, I'd like to know if someone has experienced a similar error ( I'm on OS X, btw ) as I don't think it's a security sandbox error ( as the event isn't thrown, and the application type is trusted ).
View 1 RepliesWhen I send number (int)52 s.Send(BitConverter.GetBytes((int)872415232));, flash show me trace(socket.readInt()); 872415232 If i send 872415232, flash show 52.Why? And how it fix?
View 1 RepliesIm trying to make a video class so I can put in my src and video dimensions to load up a video .. I am wishing to implement this in the following way
[Code]...
I have a 100mb movie that my friend wants me to stream onto his website to the size of a youTube HD video.
He would prefer the movie to be loaded onto his host than youtube.
What are possible options?
What would you recommend in converting the 100mb to a smaller size whilst still have an acceptable quality like youTube videos. What size are we looking at for a 100mb downgraded for streaming?
I have to stream videos in my php site? how to do that. any body knows any free flash player given sites link.
View 1 RepliesHow can i stream video live by the help of PHP like live tv? I am willing not to use flash media server. If it is must to use it then which server is free and reliable?
View 1 RepliesI'm looking to be able to embed an SWF file that will stream videos from a server
It needs to be an SWF because we are embedding the SWF in the OpenSpace Isometric world in order to display video.
I am trying to stream video from several web cams...
View 2 RepliesPossible to place or insert text on live video stream using the FMS?Whether with any solution or plugin.I am a web radio broadcaster and would like to have information on the screen like the station's phone number instead of having to keep reading it out all the time.
View 2 Replies[code]...
As seen above, I have only one idea how to take an external video file which is not in library.If I put this swf to a domain and put in the same domain this video also, what should be the link like.There is an rtmp protocol and fms server which I have little knowledge.Also , is a url loader or request method available for external video files to play in the swf.
i am new to flex. I have this task. My boss wants an application that will enable his secretary in another room listen and view and probably take minutes of his meeting in the conference room. There is a webcam attached to one of the computers in the conference room.
View 1 RepliesI did a lot of reading and made my own AS3 class for a streaming video player. The class seems to work, i'm getting debug output from the player and hear the sound but the video is not being displayed on the stage. My AS3 code :
ActionScript Code:
//
package net.edje{
import flash.display.*;
[Code].....