Rad Editor Media Manager Problem

2 posts, 0 answers
  1. dotnetrockerzzz
    dotnetrockerzzz avatar
    32 posts
    Member since:
    Aug 2010

    Posted 25 Mar 2011 Link to this post

    Currently , In my Media manager when someone posts the video the video automatically starts by default  that is when the page loads .  The User who is entering the video has to enter at that time weather it starts automatically or not . What I want is somehow by default the video is not started @ page load.. I hope u r getting my problem ..
  2. Rumen
    Rumen avatar
    12782 posts

    Posted 29 Mar 2011 Link to this post

    Hello Vaibhav,

    You can disable the automatic media playing by adding the <param name='autostart' value='0' /> tag to the inserted media object tag. You can do that by attaching to the OnClientPasteHtml event of RadEditor and modifying the inserted via the Media Manager content:

    Copy Code
    <telerik:RadEditor ID="RadEditor1" runat="server" OnClientPasteHtml="OnClientPasteHtml">
    <MediaManager ViewPaths="~/" UploadPaths="~/" />
    <script type="text/javascript">
    function OnClientPasteHtml(sender, args)
    var commandName = args.get_commandName();
    var value = args.get_value();
    if (commandName == "MediaManager")
    //See if an img has an alt tag set
    var div = document.createElement("DIV");
    //Do not use div.innerHTML as in IE this would cause the image's src or the link's href to be converted to absolute path.
    //This is a severe IE quirk.
    var mediaString = div.innerHTML;
    mediaString = mediaString.replace("<embed", "<rade_param name='autostart' value='0' /><embed");
    //Set new content to be pasted into the editor

    Best wishes,
    the Telerik team
  3. DevCraft R3 2016 release webinar banner
Back to Top