{"id":21932729,"url":"https://github.com/tompi/blobstreaming","last_synced_at":"2025-03-22T13:15:42.071Z","repository":{"id":206193982,"uuid":"716036507","full_name":"tompi/BlobStreaming","owner":"tompi","description":"POC: Streaming with range requests and JWT","archived":false,"fork":false,"pushed_at":"2024-01-15T12:20:34.000Z","size":6990,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T12:27:17.730Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tompi.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-08T10:48:58.000Z","updated_at":"2023-11-08T13:14:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"d78b5885-92e6-422b-9241-b568cde85f5e","html_url":"https://github.com/tompi/BlobStreaming","commit_stats":null,"previous_names":["tompi/blobstreaming"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tompi%2FBlobStreaming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tompi%2FBlobStreaming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tompi%2FBlobStreaming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tompi%2FBlobStreaming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tompi","download_url":"https://codeload.github.com/tompi/BlobStreaming/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244959454,"owners_count":20538628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T23:19:40.886Z","updated_at":"2025-03-22T13:15:42.034Z","avatar_url":"https://github.com/tompi.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Motivation:\nAzure Media Services is deprecated June 2024.\n\nKey take aways:\n* Video tag needs range requests to be effective(to be able to seek before finished downloading).\n* There does not seem to be any way to alter(add bearer token header) the requests done by the video tag.  (unless we use HLS, in this case requests are via xhr, and we can intercept them and add bearer token \"beforeRequest\", but this is a bit hacky and apperently is not supported by safari)\n* We dont want any parts of the video stored on the client after playing is finished.\n\nProposed solution:\n* Setup ASP.NET endpoint and serve video using \"Results.Stream\" which supports range requests.\n* Add cache-header \"no-store\" on this endpoint to avoid storing the video on disk.\n* Use custom authentication for this endpoint since we do not want to store users \"regular\" jwt in cookie.\n* Issue custom, short lived JWT that is only valid for one video(scope the cookie to video url).\n* Sign the JWT using Azure Keyvault(which provides builtin support for key generation and auto-rotation).\n\nNotes:\nYou will not be able to test range requests locally with small mp4 files.\nTested with 7mb file, and the browser will finish downloading the file\nbefore you can seek in the player...\n\nLarge test film(64mb): https://filesamples.com/samples/video/mp4/sample_1280x720_surfing_with_audio.mp4\nDownload this and install azurite(blob storage emulator) and make a container called \"vidtest\".\nPut the file in the vidtest container as \"testfilm_large.mp4.\n\nPosted to reddit to attempt to get some feedback:\nhttps://www.reddit.com/r/dotnet/comments/191gwgo/simple_alternative_to_azure_media_services/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftompi%2Fblobstreaming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftompi%2Fblobstreaming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftompi%2Fblobstreaming/lists"}