Back To: DotNetNuke Silverlight Video

function canvas_loaded(sender, args)
{
    var plugin = sender.getHost();
    plugin.content.onfullScreenChange = onFullScreenChanged;
    sender.findName("media").source = plugin.id;
    sender.findName("media").stop();
}
 
 
function media_stop(sender, args) {
 
    sender.findName("media").stop();
}
 
function media_pause(sender, args) {
    
    sender.findName("media").pause();
}
 
function media_begin(sender, args) {
        
    sender.findName("media").play();
}
 
 
function toggle_fullScreen(sender, args)
{
    var silverlightPlugin = sender.getHost();
    silverlightPlugin.content.fullScreen = !silverlightPlugin.content.fullScreen;  
   
}
 
function onFullScreenChanged(sender, args)
{
 
    var silverlightPlugin = sender.getHost();
    var buttonPanel = sender.findName("buttonPanel");
    
    if (silverlightPlugin.content.fullScreen == true)
    {
      buttonPanel.opacity = 0;
    }
    else 
    {
      buttonPanel.opacity = 1;
    }
    
    var mediaPlayer = sender.findName("media");
    mediaPlayer.width = silverlightPlugin.content.actualWidth;
    mediaPlayer.height = silverlightPlugin.content.actualHeight;
    
}