I'm rebuilding one of my works modules from Drupal 7 to Drupal 8 and I'm 99% of the way there the one thing I'm stuck on is in some cases I need to load in a external library that changes on a users location and other which is defined in a settings form:
In Drupal 7 I'd simply do it with:
drupal_add_js($proto.'://f1.'.$region.'readspeaker.com/script/'.$customerid.'/ReadSpeaker.js?'.$srcparams,array('group' => JS_DEFAULT, 'type' => 'file', 'scope'=>'footer', 'preprocess' => FALSE));
But I'm not sure how to achieve this by creating a library in Drupal 8.