Created
June 6, 2023 18:37
-
-
Save adham90/8d7a112dfe336d4395e33b2b7b46f532 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api_key = "API_KEY" # from https://dash.bunny.net/stream/128158/security | |
video_id = 'VIDEO_ID' | |
timestamp = 1.hour.from_now.to_i | |
token = OpenSSL::Digest::SHA256.hexdigest("#{api_key}#{video_id}#{timestamp}") | |
# URL | |
# https://iframe.mediadelivery.net/embed/[Video_Library_ID]/[VIDEO_ID]?token=[TOKEN]&expires=[timestamp] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment