[Xerte-dev] Re: Youtube RSS
Tom Reijnders
reijnders at tor.nl
Sat Jul 11 14:14:53 BST 2015
Julian,
Not sure if the api_keys solution is going to work out.
The way it's solved now, doesn't work for exported LO's.
Also, there was a small typo in modules/xerte.play.php (Which I fixed),
and shouldn't the same code be applied to preview as well?
But I am worried about export. Let me think of a solution there.
Tom
Julian Tenney schreef op 9-7-2015 om 14:04:
>
> No you can’t do onload=object.method. Tested it again: they obviously
> don’t treat it as an expression, simply the name of a function. I even
> tried onload=alert(‘something’); but it seems it’s simply a string,
> and it’s not interpreted.
>
> I know all about setInterval and the like as they were a common
> feature in the old xerte flash engine, and you couldn’t work around
> them: it could lead to a complete nightmare in some cases. Sometimes a
> value of 0 was enough to let the value of things take before the next
> code executed; otherwise – and here’s the thing I hate – you basically
> pick a number and hope for the best. What’s to say, that just because
> 500 m/s is enough on my machine, it’s enough on yours? Why are we
> still in this situation in 2015?
>
> I’m finding some suggested alternativs using $.ajax instead of
> $.getScript, but am still finding problems, I think they might be
> firefox specific from what I’m reading.
>
> *From:*xerte-dev-bounces at lists.nottingham.ac.uk
> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of
> *Smith, John
> *Sent:* 09 July 2015 12:58
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: Youtube RSS
>
> 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 <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: 09/07/2015 12:03 (GMT+00:00)
> To: For Xerte technical developers <xerte-dev at lists.nottingham.ac.uk
> <mailto: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.setTimoutto 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.
>
> *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 *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
>
>
> 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.
>
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
--
--
Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20150711/69bf7df2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 122986 bytes
Desc: not available
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20150711/69bf7df2/attachment-0001.png>
More information about the Xerte-dev
mailing list