Skip to content

Moodle filter plugin that enables viewing SMP protected HLS media stream delivered by Akamai Media Services

Notifications You must be signed in to change notification settings

kabalin/moodle-filter_akamaitoken

Repository files navigation

Moodle Plugin CI

moodle-filter_akamaitoken

This Moodle filter plugin enables viewing SMP protected HLS media stream delivered by Akamai Adaptive Media Delivery service. It is generating and adding one-time access Edge Authorization token to HLS stream URL, so that it is validated by Edge server to authenticate user session and permit playback using the media player plugin of your choice.

Plugin supports HLS streams provisioned using Akamai Media Services on Demand and Akamai Media Services Live (i.e. via supported Segmented Media Delivery Modes)

For more details on Akamai Segmented Media Protection, please refer to documentation.

Installation

Plugin files need to be placed in ./filter/akamaitoken directory in Moodle, then you will need to go through installation process as normal by loggining in as site admin.

Make sure that filter plugin is configured, enabled and located above "Multimedia plugins" filter in the "Manage Filters" administration page, so that it has a higher priority to process media files first.

How it works

Plugin is extending filter_mediaplugin filter plugin by adding a feature to identify URLs that belongs to Akamai Media Services and extending them with Edge Authorization tokens prior to passing to core_media_manager instance for embedding a player.

Domain settings in streams configuration is used to determine which URL should be treated for token Authorization and encryption key is used to generate access token for this URL. You can configure any number of encryption key - domain pairs. The common use case is to have one pair for media streams provisioned by Akamai Media Services on Demand and one for Akamai Media Services Live.

URL Syntax

Example of client-side URL Syntax for Akamai Media Services on Demand:

http://example-vh.akamaihd.net/i/movies/example2a_,300000,500000,800000,1000000,_event1.mp4.csmil/master.m3u8

The part of URL used for token generation (ACL) is:

/i/movies/example2a_,300000,500000,800000,1000000,_event1.mp4.csmil*

The final URL passed to player will be:

http://example-vh.akamaihd.net/i/movies/example2a_,300000,500000,800000,1000000,_event1.mp4.csmil/master.m3u8?ndnts=<token>

Example of client-side URL Syntax for Akamai Media Services Live:

http://example-lh.akamaihd.net/i/event_1@49207/master.m3u8.

The part of URL used for token generation (ACL) is:

/i/event_1@49207*

The final URL passed to player will be:

http://example-lh.akamaihd.net/i/event_1@49207/master.m3u8?ndnts=<token>

Credits

About

Moodle filter plugin that enables viewing SMP protected HLS media stream delivered by Akamai Media Services

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages