Exemple #1
0
 private void UpdatePreviewUrl()
 {
     try
     {
         textBoxPreviewURL.Text = AssetInfo.RW(new Uri(_url), SelectStreamingEndpoint, SelectedFilters, ReturnHttps, ReturnSelectCustomHostName, ReturnStreamingProtocol, ReturnHLSAudioTrackName, ReturnHLSNoAudioOnlyMode).ToString();
     }
     catch
     {
         textBoxPreviewURL.Text = "Error";
     }
 }
Exemple #2
0
        private async Task PlaybackAssetAsync()
        {
            if (checkBoxPreviewStream.Checked && checkBoxTrimming.Checked && _tempStreamingLocator != null)
            {
                Asset myAsset = _selectedAssets.FirstOrDefault();

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

                if (myuri != null)
                {
                    string myurl = await AssetInfo.DoPlayBackWithStreamingEndpointAsync(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;
            }
        }
Exemple #3
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;
            }
        }