Object Code Video Shows in Description but Black Screen in Wiki

Object Code Video Shows in Description but Black Screen in Wiki

by Mike Stapleton -
Number of replies: 3

I would like to include video in a Wiki. I open HTML and then embed object code to link to an online video host (screencast.com). Video works great in the Description block (top of Wiki) but when I paste exact same code in the Wiki HTML it only shows a black rectangle where the video should be. I know the code is there in fact the video actually shows for a split second behind the black rectangle. I have Allow Embed Code turned on in Security settings. Any idea how to solve this. Object code works fine if I use Resource instead of Wiki but really want to use wiki for this application.

Issue can be seen on my site here

Mike

Average of ratings: -
In reply to Mike Stapleton

Re: Object Code Video Shows in Description but Black Screen in Wiki

by Sean Farrell -

Hi Mike,

It may start being the same bits of code pasted into the two sections, however the output is that the code in the main section of a wiki page is getting mangled as it is being interpretted as wiki text.

Since the allowScriptAccess param is being changes from always to never, then I suspect that it is based on the different options which are being used to call lib/htmlpurifier on the text being processed.

The key to the problem seems to be trying to embed a flash object which has a separate loader "bootstap.swf", and a data file listed in the flashvars parameter - content=http://content.screencast.com/users/DoorCountySolar/folders/900%20-%20Marketing%20Plan/media/e91f54cd-f049-4694-a773-479e5ad68253/gfgdfgdfgdfgfdg.swf.

The flashvars param seems to be working the the summary area, but disappearing when the code is included in the main body of the wiki.

There might be a way to sidestep all of this complexity.  If you have swf option turned on in the moodle media filters, have you tried just including a simple link to the content of the screencast:

<a href="http://content.screencast.com/users/DoorCountySolar/folders/900%20-%20Marketing%20Plan/media/e91f54cd-f049-4694-a773-479e5ad68253/gfgdfgdfgdfgfdg.swf">Screencast 1</a>

With any luck, the moodle filter should write out a flash object to embed the swf file.  You can also specify the height and width by adding  ...fdg.swf?d=640x320"

With screencast.com, be careful to use the file specified by the content= variable hidden in the flashvars instead of the bootstrap.swf file.

You may lose some of the advantages of using a the bootstap loader and having a nice poster image while loading, but it might work for the situation you describe.

--
Sean Farrell
Edinburgh, Scotland

In reply to Sean Farrell

Re: Object Code Video Shows in Description but Black Screen in Wiki

by Sean Farrell -

Hi Mike,

It is also possible that you may fix things by looking out for colons in the content of the params.

> Could you perhaps try urlencoding the flashvar attribute, in particular the colon

> character to become %3A.


> I wonder if this will stop the html attribute being rewritten for you?

--
Sean Farrell
Edinburgh, Scotland

In reply to Sean Farrell

Re: Object Code Video Shows in Description but Black Screen in Wiki

by Mike Stapleton -

Sean,

I am not sure if you use the same saying in Scotland "Can't have your cake and eat it too"? but... I just did!

While I was waiting for help I continues to play around with it and ended up with an even better alternative.

  1. I opened a sample SWF (presentation video)
  2. Did a sceen-capture of the video and saved to .png
  3. Pulled the image into Fireworks, sized it to fit and placed a "Click Anywhere to View Video" over the top. Grouped the two into a single .png
  4. FTP'd the image to my regular website
  5. Navigated to the web page, right clicked and used "copy image location"
  6. Tabbed over to my Moodle site and inside the Description box
  7. Clicked on the Insert Image and then pasted the URL of the image
  8. Tabbed back over to the Web page again and opened the SWF which places the URL of the Flash into the URL line. Copied that path.
  9. Went back to my Moodle site, clicked on the image and then on the Moodle Media icon (2.0). Pasted the URL of the SWF and added a title.

There are a number of things I like about this in lieu of my previous embed of Object Code:

  1. The page loads much faster because it is only loading an image rather than part of an embedded video
  2. When clicking on the image the video opens full screen based on the settings of the Flash video (set to allow resizing)
  3. If I want to use the same image and video somewhere else I can just copy and paste it. That picks up the image URL and the SWF URL
  4. If I change the image (via my website) or the SWF on my website then all of those changes are updated on all uses in Moodle.
  5. In the Wiki it works the same up top in the Description block as it does in the lower (wiki) section. No issues like I had with the embed code.
  6. Much easier to explain how to do this to others authorized to edit the wiki. They do not need to go into the HTML to perform this task.
  7. P.S. I did find it was even cleaner if I 1st created a single row/column table, placed a background color in it and a 9px border then placed the image and linked video inside that single cell. The table obeyed my request to center itself in the block whereas the image without the table wanted to hang to the left.

I would say that is "still having the cake and eating it".

Thanks for all your help. Let me know if you see any flaws in this method.

Mike

Here is sample. Enter as Guest

http://workshops.therenewablenetwork.com/mod/wiki/view.php?id=3