Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for AES-128 token encryption on video stream. #3846

Closed
sturlath opened this issue May 27, 2022 · 3 comments
Closed

Support for AES-128 token encryption on video stream. #3846

sturlath opened this issue May 27, 2022 · 3 comments
Labels
Status: Not Planned Type: Feature ⚙ Request or idea for a new feature.

Comments

@sturlath
Copy link
Contributor

Video player can´t play videos with AES token restriction only (no DRM). This is the base protection you need for you video stream if you are not using DRM.

When this works

<iframe src="//aka.ms/ampembed?url=@video.DashUrl&aes=true&token=@video.Token"
        id="azuremediaplayer"
        name="azuremediaplayer"
        scrolling="no"
        frameborder="no"
        align="center"
        height="500px"
        width="672px"
        allowfullscreen
        class="embed-responsive-item"></iframe>

this (or any permutation I tried) doesn´t (of course).

<Video Source="@video.DashUrl"
StreamingLibrary="StreamingLibrary.Dash" 
ProtectionHttpRequestHeaders="@video.Token"/>

Hls.js supports AES-128 token encryption

@sturlath sturlath added the Type: Feature ⚙ Request or idea for a new feature. label May 27, 2022
@johndeu
Copy link

johndeu commented May 27, 2022

If you are hosting a commonly used player framework like HLS.js, DASH.js, Video.js, you have to put the correct format string on the URL. The default URL manifest that comes back from a Live event preview URL is going to be Smooth Streaming format. /manifest

To get HLS, you have to add /manifest(format=m3u8-cmaf) to get an HLS playlist. Some players require you to add the .m3u8 extension to that as well.

To get DASH, you have to add /manifest(format=mpd-time-cmaf) to get an actual DASH MPD manifest. Some players require you to add a .mpd extension to that.

My recommendation... use HLS.js or Dash.js or Video.js and move over to React and Next.js - life will be much easier than Blazor for video stuff.

@sturlath
Copy link
Contributor Author

Here I´m getting the live stream (Dash in this case) using AES token but the Blazorise Video player can´t play that, or I at least can´t figure it out.

And yes for this video stuff, Blazor is causing me a world of headache! But for now I´ll stick with IFrame since this functionality is not for the massess but just for the streamer to see if the stream is working or not. The front facing app in in .net Razor pages.

@sturlath
Copy link
Contributor Author

Any change we can also try this out also @stsrki? Not sure if you noticed my link AES-128 token encryption?

and end up with something like this

<Video Source="@video.HlsUrl"
StreamingLibrary="StreamingLibrary.Hls" 
AES ="true"
ProtectionHttpRequestHeaders="@video.Token"/>

At least for the player to be really useful for all scenarios it will need to have token restriction (if you don´t have DRM+token (not AES))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Not Planned Type: Feature ⚙ Request or idea for a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants