← Back to team overview

mahara-contributors team mailing list archive

[Bug 1885460] A change has been merged

 

Reviewed:  https://reviews.mahara.org/11046
Committed: https://git.mahara.org/mahara/mahara/commit/55a849e4dd0606a42926d848953ae1adeb80fcdc
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    master

commit 55a849e4dd0606a42926d848953ae1adeb80fcdc
Author: Cecilia Vela Gurovic <ceciliavg@xxxxxxxxxxxxxxx>
Date:   Mon Jun 29 16:45:24 2020 +1200

Bug 1885460: load platform.js only for external video block

TODO
embedly documentation indicates to do an async load of the file
https://docs.embed.ly/docs/platformjs

check if it's worth it to allow to define async loads in the
get_instance_javascript inside the blocktype classes
for example
array(
'file'   =>  (is_https() ? 'https:' : 'http:') . '//cdn.embedly.com/widgets/platform.js',
'async'  => true,
)

we would need to also modify the get_all_blocktype_javascript function

behatnotneeded

Change-Id: I8ff3cd0b867edbce24c7b2581e6a23e88b68ff0c

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1885460

Title:
  improve  the way we fetch platform.js

Status in Mahara:
  Fix Released

Bug description:
  We need platform.js for the external video blocktype.

  Currently, we fetch (from  cdn.embedly.com/widgets/platform.js) and
  load the file even if we don't have any external video blocks in the
  view, we only check if the blocktype is installed on the site. We do
  this every time we load a page.

  We need to check:
  - Do we need to fetch the file or could we have it as part of Mahara core?
  - Is it the latest version of the file?
  - We need to load the file only if the view has a video block type in it

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1885460/+subscriptions


References