JavaScipt error with Media Player

3 posts, 0 answers
  1. Dean
    Dean avatar
    1 posts
    Member since:
    May 2014

    Posted 13 Jun 2014 Link to this post

    RadMediaPlayer JavaScript error.

    I get the following error when attempting to start (by cliking on the media player) a video. Can anyone help me to resolve this?

    Unhandled exception at line 2779, column 33 in http://localhost:59591/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:fa6755fd-da1a-49d3-9eb4-1e473e780ecd:ea597d4b:b25378d2;Telerik.Web.UI:en-US:ad3df475-29ac-40bb-8405-97ab474c3782:16e4e7cd:f7645509:22a6274a:ed16cbdc:24ee1bba:c128760b:6ec8ee1b:874f8ea2:88144a7a:1e771326:f9b9258:fd9da3ae

    0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'PlayMedia'

    The specific line of javascript that the error is complaining about is c.media.PlayMedia();

    01.<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default"  %>
    02. 
    03.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    04. 
    06.<head runat="server">
    07.    <title></title>
    08.    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    09.    <meta name="viewport" content="width=device-width" />
    10.    <style type="text/css">
    11.         @media (min-width: 768px) {
    12.            .MediaPlayer {
    13.                height: 200px;
    14.            }
    15.        }
    16. 
    17.        /* Medium devices (desktops, 992px and up) */
    18.        @media (min-width: @992px) {
    19.            .MediaPlayer {
    20.                height: 400px;
    21.            }
    22.        }
    23. 
    24.        /* Large devices (large desktops, 1200px and up) */
    25.        @media (min-width: 1200px) {
    26.            .MediaPlayer {
    27.                height: 800px;
    28.            }
    29.        }
    30. 
    31.        
    32.    </style>
    33.</head>
    34.<body>
    35.    <form id="form1" runat="server">
    36.        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    37.            <Scripts>
    38.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
    39.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
    40.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
    41.            </Scripts>
    42.        </telerik:RadScriptManager>
    43.        <script type="text/javascript">
    44.         
    45.        </script>
    46.        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    47.        </telerik:RadAjaxManager>
    48.        <div>
    49.            <telerik:RadMediaPlayer
    50.                runat="server"
    51.                RenderMode="Lightweight"
    52.                CssClass="MediaPlayer"
    53.                ID="player"
    54.                Title="Demo of Rad Media Player"
    55.                AutoPlay="True"
    56.                Source="~/App_Data/Video/Helicopter_DivXHT_ASP.divx"
    57.                HDActive="True">
    58.                <TitleBar>
    59.                    <ShareButton Visible="False"></ShareButton>
    60.                </TitleBar>                        
    61.            </telerik:RadMediaPlayer>
    62.        </div>
    63.    </form>
    64.</body>
    65.</html>
  2. Eyup
    Admin
    Eyup avatar
    3015 posts

    Posted 18 Jun 2014 Link to this post

    Hi Dean,

    Can you please remove RadCompression from the web.config of your application and let me know about the result?
    http://www.telerik.com/help/aspnet-ajax/compression.html

    Looking forward to your reply.

    Regards,
    Eyup
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Jun 2014 Link to this post

    Hi Dean,

    The most probable reason for this issue is that please make sure all required Javascript files are registered on the page and there is only one jQuery instance.

    Thanks
    Shinu
Back to Top