[Xerte-dev] Re: Youtube RSS

Smith, John J.J.Smith at gcu.ac.uk
Thu Jul 9 12:56:59 BST 2015


Yeah, its a pain to have to use timeout but sometimes there is no other way... does using the onload parameter not work?

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: 09/07/2015 12:03 (GMT+00:00)
To: For Xerte technical developers <xerte-dev at lists.nottingham.ac.uk>
Subject: [Xerte-dev] Re: Youtube RSS


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:_com_android_email_attachmentprovider_1_20123_RAW at sec.galaxytab]

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



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/c2abb7ef/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/c2abb7ef/attachment-0001.png>


More information about the Xerte-dev mailing list