+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Video Thumbnails

Video Thumbnails

4 posts, 0 answered
  1. AGHoyland
    AGHoyland avatar
    2 posts
    Registered:
    01 Aug 2008
    26 Feb 2010
    Link to this post
    I have a Video library (WMV's) established under the Images and Documents module. I have successfully setup video content controls to dispay a list of my videos and a single video page to display the selected video,

    I would like to have the user click on a thumbnail rather than the name of the video in the video content control but have been unable to find where, either in the video attributes or video content control, a thumbnail might be set.

    How can I display thumbnail images for videos in the video content control?

    Thanks.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Mar 2010
    Link to this post
    Hi Andrew,

    You need to create a custom control that shows thumbnails as well. You can get the content item Image from IContent object Thumbnails property. You can create a custom class that inherits from Telerik.Libraries.WebControls.Video and override SetListMetadata metadata.

    Image image = (Image)e.Item.FindControl("ItemImage");
     
    if (currentItem.Thumbnails.Count > 0)
       {
             image.ImageUrl = currentItem.ThumbnailUrl + "?width=200&height=200&decreaseOnly=true";
        }

    You can hide the Silverlight video player as shown below

    protected override void SetListMetadata(Control itemContainer, IContent contentItem)
    {
        Silverlight player = (Silverlight)base.FindContentViewControl("playerHost", itemContainer);
      if (player != null)
        {
            
          player.Visible = false;
     
        }
     
     }

    In your public template you should have ASP.NET Image control

    <asp:Image ID="ItemImage" runat="server" Width="200" />

    The built-in control has thumbHolder where the items are shown as list, so you can access the holder and modify it if this meets your needs.

    PlaceHolder thumbHolder = (PlaceHolder)base.FindContentViewControl("imageHolder", itemContainer);


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Ahmed Salman
    Ahmed Salman avatar
    31 posts
    Registered:
    13 Apr 2010
    26 Aug 2010
    Link to this post
    can i get the code of this because i need the same issue.

    but i do not know who or were i should do the above code.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    26 Aug 2010
    Link to this post
    Hi Ahmed Salman,

    "You can create a custom class that inherits from Telerik.Libraries.WebControls.Video and override SetListMetadata ."

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered