MediaPlayerControl not displaying
Hi there:
I'm using the Telerik.Sitefinity.Modules.Libraries.Web.UI.Videos.MediaPlayerControl in a custom widget. Here's snippets from the code:
Here's the ASCX code:
<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Libraries.Web.UI.Videos" TagPrefix="sf" %>
<div class="heroimage-video">
<sf:MediaPlayerControl ID="VideoPlayer" runat="server"></sf:MediaPlayerControl>
</div>
And the .cs code:
protected override void InitializeControls(GenericContainer container)
if (this.VideoId != Guid.Empty)
var mgr = LibrariesManager.GetManager(LibrariesManager.GetDefaultProviderName());
var video = mgr.GetVideo(VideoId);
System.Diagnostics.Debug.WriteLine(video.Url);
System.Diagnostics.Debug.WriteLine(video.Id.ToString());
MediaPlayerControl videoPlayer = this.VideoPlayer;
videoPlayer.MediaUrl = video.Url;
When I drop the widget on a page with a video selected, no video is displayed when I preview the page. What's going on?
Hi Ryan,
Could you send over the whole control together with the widget designer? We need to make sure that the video id is persisted and properly set when the control is initialized.
You should know that this control would actually become obsolete with the release of Sitefinity 7.0. We will be using the new RadMediaPlayer instead.
Regards,
Bilyana
Telerik