Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

How To Make Youtube Embedded Videos Viewable On All Browsers


7 replies to this topic

#1 Inspiron

    Trap Grand Marshal Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,204 posts

Posted 27 April 2006 - 09:26 AM

Firstly, I've noticed that embedded YouTube videos on personal websites, or any sites not on YouTube's domain, cannot be viewed on Opera browser. In other words, the codes given by YouTube to embed the videos on your site does not have support for Opera browser. However I've found out a trick to do so. Here's how..

This is the original code given by YouTube to embed to your own website. Copy this codes and paste into the source of your site.
<object width="425" height="350">
 <param name="movie" value="http://www.youtube.com/v/bTfVt5GxpFU"></param>
 <embed src="http://www.youtube.com/v/bTfVt5GxpFU" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object>

Now look at the value in the param tag and the source in the embed tag. Edit the "/v/" into "/p.swf?video_id=".

Hence it becomes the following..
<object width="425" height="350">
 <param name="movie" value="http://www.youtube.com/p.swf?video_id=bTfVt5GxpFU"></param>
 <embed src="http://www.youtube.com/p.swf?video_id=bTfVt5GxpFU" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object>

Now with this code, you will be able to play YouTube videos on Opera browser as well. Moreover, it's able to play videos on all types of browsers. A disadvantage is that you cannot see the first frame of the video like in the original code. Anyway, who want's to see just the first frame? Compatibility is the key to be a good web programmer.

#2 saitunes

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 291 posts
  • Gender:Male
  • Location:Brisbane, AU
  • myCENT:51.85

Posted 16 February 2008 - 01:26 PM

So instead of embedding it as an FLV its a SWF?

#3 apacheNewbie

    Newbie [Level 2]

  • Kontributors
  • PipPip
  • 29 posts

Posted 18 February 2008 - 07:31 AM

View Postsaitunes, on Feb 16 2008, 02:26 PM, said:

So instead of embedding it as an FLV its a SWF?

I think youtube uses flash player to play FLV.
It is common to embed flash application in your web site for multimedia.

#4 galexcd

    Trap Grand Marshal Member

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,331 posts
  • Gender:Not Telling
  • myCENT:89.24

Posted 18 February 2008 - 09:01 PM

Yes many browsers cannot support the FLV format directly embedded into them, because of this youtube has a flash player (swf format) that opens the flv's and plays them with the gui (play, pause, timeline etc). Clever work around. Nice work.

#5 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 12 August 2009 - 04:21 PM

working?How To Make Youtube Embedded Videos Viewable On All Browsers

Hi.

This isn't completely working. The first frame of the movie now shows up in Netscape. It wasn't before. When I click play, the video gets stuck in downloading and never plays. It gets stuck in both netscape and other browsers that were working without the code edit.

-reply by alexandru Sacui

#6 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 15 August 2009 - 02:25 AM

problem with "/p.swf?video_id=".How To Make Youtube Embedded Videos Viewable On All Browsers

Hi,

The 1st time I cahnged the "/v/" to "/p.Swf?video_id=". It worked beutifully but, I tried it again & I can't get it to work. Do you think theres a problem with my server or, am I doing it wrong?

May I send you a video code & you change it for me? I would really appreciate it.

Thanks in advance

-question by NIcole

#7 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 21 September 2009 - 12:18 PM

I had a similar experience with IE6

 

First I reset all internet to default

 

Find where flash player is on hard disk “c-->windows-->System32 -->macromedia...> flash -->flashutil”  run update and install.

 

Internet Explorer will now play video again - problem fixed!

 

Laney



#8 Guest_Bill_*

  • Guests

Posted 03 December 2010 - 02:46 PM

THANKS - this worked better than I had expected. I had 6 Youtubes on a webpage. I changed the code to ( p.swf?video_id= ) on the 1st one and the fix carried through to all the following vids on the page.




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users