Media Server :: Call Methods Form Server To Client?
Apr 28, 2010
I m working in flex3.0 and i just want to know that how can i call a function from fms server to my AS3.0 (Client Side) code.i tried the syntax client.call(methodname,null,null); but my flex code throw exception unable to call the method.here can i use clientobject.call (methodname,null,null) and is there some special way to declare that method at client side.
- Flash Media Server 3.5 (using ActionScript 3 for server-side code)
- Flex application (built in Flex Builder 3, using ActionScript 3)
Now, I'm trying to get the server-side ASC code to call something from a connected client. It doesn't seem to work (thought everything else works beautifully). I've tried stuff like the following in the server side:
- In the application.onConnect function, I've tried this:
... currentClient.requestChat = function (reqID, destID){ trace("Requesting chat..."); currentClient.call("requestWaiting", new reqHandler(), reqID, destID);}; ...
(Where reqHandler is just some handler that I know gets called).
- I've also tried the following code outside the onConnect function:
Client.prototype.requestChat = function (reqID, destID){ trace("Requesting chat..."); this.call("requestWaiting", new reqHandler(), reqID, destID);}
Both seem to fire appropriately (when triggered from another client). However, the "requestWaiting" method call to the clients doesn't seem to work at all. I've tried some AS 2 examples on the client side, like:
nc = new NetConnection(); nc.client = new Object(); // function for handling queueing of requests for this station nc.client.requestWaiting = function (reqID:String, destID:String):void { trace("HELLO"); // check to make sure this is the right location, and if so, queue it if (destID == "WhateverTheIDIs") { chatQueue.push(reqID); btnChatWaiting.visible = true; } // if }
...but that doesn't seem to fire at all. I know the Flex has "sealed" the NetConnection class itself, so I can't just "extend" it as I do the "client" property.I've als tried some more AS 3-oriented stuff, like trying to make the "client" property reference a separate class that handles callbacks, but that doesn't work easily for me as I need access to properties in the class that contains the NetConnection.
How to call a particular client from fms.Actually i m making a private chat application in which text messg send from one client to another specific client through FMS.So i m confused how gms recognize a particular clients.I am avoiding application .client[] array that contains all the connected users references.becoz it changes at the time of connection and disconnection of client from fms.
Below is the code. When the swf is connected to FMS(the connection is successful) I use this application.user_so.send("enterContestGroup"); to call the client side mothed. You can see that in the client side I have defined the "enterContestGroup" mothed. However the fact is it doesn't call that mothed. Can anybody tell me what the error is
i want to write responder in fms 3.5 here is my code but is not working
clientCount = function(AppClient) { AppClient.call("fmsping",myResponderSuccess); // fmsping is the function at client side which returns true boolean variable
i need a wey without knowing the index value of spacific client in the application clients array to identify this user for use: application.clients[this client id].call to him only. in addobe halp its says: "Do not use the index value of the clients array to identify users between calls, because the array is compacted when users disconnect and the slots are reused by other Client objects" but it do not say what to use??... i try this 4 ways none working - last 2 throw error:
i have a small LAN of about 8 computers all of which are running windows 7. I have installed FMS and XAMPP webserver on one of the machines. I want to stream live from one PC to all the other PCs on the LAN. I have a webpage with jwplayer embedded in it on my XAMPP webserver that is able to see the live stream when i start it locally. I mean the live stream works fine on the machine with the servers on it. But when i want to view the live stream from another machine in the LAN by accessing the webpage that has the jwpalyer from another machine, The jwplayer returns "server not found:rtmp://192.168.10.1/live" error. I was thinking that maybe a firewall is blocking the 1935 port but i have turned off the firewall of every PC on the LAN. I have unistalled any antivirus program on all the PCs. But i still get the same error when i try to access the live stream from another PC on the LAN.When i run netstat -a -n|find ":1935" i get 192.168.10.2:49184 192.168.10.1:1935 SYN_SENT and i think the request for the stream is sent but the conection is rejected.
This is the code for the webpage with jwplayer embedded in it. maybe it: <html>head> <title>JW FLV Media Player</title> <script type="text/JavaScript" src="swfobject.js"></script>
i am new on steaming & flash server; when we try to use RTMP over HTTP the outside client gets the internal IP address of the FMS server instead of the NAT one or public IP address, how can we solve this.
I have created a script for an Adobe FMS application to broadcast a playlist of video files as a live stream. (internet tv)
I am now working on a custom Flash-based video player to play my stream.
How do I send information from my server-side FMS application (main.asc) to the client-side video player? (e.g: title, duration of current video player)
I understand how clients use bandwidth detection etc to dynamically switch streams via client calls with ns.play2( ... ), but I was wondering if it's possible to only ever use 1 initial ns.play( ... ) call on the client side, but let FMS server side logic that I write dictate which client sees what content. For example, I have 3 clients connected to my FMS server, all watching a live stream. I then decide I want clientA to see 'recordedMovieA.flv', clientB to continue seeing the live stream, and clientC to watch 'recordedMovieB.flv'.
i am currently playing around with a flash media server trial in combination with the flowplayer.All in all i am testing the performance and general functionality for the company i work for.Anyways, i am trying to search a way to check the bandwidth of a client ( server sided ) and redirecting him to the right video stream.Sure this could be done by the backend flash application, but its out intention to perform this check server sided.
No I have installed fms4.5, but I can't find good docs how to set something like this up. In Learning section I saw a lesson, but this one isn't ready.So I want to publish using flash and the subscribers to the livestream can be iPhones or Browsers.
I am trying to make clients to connect FMS4 server over RTMFP for my video conferencing application.It is basically a client-server media relay application in which clients with webcam/mic connect the server and the server relays video/audio data to other clients. This application is working perfectly with FMS 3.0 but it was RTMP rather than RTMFP - I simply replaced 'RTMP' with 'RTMFP' in netConnetion and tried to test in Flash Media Development Server 4.0, but it is failed to make a connection from a client - it was working after replacing it back with 'RTMP' of course.
I believe server-client media relay is possibe using RTMFP in FMS4 because Adobe said:"Although RTMFP is often used for peer-assisted networking applications, you can use RTMFP in unicast, broadcast, and multi-point publishing applications as well. Simply replace the RTMP protocol in the NetConnection.connect() call with the RTMFP protocol:" in url...
I am trying to create a flash player to stream an on online Internet radio station using FMS. I chose FMS after being told that I need RTMP server to extract the metadata. Our radio audio is being encoded using a DJ interface called SAM Broadcaster. But for some reason, it does not have an option to send over the stream directly to a Flash Media Server. Only options are either IceCAST or ShoutCAST. How should i setup the stream? Should it be Stream encoder>> IceCAST/SHOUTCast Server>>Flash Media Server>>Flash Player Client. Or should I setup Stream Encoder>>Flash Media Server>>Flash Player Client? Shouldn't Flash Media Server be an alternative to IceCast or Shoutcast? If that is the case, how do I send over the stream from SAM Broadcaster directly to Flash Media Server without restreaming through another streaming server?
how can I find on fms server that client disconnected if if client disconnected due to power cut off. I client manually close the application then onDisconnect on server is called but if due to power cut off it does not called.
Somebody I know can't watch because they have a proxy server.The nc.connect() call to get the live stream fails because it goes direct from AS3 to FMS and doesn't go through the proxy server.
I have a question... Can I use the same server side function to send to all lients 3 different swfURL depending on which button pressed from one of them? If the answer is positive...how can I do it?
I am using the FMS Connector C++ to do some publishing work. And I am required to call a server side method. I have tried to use the INetConnection::call() method, but it don't seems successful.
The FMS server spec told me to do,
1.call server method, nc.call("FCPublish" null, streamname);
2. implement a callback function onFCPublsih nc.onFCPublish = function (info ) {...}
How can I implement these with FMS Connector C++?
The FMS Connector document include too few topic on calling server side method.
We're writing a flash application that can download a MP3 file, convert it to a Sound object, get the raw data and make some processing (like adding sounds, change octaves). After the processing, we want to send the data back to the server in chunks, so the server will be able to glue the data together and recover the new generated file. The problem is: if we send to the server "wav" pieces of sound, we are able to glue them together without any problem in the generated file. However, if we convert each wav piece to a mp3 file (so we can send a smaller file to the server) and join the mp3 files at the server, the result is a sound with some problems at the merge point.
This is how we load the mp3 file from the server:
sourceSnd.load(new URLRequest("sample url to mp3")); sourceSnd.addEventListener(Event.COMPLETE, carregou);
This is how we convert each piece of mp3 to bytearray and wav:
Is it possible to call a client method from server using AMFPHP? For example if there is a Flash chat app with PHP backend. Everytime a new chat is logged from one of the clients, server would call update in all of the clients?
I have a client that I am going live with so I am transferring their website from my web server to their web server. Using Zend AMF, I am calling a database that reads perfectly when I point to it from my server but it doesn't work when I call the database from the client's server. In both instances, I am pointing to the same absolute path to my boot strap (on my web server). I don't understand what the difference would be.
I have a question regarding FMS 3.5 and live streaming with failover protection. Currently, we are running a single server with FMS 3.5 for our VOD and live streaming events and its been working great. Recently during our last live video stream the server decided to die and naturally the live stream was lost. To prevent such a future scenario from happening, and given that I am on limited budget what would be a best method of prevention. I saw there is limited documentation on setting up origin to edge, or two origin servers (more likely for us since we can maybe purchase one more server at this time) but I do not have access to make network/router changes etc. I do have full access to configure my Windows 2003 servers however.
1. The basic problem I would like to solve is detecting when a connection to the Flash Media Server fails.Our client-side application establishes a persistent NetConnection and publishes a number of video/audio streams to the FMS.After publishing some videos, some clients find that recording no longer works. I need to add code to let them know that there's a connection problem. I've studied the NetConnection class and can't find an built-in method that can help alert the user if the connection is broken.
2. Also, I'm having trouble tracking these events in the FMS logs. Are there any key statements I should look for that would tell me if the FMS has experienced a sudden loss of connectivity with a client?I was thinking of using the onAppShutdown (?) event to detect when an application closes normally, so I can then get an idea of when it's closed down in other circumstances.
I found some stuff in an old FMS book (great book on FMS but very old) on how to subscribing to the Log streams. The does a netConnect & NetStream and used a nc,onLog to get play back but onLog does not seem to be supported anymore. how I can playback logs from FMS 3.x into CS3 client?
i know the way to capture the mic's sound,My idea is to make an application to record songs palyed by other app,like Windows Media Player,Yes, Just capture from the soundcard,