コード例 #1
0
        private void PlaybackAsset()
        {
            if (checkBoxPreviewStream.Checked && checkBoxTrimming.Checked)
            {
                IAsset myAsset = _selectedAssets.FirstOrDefault();

                Uri myuri = AssetInfo.GetValidOnDemandURI(myAsset);

                if (myuri == null)
                {
                    try
                    {
                        _tempLocator = null;
                        _tempLocator = AssetInfo.CreatedTemporaryOnDemandLocator(myAsset);
                        myuri        = AssetInfo.GetValidOnDemandURI(myAsset);
                    }
                    catch
                    {
                    }
                }
                if (myuri != null)
                {
                    string myurl = AssetInfo.DoPlayBackWithStreamingEndpoint(typeplayer: PlayerType.AzureMediaPlayerFrame, Urlstr: AssetInfo.RW(myuri, https: true).ToString(), DoNotRewriteURL: true, context: _context, formatamp: AzureMediaPlayerFormats.Auto, technology: AzureMediaPlayerTechnologies.Auto, launchbrowser: false, UISelectSEFiltersAndProtocols: false, mainForm: _mainform);
                    webBrowserPreview.Url = new Uri(myurl);
                }
            }
            else
            {
                webBrowserPreview.Url = null;
            }
        }
コード例 #2
0
        private void PlaybackAsset()
        {
            if (checkBoxPreviewStream.Checked && checkBoxTrimming.Checked)
            {
                IAsset myAsset = _selectedAssets.FirstOrDefault();

                Uri myuri = AssetInfo.GetValidOnDemandURI(myAsset);
                if (myuri == null)
                {
                    _tempLocator = AssetInfo.CreatedTemporaryOnDemandLocator(myAsset);
                    myuri        = AssetInfo.GetValidOnDemandURI(myAsset);
                }
                if (myuri != null)
                {
                    string myurl = AssetInfo.DoPlayBackWithBestStreamingEndpoint(typeplayer: PlayerType.AzureMediaPlayerFrame, Urlstr: myuri.ToString(), DoNotRewriteURL: true, context: _context, formatamp: AzureMediaPlayerFormats.Auto, technology: AzureMediaPlayerTechnologies.Auto, launchbrowser: false);
                    // string myurl = "http://nab2015-dev.azurewebsites.net/#/channels/LiveChannelStreamDemo/program-schedule/112485dc-2d26-422b-99e9-56240f6d70da
                    // webBrowserPreview2.Url = new Uri(myurl);

                    //string myurl = "http://whatsmyuseragent.com/";
                    //string myurl = "http://*****:*****@"C:\Users\xpouyat\Documents\visual studio 2013\Projects\dynamic_registerEvents.htm");
                }
            }
            else
            {
                webBrowserPreview2.Url = null;
            }
        }