MediaPlayer - Subtitles

0:00 / 0:00

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

This demo demonstrates how to load subtitles in RadMediaPlayer.

In order to show subtitles in the video the Subtitles property should be set to point to valid file that contain the subtitle script.

  • DefaultCS.aspx
  • demoSubtitles.srt
<%@ Page Language="c#" AutoEventWireup="true"  %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <style type="text/css">
        .size-custom {
            width: 640px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-custom">
        <telerik:RadMediaPlayer RenderMode="Lightweight" runat="server" ID="RadMediaPlayer1" AutoPlay="true"
            Height="360px" Width="640px"
            Source="https://www.youtube.com/watch?v=P0ZZ9T_c7lU"
            Subtitles="demoSubtitles.srt">
        </telerik:RadMediaPlayer>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?