Youtube video isn't showing in Chrome, but shows in Firefox - google-chrome

Thank you for your help.
On my site I am embedding youtube videos. Where the video is suppose to be it isn't showing up, in chrome. It works on a macs and it also works on PCs, but only on firefox. Where the video is suppose to be you can "click" on the video and it will start playing, but it is not visible. How do I get it to show up. I thought it might be hiding behind stuff, so I messed with some z-index stuff, but it isn't working. Is there something else I should be looking at?
This is how the code is:
<object type="application/x-shockwave-flash" id="myytplayer" data="https://www.youtube.com/v/FJqOb-TS-0o&enablejsapi=1&playerapiid=ytplayer&version=3&controls=0&showinfo=0&rel=0" width="500" height="348">
<param name="allowScriptAccess" value="always">
</object>
The video is being pulled from my data base, but is being hosted by YouTube.
Here is the code on firefox:
<object id="myytplayer" width="500" height="348" type="application/x-shockwave-flash" data="https://www.youtube.com/v/FJqOb-TS-0o&enablejsapi=1&playerapiid=ytplayer&version=3&controls=0&showinfo=0&rel=0">
<param name="allowScriptAccess" value="always">
</object>
I have tried updating my flash drives to see if that is a problem. I have deleted my cookies. I have even had other people try it out and it just doesn't show up in chrome. Any help would be awesome.

Both your snippet of codes works fine in my Chrome 34 Windows 8.1 machine. Not sure where your issue is coming from. Maybe a system/network/proxy settings specific to Chrome on machines where you are trying from (sometimes Youtube URL are banned from company network).
I would point to the Youtube documentation anyway. Maybe trying another form of embed can help:
Best practice: IFrame embeds are the recommended method for embedding a YouTube player because the IFrame will select the appropriate player based on the client's capabilities and available YouTube file formats.
If you use the object tag you should have an embed tag falback inside (see the doc).

Related

Embed mp3 file into html that works across browsers

