WordPress database error: [INSERT, UPDATE command denied to user '51213-2'@'10.10.20.81' for table 'wp_options']INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_doing_cron', '1715217481.0307970046997070312500', 'yes') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)
We uploaded the files in the blobs, used a MediaElement to play them but it seems like the video needed to be fully downloaded to be played. It was very frustating since the videos weighted dozen of Mbytes.
The solution is in the Cloud!
When you use Blob storage, you can actually set a default version for the API. It can be obvious for the Azure expert but not for me.
If you set this default version to “2011-08-18” then you will be able to do partial and pause/resume downloads on blob objects. This is exactly what we were looking for !
To do this, th only way I found was to create a little .NET program, reference the Azure SDK (thank you Nuget) and call the SetServiceProperties with the correct arguments.
[csharp]
string accountName = "your account Name";
string accountKey = "your account key";
var cloudStorageAccount = CloudStorageAccount
.Parse(string.Format(
"DefaultEndpointsProtocol=http;AccountName={0};AccountKey={1}"
, accountName, accountKey));
CloudBlobClient client = cloudStorageAccount.CreateCloudBlobClient();
var prp = client.GetServiceProperties();
client.SetServiceProperties(new ServiceProperties()
{
DefaultServiceVersion = "2011-08-18",
Logging = prp.Logging,
Metrics = prp.Metrics
});
[/csharp]
Now you just have to use the uri of the video in your XAML UI ( or with a video tag) :
[xml]
<playerFramework:MediaPlayer Source="{Binding VideoUri}"
PosterSource="/Assets/Images/videoPoster.png"
AutoPlay="False"
AutoLoad="False" />
[/xml]