ISmoothStreamingCache's
구현도 IPlugin
인터페이스를 구현해야합니다 사전에
감사합니다. 또한 ExportAdaptiveCacheProvider
속성으로 장식되어야합니다.
그러면 자동으로 SMFPlayer에 연결됩니다.
다음은 클래스의 골격 코드 : 참고로
using System;
using System.Collections.Generic;
using System.IO.IsolatedStorage;
using System.Net;
using Microsoft.SilverlightMediaFramework.Plugins;
using Microsoft.SilverlightMediaFramework.Plugins.Metadata;
using Microsoft.Web.Media.SmoothStreaming;
namespace MyNamespace
{
[ExportAdaptiveCacheProvider(PluginName = "My Smooth Streaming Cache")]
public class MySmoothStreamingCache : ISmoothStreamingCache, IPlugin
{
public MySmoothStreamingCache()
{
// Your implementation
}
#region ISmoothStreamingCache members
public IAsyncResult BeginRetrieve(CacheRequest request, AsyncCallback callback, object state)
{
// Your implementation
}
public CacheResponse EndRetrieve(IAsyncResult ar)
{
// Your implementation
}
public IAsyncResult BeginPersist(CacheRequest request, CacheResponse response, AsyncCallback callback, object state)
{
// Your implementation
}
public bool EndPersist(IAsyncResult ar)
{
// Your implementation
}
public void OpenMedia(Uri manifestUri)
{
// Your implementation
}
public void CloseMedia(Uri manifestUri)
{
// Your implementation
}
#endregion
#region IPlugin members
public bool IsLoaded { get; private set; }
public void Load()
{
IsLoaded = true;
}
public event Action<IPlugin, Microsoft.SilverlightMediaFramework.Plugins.Primitives.LogEntry> LogReady;
public event Action<IPlugin, Exception> PluginLoadFailed;
public event Action<IPlugin> PluginLoaded;
public event Action<IPlugin, Exception> PluginUnloadFailed;
public event Action<IPlugin> PluginUnloaded;
public void Unload()
{
IsLoaded = false;
}
#endregion
}
}
. 빈 생성자가 있는지 확인하십시오. 이걸 알아 내기 위해 플레이어 로그를 확인해야했습니다. –