Welcome to WebmasterWorld Guest from 54.81.71.68

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

embedded youtube videos dont play

when fetched from database

     
8:27 am on Jun 25, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Feb 2, 2009
posts:79
votes: 0


I have written a script to allow users embed videos in their profiles.
There is an input field where the users paste the embed script of the video.
On submitting the form, the embed script is saved in database as BLOB and at the same time the video is displayed on the page using ajax.

The problem is that, when it is displayed through ajax ie immediately after saving, the video appears and can be played. But when the page is refreshed and the script is taken from the database and 'echo'-ed, it tells me that I dont have a plugin to play the video. When I click 'download plugin', the browser gives a msg

'No plugins found
Unknown plugin (text/html)'

I am facing this problem online only and not on wamp..

Unable to figure out the problem ?
Kindly help

8:18 pm on June 25, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15756
votes: 0


what code are you using to embed them? smells like an error in the html
10:28 am on June 26, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Feb 2, 2009
posts:79
votes: 0


the one that is available on youtube .. just below the video description
1:40 pm on June 26, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15756
votes: 0


so what do you do with that code?
just present it as is?
what plugin might it be talking about? have you used an html validator [validator.w3.org] to validate the page that you have the embedded player on?
what is the difference in the code when it is echo'ed as opposed to when you originally generate it?
What surrounding code has changed?
2:19 pm on June 26, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Something in the "save/retrieve embedded object from database" process is losing or corrupting the MIME-type of the included object:
'No plugins found
Unknown plugin (text/html)'

It looks like your HTML page is trying to <embed> an HTML document, rather than a .swf or .flv, file.

Jim

9:31 am on June 27, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Feb 2, 2009
posts:79
votes: 0


thanks for the replies

so what do you do with that code?
just present it as is?

yes I am putting the code as it is inside a div...
the same code(ie from youtube) is placed appended to a dummy div by jquery on completion of the ajax request..
This way, there are no issues..

I am unable to figure out any difference between surrounding code inthe two places..

from database, its
<div> <?php echo $row['youtube']; ?> </div>

in ajax, it is
$('#dummy').append('<div>'+youtube+'</div>');

the above code is not as it is, i have skipped the id and class

@jdmorgan .. can anything be done about it? Also, there is no problem offline (wamp) ..

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members