Hello everybody,
I need to use the Cantaloupe delegates.rb to be able to apply different overlays based
on the characteristics of the url used (eg. different URL domain means
different overlay to use).
But I have a trivial problem: I can't read any of the interesting
context keys when using Mirador: identifier, local_uri, request_uri.
To be precise:
- I use Cantaloupe 5.0.5 through Mirador 3
- The keys of my interest are valued only if I invoke Cantaloupe directly and not via Mirador.
- The only key that works both directly and via Mirador is client_ip (in my case it is of no use).
For example, this produces the correct key value of 'local_uri' only when calling Cantaloupe directly without using Mirador.
def overlay(options = {})
{
'string' => context['request_uri'],
'position' => 'center',
'inset' => 5,
'font' => 'Helvetica',
'font_size' => 20,
'font_min_size' => 18,
'font_weight' => 1.0,
'color' => 'rgba(128, 128, 128, 100)',
'background_color' => 'rgba(0, 0, 0, 10)',
'glyph_spacing' => 0,
'stroke_color' => 'rgba(128, 128, 128, 100)',
'stroke_width' => 1,
'word_wrap' => false
}
end
Has anyone had similar experiences and any suggestions in this regard?
Thanks in advance for any response.
Arthy