Пример #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;
            }
        }
 private void tabPage4_Enter(object sender, EventArgs e)
 {
     if (MyChannel.State == ChannelState.Running && MyChannel.Preview != null && MyChannel.Preview.Endpoints.FirstOrDefault().Url.AbsoluteUri != null)
     {
         string myurl = AssetInfo.DoPlayBackWithStreamingEndpoint(typeplayer: PlayerType.AzureMediaPlayerFrame, Urlstr: MyChannel.Preview.Endpoints.FirstOrDefault().Url.ToString(), DoNotRewriteURL: true, context: MyContext, formatamp: AzureMediaPlayerFormats.Smooth, technology: AzureMediaPlayerTechnologies.Silverlight, launchbrowser: false, mainForm: MyMainForm);
         webBrowserPreview.Url = new Uri(myurl.Replace("https://", "http://"));
     }
 }
Пример #3
0
 private void checkBoxPreview_CheckedChanged(object sender, EventArgs e)
 {
     if (checkBoxPreviewStream.Checked)
     {
         if (MyChannel.State == ChannelState.Running && MyChannel.Preview.Endpoints.FirstOrDefault().Url.AbsoluteUri != null)
         {
             string myurl = AssetInfo.DoPlayBackWithStreamingEndpoint(typeplayer: PlayerType.AzureMediaPlayerFrame, Urlstr: MyChannel.Preview.Endpoints.FirstOrDefault().Url.ToString(), DoNotRewriteURL: true, context: MyContext, formatamp: AzureMediaPlayerFormats.Smooth, technology: AzureMediaPlayerTechnologies.Silverlight, launchbrowser: false, mainForm: MyMainForm);
             webBrowserPreview2.Url = new Uri(myurl);
         }
     }
     else
     {
         webBrowserPreview2.Url = null;
     }
 }
Пример #4
0
        private void tabPage4_Enter(object sender, EventArgs e)
        {
            if (MyLiveEvent.ResourceState == LiveEventResourceState.Running && MyLiveEvent.Preview != null && MyLiveEvent.Preview.Endpoints.FirstOrDefault().Url != null)
            {
                string myurl = AssetInfo.DoPlayBackWithStreamingEndpoint(
                    typeplayer: PlayerType.AzureMediaPlayerFrame,
                    path: MyLiveEvent.Preview.Endpoints.FirstOrDefault().Url,
                    DoNotRewriteURL: true,
                    client: _client,
                    formatamp: AzureMediaPlayerFormats.Auto,
                    UISelectSEFiltersAndProtocols: false,
                    mainForm: MyMainForm,
                    //selectedBrowser: Constants.BrowserIE[1],
                    launchbrowser: false
                    );

                webBrowserPreview.Url = new Uri(myurl.Replace("https://", "http://"));
            }
        }
Пример #5
0
        private void PlaybackAsset()
        {
            if (checkBoxPreviewStream.Checked && checkBoxTrimming.Checked && _tempStreamingLocator != null)
            {
                Asset myAsset = _selectedAssets.FirstOrDefault();

                Uri myuri = AssetInfo.GetValidOnDemandURI(myAsset, _amsClientV3, _tempStreamingLocator.Name);

                if (myuri != null)
                {
                    string myurl = AssetInfo.DoPlayBackWithStreamingEndpoint(typeplayer: PlayerType.AzureMediaPlayerFrame, path: AssetInfo.RW(myuri, https: true).ToString(), DoNotRewriteURL: true, client: _amsClientV3, formatamp: AzureMediaPlayerFormats.Auto, technology: AzureMediaPlayerTechnologies.Auto, launchbrowser: false, UISelectSEFiltersAndProtocols: false, mainForm: _mainform);
                    webBrowserPreview.Url = new Uri(myurl);
                }
                else
                {
                    webBrowserPreview.Url = null;
                }
            }
            else
            {
                webBrowserPreview.Url = null;
            }
        }