I want to use Azure Blob Storage for Video Hosting. The videos are integrated in my Website via HTML Video Player:
<video controls>
<source src="blobstorageurl" type="video/mp4">
Your browser does not support HTML video.
</video>
So I created a blob container in which I upload the videos. An Azure Function (Blob Trigger) is observing this container. When a new video is uploaded, the Azure Function should start an AMS Job, with the new File as the source.
I used the logic of the official example (https://github.com/Azure-Samples/media-services-v3-node-tutorials/blob/main/AMSv3Samples/StreamFilesSample/index.ts).
Here is a small break down of my code:
const blobTrigger: AzureFunction = async function (context: Context, myBlob: any): Promise<void> {
...
mediaServicesClient = new AzureMediaServices(creds, subscriptionId, clientOptions);
let job = await mediaServicesClient.jobs.create(resourceGroup, accountName, transformName, jobName, { input: context.bindingData.uri, outputs: jobOutputs });
}
Which basically creates a new blob container with encoded files.
My Question is, how can I provide this file to my HTML Video Player. In the Tutorial they created a Streaming Locator, which I can't use for the HTML 5 Player. Can I use the blob directly? Or isn't it a good idea? And if yes, how can I provide it without any access key.