[Xerte-dev] Re: Youtube RSS
Julian Tenney
Julian.Tenney at nottingham.ac.uk
Thu Jul 9 12:02:44 BST 2015
OK, got it mostly working: you want descriptions in there as well (i.e. below)?
I have to do a window.setTimout to handle the script loading through $.getScript, which gives me the heebie-jeebies, as $.getScript().done() only fires when the script is loaded, NOT when it has executed. I tried the $.ajax alternatives and still had to jump through setTimeout to make it work.
[cid:image001.png at 01D0BA3E.EE60BBC0]
From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Fay Cross
Sent: 08 July 2015 17:00
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Youtube RSS
There should be something in the media lesson page's init function that looks to see if the popcorn.js files have already been loaded and only loads them if they haven't been. I could maybe look at the scope stuff tmw
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Smith, John
Sent: 08 July 2015 12:08
To: For Xerte technical developers
Subject: [Xerte-dev] Re: Youtube RSS
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<mailto:hlsblt at gcu.ac.uk> and one of the Learning Technologists will respond.
-------- Original message --------
From: Julian Tenney <Julian.Tenney at nottingham.ac.uk<mailto: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<mailto:xerte-dev at lists.nottingham.ac.uk>)" <xerte-dev at lists.nottingham.ac.uk<mailto: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/20150709/b0fad3e1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 122986 bytes
Desc: image001.png
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20150709/b0fad3e1/attachment-0001.png>
More information about the Xerte-dev
mailing list