Multiple MediaEngines SetSource blocks rendering - ms-media-foundation

I'm using multiple MediaEngines to display multiple videos at the same time. When one video is playing and I change the source on another one it makes the other video stop rendering for about 1 sec.
It seems that MediaEngine its reusing IO threads and its making other videos stall.
Is there a way to load the source in a different threads?

Related

Differences between multiple pages in one browser, and multiple pages in multiple browsers in puppeteer

I’m using puppeteer for scraping content from websites, and I need to open multiple pages. I want to know what are the differences between multiple pages in one browser, and multiple pages in multiple browsers?
You cannot run multiples tabs individualy, even with threads using Selenium.
Opening multiples pages at the same time requires giving one WebDriver entity to EACH of your thread (if you run them in parallel).
This will consume a bit more memory but it's the only workaround if you really need to manage multiple tabs at once.

Is it possible to attach one NetStream to several videoDisplays?

I'm working on simple videochat app with Adobe FMS 4.5. Everything works fine except one thing: I have small videoDisplay for each connected client and one main display. So user can choose his main interlocutor. When i'm trying to attach netStream to main display from small one, streaming on small one stops. Is there way to play one netStream to several displays at the same time?
From what I recall, you can only attach one NetStream object at a time. There is a solution possible, however, I would like for you to rethink about your UX because you have "duplicate information" being shown (a large display, and a small display, with the same data) and you're using more space than needed as well. From a design standpoint, this isn't very logical and I would recommend that you only have one working at a time while "removing" the small one when the large one is active.
However, if you're hard set in your ways, you could simply duplicate the bitmap information over from the large one to the small one (to prevent loss of resolution from doing it the other way around. You'll have to research this part and figure it how it can work with your system, but it's a fairly simple concept: you take a 'screenshot' (the pixels of the current video) and use that data to be displayed somewhere else.

Is there a way to load a webpage in pieces using ASP.NET?

I have a lot of data that I'm calling from my server and want to 'decrease' the load time that it takes to render the page with the data. (I use decrease in quotes because I know it doesn't actually decrease load time it only gives the illusion of decreased load time).
I understand that AJAX is the method here, but how exactly would I implement this sort of behavior in ASP.NET?
One idea is to use Ajax to show a "loading..." animation for areas that are time-intensive, thereby allowing the page to be rendered during the delay.
Another idea is to employ caching where possible to eliminate the database hit.
There's no one answer. There are conventions such as placing synchronous Javascript calls at the bottom of your page (just before </body>). You could also Paginate your data so that you only need to get a few sets at a time, making the calls quicker. You should also compress all images to a reasonable amount so that the quality remains but the bytes transferred over the wire decreases. You should also read Yahoo's guide on best practices.

How to reduce SWF filesize by optimizing the code?

Considering we have already done the following actions:
Flex Framework as RSL
Compiling with debug=false
Loading most images at runtime
Drawing other simple images with flash draw features
Reducing complex images with pngquant
Creating modules for secondary features
Applying ranges to fonts
Running FlexPMD to find dead code and bad copy-paste
Running FlashOptimizer and secureSWF (with poor results)
Today our application is 1358k:
Code: 978k - 72%
Images: 270k - 20%
Fonts: 110k - 8%
We believe we spent a lot of time into asset optimization and most of the work is remaining on the code.
By analyzing our link-report, our guess is that the heavy part of the code is comming from Flex .mxml nested components. We don't think there is much to do on our pure AS classes.
Is there any analysis or coding best practice in order to reduce the impact of the code on the swf filesize ?
Thanks.
Here is the application : http://www.pearltrees.com/nicolas/137698/
In my practice I usually don't have big final swf files, so I want to mention only one thing. Using mxmlc directly we should not forget to add (for the final build of course) parameter/attribute
debug = "false"
in other way final swf will be almost 2 times bigger.
do you have an objects in the .mxml that are similar to each other that you could turn into a generic class and customize programatically?
Consider looking into preloaders and modules.
Without knowing your application, it's hard to be specific, but a custom preloader can sometimes help a lot with perceived download time. Let's face it, asking the user to idly stare at a progress bar is sad, and you can do better.
The usual example here is that your need your application users to login, or select some basic details before jumping into the main application. By implementation that first form as a preloader, your application will keep downloading in the background while your user interacts with that form.
The downside: Your preloader code doesn't have access to all the Flex goodness. You'll have to draw your UI and implement your interaction in plain old AS3. Still, the extra work can be worth it in some situations.
Flex Modules are the other thing that'd be worth looking into. In a complex Flex app, not everything is commonly used. If you cut the lesser-used bits from the main application and move them into a module you load on-demand, you may be able to save a fair amount of bytes from the initial download size.

asp.net threading and gui

Are there any issues with changing elements which will appear on a web page within a thread. I am from a windows programming background and obviously if a thread needs to change the GUI in some way you have to delegate it to the GUI thread.
Basically my page uses 3 sql queries which can be run concurrently to obtain the page data. So I setup 3 threads and have them run, if one fails or has no records it makes an error message visible about it, this is currently done within the thread and seems to work.
Note: The 3 sql queries are for very different data it is definitely fastest to run 3 separate queries and running them at the same time makes it even faster (In terms of how long it takes the page to display).
Edit: The threads are joined in the page load event
You're going to have to join all 3 threads before rendering the page. Once it's rendered out, there's no updating it.
Basically asp.net rendering is about building a large string, which will be the rendered output, which is a html page. (Not counting dynamic image rendering and such.)
So the short answer is no, above any "normal" threading issues.

Resources