[Xerte-dev] Re: Youtube RSS
Smith, John
J.J.Smith at gcu.ac.uk
Wed Jul 8 12:08:11 BST 2015
Howdy,
Have you tried adding the script file with the callback as https://apis.google.com/js/client.js?onload=youtuberss.googleApiClientReady
And then defining the googleApiClientReady method as this.googleApiClientReady within the object? You could also load the script using jQuery so that you can check for it already existing rather than load it again on each page model... Fay would probably know how to do this if you aren't sure...
John
Sent from Samsung tablet
Please send all enquiries to our shared Blended Learning inbox at hlsblt at gcu.ac.uk and one of the Learning Technologists will respond.
-------- Original message --------
From: Julian Tenney <Julian.Tenney at nottingham.ac.uk>
Date: 06/07/2015 12:04 (GMT+00:00)
To: "For Xerte technical developers (xerte-dev at lists.nottingham.ac.uk)" <xerte-dev at lists.nottingham.ac.uk>
Subject: [Xerte-dev] Youtube RSS
Hi,
I’ve got the youtube rss working with a hardcode API key. Before we release the code we can split that out and provide a file for people to store their own keys in and read that. I’d appreciate someone peer-reviewing my code: couple of questions:
We need to load the google api which I’ve done by simply adding…
<script src="https://apis.google.com/js/client.js?onload=googleApiClientReady"></script>
…to the top of the file.
The onGoogleApiClientReady function is defined in global scope so I wondered how to make it part of the youtuberss object, but if I simply define it within the object, it doesn’t get called (obviously).
I think Fay or John will have an idea how to make all this nice and graceful! I’ve committed the file (you’ll need an API key!)
Let me know comments,
J
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it.
Please do not use, copy or disclose the information contained in this
message or in any attachment. Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.
This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
Glasgow Caledonian University is a registered Scottish charity, number SC021474
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20150708/ff61c0ba/attachment-0001.html>
More information about the Xerte-dev
mailing list