This is a migrated thread and some comments may be shown as answers.

MediaPlayer is not working in Datagrid or Repeater

1 Answer 94 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Filiz
Top achievements
Rank 1
Filiz asked on 25 Mar 2016, 12:11 PM

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 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 30 Mar 2016, 08:17 AM
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.
Tags
MediaPlayer
Asked by
Filiz
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or