Error message when linking to a Toolbook from YouTube

Topics related to using ToolBook for building web apps.

Error message when linking to a Toolbook from YouTube

Postby Robert Stevenson » Tue Sep 30, 2014 11:02 am

In a flipped classroom model I have short podcasts that I post to You-Tube. I have recently been experimenting with adding links directly from the You-Tube presentation to the accompanying Toolbook study-guide. Problem is, I get the following error message when I click the link. The You-tube link is http://youtu.be/glZq7Klgs1Q and the link shows at about 6 seconds.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Error message when linking to a Toolbook from YouTube

Postby Clifton » Tue Sep 30, 2014 2:08 pm

If you are using htmlVideoLoader() to play your YouTube video url, then I regret to say that the necessary plugin to support YouTube videos has not been included at this time in the PowerPac video component. This is a planned addition for the future—probably the next release, though I'm not absolutely sure about this.

Here is a solution which will load the YouTube video, but will not allow monitoring of the playback ( a feature which the official PowerPac release for this will provide. ).
  1. Obtain the embed code for the YouTube video you want to include. For the video you submitted, it looks like this:
    <iframe width="100%" height="100%" src="http://www.youtube.com/embed/glZq7Klgs1Q?feature=player_detailpage" frameborder="0" allowfullscreen></iframe>
    Make sure to change the width and height to "100%". You are really interested in the src property, while the rest of the HTML should always remain the same.
    The field would look like this:
    Image 1.png
    Image 1.png (4.69 KiB) Viewed 1327 times
  2. Put this text inside a field object that should be used to display the video. Give the field a name like "YouTubeVideo". Hide the field until the video is must actually be shown.
  3. Then when you want to display the video, send a trigger event to the "YouTubeVideo" object. The trigger actions on the field "YouTubeVideo" would look like this:
    Image 2.png
    Image 2.png (22.9 KiB) Viewed 1327 times

    The main action that compiles and runs you HTML code is the PowerPac function setHTMLContent().
I just tried this and it works perfect and this solution should work in all browsers. I tried it in IE and in Firefox.

The above solution should work for you until the official YouTube plugin is included in the PowerPac htmlVideoLoader().
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Error message when linking to a Toolbook from YouTube

Postby Clifton » Tue Sep 30, 2014 2:17 pm

I guess this gets even easier:
Just use the PowerPac function pgGotoURL() (instead of setHTMLContent and do not put any text into the field). Set these paraemters for pgGotoURL():
  • target = name of self
  • url = "http://www.youtube.com/embed/glZq7Klgs1Q?feature=player_detailpage"
You will get exactly the same result!
It couldn't get any easier, could it? Of course the monitoring ability is still not present, but at least you can show your videos.

How do you get the http source for a YouTube video?
  • Begin playing the YouTube video on the YouTube web site and right-click on the playing video; then choose to copy the embed code. The embed code will include the http source property for use in the function shown above or in the more complicated approach described earlier.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Error message when linking to a Toolbook from YouTube

Postby Robert Stevenson » Tue Sep 30, 2014 2:40 pm

This all looks great. Problem is I'm not launching the You-Tube video from Toolbook but simply as a link from the course LMS. The You-Tube video plays fine its just that link in the first 6 s that launches (or in this case fails to launch) the Toolbook StudyGuide to go along with the video. Did you not get that error message about the "uncaught security error ... blocked a frame with origin ..." when you ran the video?
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Error message when linking to a Toolbook from YouTube

Postby Clifton » Tue Sep 30, 2014 6:01 pm

When I ran your YouTube video in a ToolBook field, then clicked on the link in the first portion of the video, I was taken to the course, but had to allow the popup of the course to run; otherwise it loaded as expected. I suspect the method you are using is launching the video using a non-embedded link which when the link in the video is clicked causes a permission denied error because of cross-domain issues between YouTube and your LMS and/or course content server. When you launch your video you need to launch it as embedded code from a page on your domain, then when you click the link you will be in the same domain to launch the additional course material.

Therefore, you may still need to create a ToolBook page (or web page) that uses embedded code like the examples shown in this thread. Put the export on your server and launch it from the LMS instead of using the YouTube web page reference (which invariably will cause cross-domain linking issues).

This may sound confusing but if you think it through, you need to keep all your content on the same domain to avoid throwing security issues. The content can load videos from YouTube but it cannot navigate back and forth between servers.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Error message when linking to a Toolbook from YouTube

Postby Robert Stevenson » Tue Sep 30, 2014 7:19 pm

Thanks so much again for your thoughts. I was afraid that this was the case since what I really want is people outside the school (non-LMS users) to be able to go directly from You-Tube to the related Toolbook studyguides on my own site. According to You-Tube these associated websites should be able to launch. Frustrating.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Error message when linking to a Toolbook from YouTube

Postby Clifton » Tue Sep 30, 2014 7:27 pm

Well, if YouTube claims this is possible, then there may be something else going on that we are missing. You might try making your course link without any LMS support AND avoid using a launch page. I think this may also be triggering the error when going from YouTube to the course.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Error message when linking to a Toolbook from YouTube

Postby Robert Stevenson » Tue Sep 30, 2014 9:21 pm

Okay, I know I'm pushing it now but any chance that you could point me in the best direction for learning the ins and outs of launching without a launch page? I always have gone with the full-screen pop-up ... Maybe its time to re-think the approach.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Error message when linking to a Toolbook from YouTube

Postby Clifton » Tue Sep 30, 2014 9:50 pm

Start small in troubleshooting this. I would start by removing the LMS requirement when linking from the YouTube page to the course page. This may be the biggest problem because ToolBook is trying to connect to an LMS adapter, which is usually interpreted as the link from which the course is launched. Since YouTube is refusing the LMS Http connection, the error is thrown.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Error message when linking to a Toolbook from YouTube

Postby Robert Stevenson » Wed Oct 01, 2014 9:29 am

I just don't get it. If I go to the you-tube site on my home computer I'm not in any way connected to the LMS. I watch the video hosted on the you-tube servers and click the link that takes me to the Toolbook (hosted on my own site ... not part of the LMS) I still get the error message. I just don't see where in all this "Toolbook is connecting to an LMS adapter".
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Next

Return to Web (DHTML) Development

Who is online

Users browsing this forum: No registered users and 4 guests

cron