Inheritance: IMediaExtensionManager
コード例 #1
0
        private void InitializeSmoothStreaming()
        {
            extensions = new MediaExtensionManager();
            propertySet = new Windows.Foundation.Collections.PropertySet();

            // Gets the default instance of AdaptiveSourceManager which manages Smooth 
            //Streaming media sources.            
            //
            adaptiveSourceManager = AdaptiveSourceManager.GetDefault();

            // Sets property key value to AdaptiveSourceManager default instance.
            // {A5CE1DE8-1D00-427B-ACEF-FB9A3C93DE2D}" must be hardcoded.
            propertySet["{A5CE1DE8-1D00-427B-ACEF-FB9A3C93DE2D}"] = adaptiveSourceManager;

            // Registers Smooth Streaming byte-stream handler for “.ism” extension and, 
            // "text/xml" and "application/vnd.ms-ss" mime-types and pass the propertyset. 
            // http://*.ism/manifest URI resources will be resolved by Byte-stream handler.
            extensions.RegisterByteStreamHandler("Microsoft.Media.AdaptiveStreaming.SmoothByteStreamHandler", ".ism", "text/xml",
                propertySet);
            extensions.RegisterByteStreamHandler("Microsoft.Media.AdaptiveStreaming.SmoothByteStreamHandler", ".ism",
                "application/vnd.ms-ss", propertySet);
            extensions.RegisterSchemeHandler("Microsoft.Media.AdaptiveStreaming.SmoothSchemeHandler", "ms-sstr:", propertySet);

            //var vm = (IPlayFreeVideoViewModel)DataContext;

            //vm.AdaptiveSourceManager = adaptiveSourceManager;
            //vm.MediaElement = this.MediaElement;
        }
コード例 #2
0
 private void _initialiseMediaExtensionManager()
 {
     var plugins = new MediaExtensionManager();
     plugins.RegisterByteStreamHandler("Microsoft.Media.AdaptiveStreaming.SmoothByteStreamHandler", ".ism", "text/xml");
     plugins.RegisterByteStreamHandler("Microsoft.Media.AdaptiveStreaming.SmoothByteStreamHandler", ".ism", "application/vnd.ms-sstr+xml");
     plugins.RegisterByteStreamHandler("Windows.Media.Protection.PlayReady.PlayReadyByteStreamHandler", ".pyv", "");
     plugins.RegisterByteStreamHandler("Windows.Media.Protection.PlayReady.PlayReadyByteStreamHandler", ".pya", "");
 }
コード例 #3
0
ファイル: PlayLiveFactory.cs プロジェクト: uvbs/MyProjects
        public PlayLiveFactory(object parameter)
        {
            _liveInfo = parameter as LiveListItem;

            _mediaManage = new MediaExtensionManager();
            _mediaManage.RegisterSchemeHandler("PpboxSource.PpboxSchemeHandler", "ppvod:");
            _mediaManage.RegisterSchemeHandler("PpboxSource.PpboxSchemeHandler", "pplive3:");
        }
コード例 #4
0
ファイル: App.xaml.cs プロジェクト: Eggies/SDK
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        public App()
        {
            this.InitializeComponent();
            MediaExtensionManager m = new MediaExtensionManager();
            m.RegisterSchemeHandler("ARDrone2Video.ARDroneSchemeHandler", "ardrone:");

            this.Suspending += OnSuspending;
        }
コード例 #5
0
        /// <summary>Initializes the media extension manager so we can handle PlayReady protected content.</summary>
        private void InitializeMediaExtensionManager()
        {
            var plugins = new MediaExtensionManager();

            // Add support for IIS Smooth Streaming Manifests
            plugins.RegisterByteStreamHandler("Microsoft.Media.AdaptiveStreaming.SmoothByteStreamHandler", ".ism", "text/xml");
            plugins.RegisterByteStreamHandler("Microsoft.Media.AdaptiveStreaming.SmoothByteStreamHandler", ".ism", "application/vnd.ms-sstr+xml");

            // Add support for PlayReady video and audio files
            plugins.RegisterByteStreamHandler("Microsoft.Media.Protection.PlayReady.PlayReadyByteStreamHandler", ".pyv", "");
            plugins.RegisterByteStreamHandler("Microsoft.Media.Protection.PlayReady.PlayReadyByteStreamHandler", ".pya", "");
        }
コード例 #6
0
    private void Button_OnClick(Text label)
    {
        if (label == null)
        {
            return;
        }
#if UNITY_WSA && ENABLE_WINMD_SUPPORT
        if (mediaExtensionMgr == null)
        {
            mediaExtensionMgr = new Windows.Media.MediaExtensionManager();
            mediaExtensionMgr.RegisterSchemeHandler("Microsoft.Samples.SimpleCommunication.StspSchemeHandler", "stsp:");
        }
#endif

        switch (label.text)
        {
        case "Play":
            var selectedItem = mediaList.options[mediaList.value].text;
            this.mediaPlayback.Play(selectedItem);

            break;

        case "Pause":
            this.mediaPlayback.Pause();
            break;

        case "Stop":
            this.mediaPlayback.Stop();
            break;

        case "Go 360 3D":
            UnityEngine.SceneManagement.SceneManager.LoadSceneAsync(1);
            break;

        default:
            Debug.LogWarningFormat("Button '{0}' not handled.", label.text);
            break;
        }
    }
コード例 #7
0
 private void _initialiseMediaExtensionManager()
 { 
     var plugins = new MediaExtensionManager();  
     plugins.RegisterByteStreamHandler("Microsoft.Media.Protection.PlayReady.PlayReadyByteStreamHandler", ".pyv", ""); 
     plugins.RegisterByteStreamHandler("Microsoft.Media.Protection.PlayReady.PlayReadyByteStreamHandler", ".pya", ""); 
 }