예제 #1
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;
            }
        }
예제 #2
0
 private void tabPage4_Enter(object sender, EventArgs e)
 {
     if (MyChannel.State == ChannelState.Running && MyChannel.Preview.Endpoints.FirstOrDefault().Url.AbsoluteUri != null)
     {
         string myurl = AssetInfo.DoPlayBackWithBestStreamingEndpoint(typeplayer: PlayerType.AzureMediaPlayerFrame, Urlstr: MyChannel.Preview.Endpoints.FirstOrDefault().Url.ToString(), DoNotRewriteURL: true, context: MyContext, formatamp: AzureMediaPlayerFormats.Smooth, technology: AzureMediaPlayerTechnologies.Silverlight, launchbrowser: false);
         webBrowserPreview.Url = new Uri(myurl);
     }
 }