restruct/silverstripe-cfstreamvideo

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

dev-main 2021-07-05 09:23 UTC

This package is auto-updated.

Last update: 2021-09-05 09:39:33 UTC


README

Silverstripe CloudFlareStream video streaming module

This Silverstripe module provides video uploading to– and streaming from CloudFlareStream via its API.

In includes:

  • A DB StreamVideo object to hold video data & settings, and keep track of the status
  • A StreamVideoPage object providing an upload interface (using FilePond)
  • A StreamVideoAdminController to handle interactions in the admin section (like API interactions, providing shortcode placeholder, etc)
  • Configurable options (on StreamVideoAdminController) / environment options:
    • (ENV) APP_CFSTREAM_API_HOST, APP_CFSTREAM_ACCOUNT_ID, APP_CFSTREAM_ACCOUNT_EMAIL, APP_CFSTREAM_API_TOKEN
    • (ENV) APP_CFSTREAM_SIGNING_KEY_ID, APP_CFSTREAM_SIGNING_KEY_PEM, APP_CFSTREAM_SIGNING_KEY_JWK
    • (StreamVideoObject::config()) $signed_buffer_hours
  • The initial version of this module:
    • (1) saves uploaded vids locally,
    • (2) posts an API request to copy the vid to Stream,
    • (3) polls (onload/init) the status upon rendering and,
    • (4) (configurable) removes the local video upon status 'ready'
  • Uploads work via FilePond (as Silverstripe in all their wisdom consider chunked uploads out of scope) using chunking for large uploads (custom filepond config, based on the yet to be published Restruct Admintweaks module)
  • A ShortCode + Placeholder are provided for easy inclusion of vids in the editor (also on 'regular' pages)
    • The shortcode hooks into the yet to be published Restruct Shortcodable module
    • The modal has a dropdown to select the video by title/name and checkboxes for options: show controls, autoplay, preload, start muted, p
  • A ModelAdmin interface is included to view & edit existing vids, or upload new ones (without having to create a StreamVideoPage):
    • Videos can be set to be 'protected' (require a signed URL via Stream API)
    • Videos can have whitelisted (only) domains & countries, the default/current website domain is whitelisted by default if whitelisting is active
    • The initial version allows setting/uploading a custom poster image for a video (overriding the one provided by Stream API)
    • A later version of this module provides could allow managing signing keys from model admin (using the Stream API)
    • A later version of this module provides some way/Ui to change/select the poster image (via a Stream API call)
  • Prevent video downloading identical to this WP module (under the hood explanation)

REFS: