I use the silverlight mediaplayer on an aspx page. the player should start playing a stream that is beeing set on control init. on IE, this works great but on Chrome the player doesnt auto play the stream and it is starting only after i click on the play button.
This is the code that the silverlight mediaplayer generated on page load:
<script type="text/javascript">
Sys.Application.initialize();
Sys.Application.add_init(function() {
$create(Sys.UI.Silverlight.MediaPlayer,
{
"autoPlay":true,
"me开发者_运维技巧diaSource":"Watch_India.wmv",
"scaleMode":2,
"source":
"player.xaml"
},
{
"currentStateChanged":StateChanged,
"mediaFailed":MediaFailed,
"mediaOpened":MediaOpened,
"pluginFullScreenChanged":Changed,
"pluginResized":Resized
}, null, $get("WatchIndiaMediaPlayer_parent"));
});
</script>
Any help or a direction on what can cause this problem will be very helpful.
Remove the "autoPlay":true
, from your code.
精彩评论