RegisterSchemeHandler() private méthode

private RegisterSchemeHandler ( [ activatableClassId, [ scheme ) : void
activatableClassId [
scheme [
Résultat void
Exemple #1
0
        public PlayLiveFactory(object parameter)
        {
            _liveInfo = parameter as LiveListItem;

            _mediaManage = new MediaExtensionManager();
            _mediaManage.RegisterSchemeHandler("PpboxSource.PpboxSchemeHandler", "ppvod:");
            _mediaManage.RegisterSchemeHandler("PpboxSource.PpboxSchemeHandler", "pplive3:");
        }
        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;
        }
Exemple #3
0
        /// <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;
        }
    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;
        }
    }