Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> How To Make Youtube Embedded Videos Viewable On All Browsers, including on Opera browser which is actually not viewable with embedde
Inspiron
post Apr 27 2006, 09:26 AM
Post #1


Trap Grand Marshal Member
***********

Group: Members
Posts: 1,205
Joined: 25-March 05
Member No.: 4,883





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.
CODE

<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..
CODE

<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.
Go to the top of the page
 
+Quote Post
saitunes
post Feb 16 2008, 01:26 PM
Post #2


Member [Level 2]
*****

Group: [HOSTED]
Posts: 77
Joined: 16-February 08
From: Brisbane, AU
Member No.: 57,945



So instead of embedding it as an FLV its a SWF?
Go to the top of the page
 
+Quote Post
apacheNewbie
post Feb 18 2008, 07:31 AM
Post #3


Newbie [Level 2]
**

Group: [HOSTED]
Posts: 30
Joined: 23-November 06
Member No.: 33,877



QUOTE(saitunes @ Feb 16 2008, 02:26 PM) *
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.
Go to the top of the page
 
+Quote Post
galexcd
post Feb 18 2008, 09:01 PM
Post #4


PROGRAMMER(prō'grăm'ər)- n. An organism that converts caffeine into software.
*********

Group: [HOSTED]
Posts: 920
Joined: 25-September 05
From: The dungeon deep below the foundation of trap17
Member No.: 12,251



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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How To Reference Parent Browser Window From.....(2)
  2. Anchor Tag Compliance Issue?(5)
  3. Browser Altering Font Size(6)
  4. Bug In Opera - How Can I Fix This?(2)
  5. Width Of Display Area Of Browser Window(6)
  6. Help With Website Layout Correction For All Browsers(4)
  7. Making This Website Automatically Scale For Browsers(1)


 



- Lo-Fi Version Time is now: 16th May 2008 - 06:53 PM