You are viewing limited content. For full access, please sign in.

Discussion

Discussion

WebLink "MediaDisplay" Reference Error

posted on January 25, 2019 Show version history

Hello,

I've noticed that several pages in WebLink (10.1.0.152) are encountering a JavaScript reference error related to the "MediaDisplay" object.

Typically this doesn't cause any noticeable issues, but sometimes it triggers an error pop-up in IE11 asking to open the debugger.

I see this same error in IE, Edge, and Chrome, and in all of our WebLink instances in both test and production.

The following code seems to be the source of the error

<script type="text/javascript">
<!--

$(document).ready(function() {
    globalMediaDisplay = new MediaDisplay("mediaDisplay","media-header","media-icon","media-name","media-container","video","source","media-share","media-download","media-close","media-url-container","media-url-input");
});// -->
</script>

I did not see this script in the Welcome.aspx file, so I'm guessing it is added when the page loads.

Has anyone else seen this error before?

0 0
replied on February 4, 2019

Hey Jason, thanks for pointing this out!  Are you seeing it on any pages other than Welcome.aspx? 

This appears to be unnecessary/non-functioning code for our embedded media player.  Media streaming is available from the folder browser and the document viewer, not the Welcome page, so there's no loss of functionality.  The code is inserted in place of the control "<weblink:MediaDisplay id="mediaDisplay" runat="server" class="media-display"></weblink:MediaDisplay>".  You can safely comment that out on Welcome.aspx.

1 0
replied on February 11, 2019

Hello,

Commenting out the code did not resolve the error (It seems that even with it commented out the element is still updated).

However, the error did go away after I removed that code from the Welcome.aspx page entirely and it hasn't caused any new issues.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.