开发者

.net Silverlight.MediaPlayer not starting automaticlly in chrome browser

开发者 https://www.devze.com 2023-02-20 07:19 出处:网络
I use the silverlight mediaplayer on an aspx page. the player should start playing a stream that is beeing set on control init.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消