MediaPlayer is not working in Datagrid or Repeater

2 posts, 0 answers
  1. Filiz
    Filiz avatar
    6 posts
    Member since:
    Jul 2011

    Posted 25 Mar Link to this post

    Hi,

    I want to show media list in Repeater, but it's not working.

    I have tried to set file name static,t works out of the Repeater.

     

    This is code is not working;

    <form id="form1" runat="server">
        
      <telerik:RadScriptManager ID="RadScriptManager4" runat="server" EnablePageMethods="true" >
        </telerik:RadScriptManager>
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        </telerik:RadStyleSheetManager>
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7" >
        </telerik:RadSkinManager>
        <asp:Repeater ID="rpDetay" runat="server" OnItemDataBound="FormatearPublicaciones">
        <ItemTemplate>
            <div>   
                   
        <telerik:RadMediaPlayer RenderMode="Lightweight" ID="RadMediaPlayer1" runat="server" Width="700px" BackColor="Black"
                             AutoPlay="false" HDActive="false" Height="394px" HDSource="files/xxx.mp4" Source="files/xxx.mp4">
            </telerik:RadMediaPlayer>
            
        </div>
        </ItemTemplate>
        <SeparatorTemplate>
            <br />
        </SeparatorTemplate>
        </asp:Repeater>

        </form>

     

    Also I see that errors on Chrome Developer Tools;

     

     

     

    RadMediaPlayerScripts.js:1031 Uncaught TypeError: Cannot read property 'get_element' of null

    RadMediaPlayerScripts.js:770 Uncaught TypeError: Cannot read property 'setBytesLoaded' of null

    RadMediaPlayerScripts.js:764 Uncaught TypeError: Cannot read property 'setProgressRailMaxValue' of null

     

    This code is working;

     

    <form id="form1" runat="server">
        
      <telerik:RadScriptManager ID="RadScriptManager4" runat="server" EnablePageMethods="true" >
        </telerik:RadScriptManager>
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        </telerik:RadStyleSheetManager>
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7" >
        </telerik:RadSkinManager>
       
             <telerik:RadMediaPlayer RenderMode="Lightweight" ID="RadMediaPlayer1" runat="server" Width="700px" BackColor="Black"
                             AutoPlay="false" HDActive="false" Height="394px" HDSource="files/xxx.mp4" Source="files/xxx.mp4">
            </telerik:RadMediaPlayer>
            
        </form>

     

     

    Uncaught TypeError: Cannot read property 'get_element' of null     RadMediaPlayerScripts.js:1031 

    Uncaught TypeError: Cannot read property 'setBytesLoaded' of null       RadMediaPlayerScripts.js:770 

    Uncaught TypeError: Cannot read property 'setProgressRailMaxValue' of null        RadMediaPlayerScripts.js:764 

    Uncaught TypeError: Cannot read property 'get_element' of null     RadMediaPlayerScripts.js:1031 

    Uncaught TypeError: Cannot read property 'setBytesLoaded' of null       RadMediaPlayerScripts.js:770 

    Uncaught TypeError: Cannot read property 'setProgressRailMaxValue' of null        RadMediaPlayerScripts.js:764 

  2. Eyup
    Admin
    Eyup avatar
    3014 posts

    Posted 30 Mar Link to this post

    Hi Filiz,

    Please try to change the RenderMode to Classic and see whether this resolves the issue. Also, make sure that you are using the latest major release version of Telerik controls for ASP.NET AJAX.

    Regards,
    Eyup
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top