I am using the following code to embed an mp3 file into my html document:
<embed src="aharddaysnight.mp3" width="140" height="40" autostart="false" loop="FALSE"></embed>
In IE, this works fine, as an mp3 player with controls automatically shows up.
In FireFox, however, a pop-up appears that says additional plug-ins are needed. When I click on the option to install additional plug-in, it doesn't allow me to because of a security certificate error.
In Chrome, the player shows up, but the media starts playing automatically, even though the code says autostart "false".
Does anyone have a better way to embed mp3, or a fix to this problem?
I have tested this in Chrome and Firefox and works in both, with the fall back. However if it is a long file, like the 2 hour audio I am trying it stops playing. Hopefully it will help you and I will keep looking for my fix.
<audio controls="controls">
<source src="yourURL.mp3" />
<source src="yourURL.ogg" />
<!-- fallback -->
<embed type="application/x-shockwave-flash"
flashvars="audioUrl=yourURL.mp3"
src="http://www.google.com/reader/ui/3523697345-audio-player.swf"
width="650? height="0? quality="best"></embed>
</audio>`
Try this
type="audio/mpeg"
OR
type="audio/midi"

any common video format that will run on any browser?

please any one can tell me video format that play on any browser , with play/pause/stop buttons? i have the following code for .swf but i cant get any button to control.
<object width="400" height="40"
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/
pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
<param name="SRC" value="bookmark.swf">
<embed src="bookmark.swf" width="400" height="40"></embed>
</object>
You may want to take a look at something like jPlayer.
The current trend is to use HTML5 video to embed a player which is widely supported and does not require flash. This is particularly useful for devices such as the iPad/iPhone.
For browsers that do not support HTML, the pattern is to failover to a flash based version.
jPlayer handles a lot of this for you.
It will work if flash is instaled.
You can use Flash components to quickly setup a video player with controls
The HTML5 video tag is supported in all major browsers.(in Internet Explorer: from version 9) You can give that a try.

embeding a video on a website without controls

I am trying to embed a video on a website which will be used as an intro. Im interested in a way of embeding that video without a control bar (play,pause...). I can convert it to any format as I have the project file so compability isnt an issue. I have tried inserting it with tag in HTML5 and that works seamlessly but because of a bug in Chrome white color in the video becomes gray and that doesnt work for me because video background has to be white so it can be camouflaged with the rest of the website.
Interesting. I haven't seen the Chrome/white issue, but from the sounds of it... it's just in dev versions of Chrome? I'm basing this off the last comment from this post.
Looks like there was a patch, and it's waiting to be merged.
Not sure if these help in terms of using HTML5's video tag. If you don't care about the tag, you could always go with a Flash-based version using an .mp4 file. That way, whenever you're comfortable with Chrome's rendering... you could set it back up with the video tag.
Again, if you're ok with using Flash... you could pull it off like so (using Flowplayer):
<object width="600" height="338" type="application/x-shockwave-flash" data="http://whywouldyouclickthat.com/flowplayer/flowplayer-3.2.7.swf">
<param name="movie" value="http://whywouldyouclickthat.com/flowplayer/flowplayer-3.2.7.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"clip": {"url": "/yourDirectory/yourMovie.mp4", "autoPlay":true, "autoBuffering":true},"plugins": {"controls": null}}' />
</object>
Again, not sure if Flash is a deal-breaker here.

WMPlayer embed not playing video

In my company we link our site to videos provided by a partner company. They changed their video encoding from .FLV to .MP4 videos and the current video player on our site doesn't playe them. We changed it to Windows Media Player given that most of our customers are running windows and internet explorer, the embed code we used is this one:
<object>
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
name="VideoPlayer" ShowStatusBar="false"
EnableContextMenu="false" autostart="true"
width="426" height="285" loop="false"
src=[video_url] />
</object>
I see the WMPlayer displayed on the site and the video plays, but my clients only see the player displayed and the video doesn't play. We updated our clients flash plugin and still nothing. What could be the problem?
You need to install additional codecs on the client machine. There are numerous codec packs for that (search google). You can't do it automatically from a browser either as it requires an installer to run.
WMP is a pretty crappy solution anyways since you're basically screwing over anyone who visits your site with a Mac or Linux computer. There are numerous other ways to play MP4 including via Flash but also using new HTML5 features.
We ended up using Flow Player

Why does my embedded YouTube video work in Firefox, but not Internet Explorer?

I'm using the following code to display a YouTube video.
<object width="425" height="344">
<param name="movie"
value="**URL**">
</param>
<param name="allowFullScreen"
value="true">
</param>
<embed src="**URL**"
type="application/xshockwave-flash"
allowfullscreen="true"
width="425"
height="344">
</embed>
</object>
It works in Firefox, but why doesn't it in Internet Explorer?
I'm a totally new to web development, so I'm running into all these wonderful inconsistencies that you veterans are used to ;)
To elucidate, it doesn't work because the object tag is incomplete. Firefox gives up on the object element and uses the fallback old-school embed element instead. IE doesn't support embed so you get nothing.
An object element must at least have a type attribute telling it what plugin to use and a data attribute telling it what to send the plugin. In IE you also need to mirror the data attribute in a <param name="movie"> value inside the object because it runs plugins differently.
IE won't ‘stream’ partially-loaded Flash files this way though. To get that, you have to use an ActiveX classid instead of the type to tell it which plugin to use. If you care about this (and you might not: for small files, stub loaders, and files that are useless until complete, it makes no difference) then you have to start serving combinations of nested objects or embeds, which quickly becomes confusing.
Try this:
<object type="application/x-shockwave-flash" data="VID_URL" width="425" height="344">
<param name="movie" value="VID_URL" />
</object>
Previously wasted a few hours working through the same issue. Different cause though...
For IE9, YouTube embeds (at least iframes) were not working because I had previously added Tracking Protection to IE for Google ad servers. In this case, I had to disable the tracking protection (Safety > Tracking Protection) or click the button immediately to the right of the address bar ('Some content is filtered on this site') that alerts end users to filtered content.