VideoSampleAccess and AudioSampleAccess are configs provided in FMS and WOWZA servers, which allows flash to access BitmapData retrieved from NetStream to prevent SecurityError #2123.
Are there any standards to implement these two settings on a private server/environment.
Related
I have a ASP.NET solution with both a web project that hosts my angular2 app and a web api project.
Both projects are setup as startup projects and are running on different ports (45365 for the web project and 20234 for the web api project).
Let´s say I have a web api controller that exposes /api/values which is currently accessible via http://localhost:20234/api/values
How can I access this in my angular2 web app? If I try
this.http.get("api/values")
it tries to access http://localhost:45365/api/values which is not desired. However, I want it to call http://localhost:20234/api/values without specifying the whole url including domain to make my service work even when the app is published to a public server with an other domain than localhost.
How do I tell http.get()to use 20234 as port number?
constructor(private location:Location, private locationStrategy:LocationStrategy) {}
someMethod() {
var base = this.locationStrategy.getBaseHref();
// replace port
this.location.prepareExternalUrl(base + 'xxx');
}
You can implement this in a service that forwards to Http so you don't need to repeat it.
(not tested)
I am looking for an alternative to JackRabbit SimpleWebdavServer (but still connected to JackRabbit repo).
We have JackRabbit exposed via SimpleWebdavServer. Users can edit doc/docx files stored in repository. Problem is with versioned (checked in) files - JackRabbit apparently does not support auto-checkout/checkin and I am not able to tell MS Word to do checkout/ckeckin. So I am looking for WebDav server implementation that is able do checkout/checkin automatically.
You could look at Milton. Its a purpose built webdav server framework which allows you to abstract access to any data store such as Jackrabbit. Milton supports Dav level 2 (ie locking) and is compatible with all major clients and operating systems. Milton doesnt provide the UI but there are examples showing how to open documents.
Here is a an example implementation:
#Get
public InputStream getImageFile(Image image) throws IOException {
return MyImageUtils.openInputStream(content);
}
#PutChild
public Image uploadImage(Image image, byte[] bytes, ImagesRoot root) throws IOException {
MyImageUtils.writeByteArrayToFile(image, bytes);
return image;
}
There is a bit more to it, you also need methods to locate resources and provide metadata like uniqueID, modified date, etc.
Here's the hello world controller:
https://github.com/miltonio/milton2/blob/master/examples/tuts-anno1/src/main/java/com/helloworld/HelloWorldController.java
I am in the process of investigating to convert our web application to the web farm. So I started with web garden, by converting the 'Maximum Worker Process = 3'. Following is the simplified version of my problem.
Following is my Static Object class.
public static class MyStaticObject
{
public static string MyProperty {get;set;}
}
Then on Page Load I initialized the Static Objects as follows -
MyStaticObject.MyProperty = "My Static Property";
Then using asp.net ajax [WebMethod] create the ajax method on my web page
[WebMethod()]
public static string getStaticProperty()
{
return MyStaticObject.MyProperty;
}
// Then I call this Ajax method using Javascript and set the return to the text box.
This test is not working as expected. Following are my assumptions and wrong outcome from the test.
I thought when we set virtual directory to be web garden, then each request to the virtual directory is handled by different process in web garden, so my next few request to the server, should return null as I have initialized the static objects for one working process. But even if I click the ajax button for 20 times in row (means 20 requests) even then the static objects return me value.
Am i right in assuming on restarting the IIS should kill all the static objects.
Static objects are not shared in web gardens/web farms.
I am surprised by the behaviour of IIS, static objects and web garden.
Is I am assuming wrong or my way of testing is wrong.
Thanks.
Your assumptions about the way static objects are managed in AppPools / web gardens is correct.
However, your assumption about the way that web requests are distributed is not. HTTP requests are round-robined by the http.sys driver to IIS worker processes only when a new TCP connection is established, not when a new request arrives. Since keepalives are enabled by default, even though you made 20 requests in a row, they probably were all served by the same IIS worker process.
You can have IIS disable keepalives for testing purposes from the HTTP Response Headers section in IIS Manager, under Set Common Headers. That should cause your browser to open a new connection for each request.
To test with keepalives enabled, you can use the Web Capacity Analysis Tool (WCAT), available with the IIS 6 Resource Kit, to generate a multi-threaded load that accesses both IIS processes in your web garden.
Am building a video chat application and i was wondering if there are any native events for the NetStream that fire , that can help in detecting when a remote client starts/stops streaming video over his outgoing stream (NetStream) to which the other client has subscribed over P2P/RTFMP in AS3 ?.
I maybe able to dispatch custom messages since the two clients are already connected, but i don't want to add the extra overhead.
All the event codes for NetStatusEvent can be found here
You just need to have the listener set up and look for "NetStream.Play.Start" and "NetStream.Play.Stop"
e.g.
private function netStatusHandler(event:NetStatusEvent):void
{
// handles net status events
switch (event.info.code)
{
case "NetConnection.Play.Start" :
//do stuff
break;
}
}
In Flex 3, introspecting a web service resulted in a constructor that allowed the location of the web service to change at runtime. It appears that the Web Service introspection tool now only allows the single WSDL URI that was specified in the WS Wizard. It this the case or am I just missing something?
Flex 3 introspected services would create a service class with the following constructor signatures:
private var service:MyWebService;
service= new MyWebService(null, wsdlLocation); // With parameters
or you could use:
service = new MyWebService(); //with no parameters
In Flex 4, it appears that you can only use:
service = new MyWebService();
So if you don't know the web server location until runtime, am I going to need to manually override the instrospected/generated _super_MyWebService.as class in order to get back the ability to point to different servers at runtime?
Anyone know why this has changed, or what the "new" way the Flash Builder 4 web service introspection tool uses for dynamic servers?
I found a solution to this question on the Adobe Forums.
The solution is to set the wsdl property once your service is created:
var service:MyWebService = new MyWebService();
service.wsdl = "location to the wsdl";
It should be noted that using the Flash Builder 4 web service introspection tool will automatically populate the wsdl location in the superclass. According to the post on Adobe Forums, it is necessary to remove the wsdl location in the superclass or the value will not get reset.