none
Playing .wav files stored in blob storage using Flash Player

    Question

  • I'm trying to get the Flash player to play .wav files uploaded to blob storage.  I set the content type of the file to "audio/wav", but that didn't work.  Next I tried uploading a separate "text/xml" blob called "crossdomain.xml" with the following contents, but that did not work either.

    <?xml version="1.0" encoding="UTF-8"?>
    <cross-domain-policy>allow-access-from domain="*" /></cross-domain-policy>
    

    I'm getting "Security error while playing: 2048".  If I simply access the blob using the URL, Windows Media player has no problems.

    Any assistance would be greatly appreciated.

    David

    Monday, July 13, 2015 9:31 PM

Answers

  • After a bit more research, it works if you create a crossdomain.xml blob in the "$root" container.  See the code below (http://bartwullems.blogspot.com/2011/03/cross-domain-handling-on-azure-blob.html):

            /// <summary>
            /// CreateCrossDomainXml
            /// </summary>
            /// <param name="storageAccount">Cloud storage account object</param>
            static public void CreateCrossDomainXml(CloudStorageAccount storageAccount)
            {
                bool returnValue = false;
                CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
                CloudBlobContainer container = blobClient.GetContainerReference("$root");
    
                // Create the container if necessary
                returnValue = container.CreateIfNotExists();
    
                // Set public permissions
                if (returnValue)
                {
                    container.SetPermissions(
                        new BlobContainerPermissions
                        {
                            PublicAccess =
                                BlobContainerPublicAccessType.Blob
                        });
                }
    
                // 
                var blob = container.GetBlockBlobReference("crossdomain.xml");
                blob.Properties.ContentType = "text/xml";
                blob.UploadText(
                    @"<?xml version=""1.0"" encoding=""utf-8""?>" +
                     "<cross-domain-policy>" +
                         "<allow-access-from domain=\"*\" />" +
                     "</cross-domain-policy>");
            }
    

    David Downing



    Tuesday, July 21, 2015 4:28 AM

All replies

  • Hi,

    Thank you for reaching out to us.
    I am currently researching to gather more information with regards to your request.
    I shall revert back to you with an update at the earliest.
    Sincerely appreciate your patience.

    Regards,
    Shirisha Paderu

    Tuesday, July 14, 2015 6:03 PM
    Moderator
  • Thank you Shirisha, let me know if you need any additional information.

    Friday, July 17, 2015 10:01 PM
  • Hi Dave,

    Issue doesn't seem to be from Azure storage perspective as it plays from the Windows Media Player. We are suspecting this should be an issue with the Flash player.

    However, Based on my research it is suggested to try uninstalling and then reinstalling Adobe Flash.

    Uninstall Flash via the Adobe uninstall tool - Found here (http://kb2.adobe.com/cps/141/tn_14157.html), this tool is the only way to completely remove Macromedia Flash from your system.  Choose the version that is appropriate for your operating system, download, and then run the program.

    Once the program has run it will have completely removed Flash from your computer.  You can verify this by trying to visit any Flash-enabled website.

    Reinstall Flash - Once Flash has been completely uninstalled, reinstall Flash by visiting the Adobe Flash website (http://www.adobe.com/products/flashplayer/).  Be sure to download the latest version (as of this writing it was version 10).

    If this doesn't help I recommend you to azure Flash support for assistance.

    Hope this helps

    Regards,

    Shirisha Paderu


    Saturday, July 18, 2015 11:33 AM
    Moderator
  • After a bit more research, it works if you create a crossdomain.xml blob in the "$root" container.  See the code below (http://bartwullems.blogspot.com/2011/03/cross-domain-handling-on-azure-blob.html):

            /// <summary>
            /// CreateCrossDomainXml
            /// </summary>
            /// <param name="storageAccount">Cloud storage account object</param>
            static public void CreateCrossDomainXml(CloudStorageAccount storageAccount)
            {
                bool returnValue = false;
                CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
                CloudBlobContainer container = blobClient.GetContainerReference("$root");
    
                // Create the container if necessary
                returnValue = container.CreateIfNotExists();
    
                // Set public permissions
                if (returnValue)
                {
                    container.SetPermissions(
                        new BlobContainerPermissions
                        {
                            PublicAccess =
                                BlobContainerPublicAccessType.Blob
                        });
                }
    
                // 
                var blob = container.GetBlockBlobReference("crossdomain.xml");
                blob.Properties.ContentType = "text/xml";
                blob.UploadText(
                    @"<?xml version=""1.0"" encoding=""utf-8""?>" +
                     "<cross-domain-policy>" +
                         "<allow-access-from domain=\"*\" />" +
                     "</cross-domain-policy>");
            }
    

    David Downing



    Tuesday, July 21, 2015 4:28 AM
  • Hi Dave,

    Thanks for the response and update.

    Regards,

    Shirisha Paderu

    Tuesday, July 21, 2015 8:39 AM
    Moderator