The limit of MediaElement Count in a Silverlight Page is 123.
Last post 03-15-2008 1:56 PM by Gilbert Lee Kor. 0 replies.
Sort Posts:
03-15-2008 1:56 PM
The limit of MediaElement Count in a Silverlight Page is 123.

I found this problem developing a game like 'rythm it' (a kind of BMS).
In the game, since over 270 audio sources are used,
I would like to create MediaElements for audio resources in advance.

But when I implement and run my game, I found that some media files isn't played.

So, I try to test it in this way and that way.
At last, I realized that from 124th MediaElement, play() method doesn't work.

Simulation

This is the simulation which you can test it yourself.
Let's turn up the volume!




Source

You can download the source files by clicking the link follow.


Conclusion of the experiment

You should create less than 124 MediaElements with Silverlight 2 Beta1.
If you must use more than 123 Media Sources, you need recycle the MediaElements
those were already created.

For example, In case that a silverlight page has more than 123 MediaElements,
some will not work.

By another test, I found the additional facts below

1) Though you add entity type (<MediaElement ...>) in XAML file, result is the same.
2) When every MediaElement is binded with unique media source, result is the same.

What is the cause?
Will it be fixed when the next version of Silverlight is released?

Gilbok Lee
Microsoft MVP
http://gilverlight.net
gilbok@live.com

Gilbert Lee Kor

Loading...
Joined on 11-20-2007
Seoul, Korea
Posts 6
Page view counter