Computer Gibberish. . . Beware.

Friday, March 10, 2006

Please avert your eyes if you do not wish to be bombarded with discussion of wordpress, youtube, or html. Blech! I will return to our regularly scheduled rantings at a later time.

I received an email requesting some information on my experience with youtube and wordpress, and thought it might be helpful to post it. To protect the innocent, no real names have been used.

[Emailer]:
I saw your note on WordPress about only getting the code to come on your site with the Youtube link. Did you ever get this working or a[n] answer to your question? I’m having the same problem you are.
[Emailer]

Dear [Emailer] -
No, unfortunately I did not get youtube to work as I would like it to on the site. What I am trying to do is embed a player into a post that will play a video set to private. That way it is not searchable from within youtube and only accessible by visitors to my site. I found no problem doing it this way when I used blogger as my weblog platform.

First, I should mention that I had been inserting all of the code in the html editor of the wordpress “write” tab. But then I read somewhere that the “use the visual rich editor” in the “users” tab of the wordpress admin panel should be unchecked. All of my subsequent attempts with youtube have been within the non-visual rich editor.

I read that because of security reasons wordpress doesn’t allow you to insert “arbitrary code” into blogs so there has been a workaround developed for inserting youtube videos into wordpress posts. But I never got wordpress to read the code; instead it just displayed the code , which might just be related to the private status of the video I was trying.

The closest results I have had was by copying and pasting the same html code I used in blogger to wordpress. This code is generated by selecting “edit video” on the subject youtube video. At the bottom of the “edit video” page under “sharing” is the code. It looks something like this (using sample public video):


<object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/eUMxTSFZ6cU' ></param>< embed src='http://www.youtube.com/v/eUMxTSFZ6cU' type='application/x-shockwave-flash' width='425' height='350' allowscriptaccess='samedomain'></embed></object>

(FYI: The highlighted URI is the unique address for your video. With private videos the URI is similar: “http://www.youtube.com/watch?v=eUMxTSFZ6cU”.)

I found that by inserting this html code I could embed my video into a post. (No css was necessary.) Unfortunately, it will only play if I am [still] logged into youtube. Visitors to the site can see the embedded video, the first frame, and the ‘share’ and ‘play’ buttons, but the video hangs on loading – likely a direct result of the video’s private status. This obviously poses security issues because I don’t want all my site visitors to have my youtube username and password in order to play the video but I also do not want my visitors to have to sign into youtube with their own username and password in order to view a video embedded into my site. So, to temporarily ease my mind I posted links to the videos to play within youtube. (Although as you may have seen those don’t work either – because of the video’s private status, grr.) As of now, this problem is on hold until my patience returns!

After all of that, what is important to know is that if you do not have your video set to private you should not run into any of the aforementioned problems and the above code should work.

I hope I have helped.
vedjen

Uncategorized | 2 Comments

2 Comments

  1. [...] vedjen.com » Blog Archive » Computer Gibberish. . . Beware. [...]

  2. How To Start A Blog…

    I couldn’t understand some parts of this article, but it sounds interesting…

Leave a Comment