Recent Topics

1 Apr 14, 2009 09:23    

A long time ago I started this, and finally got it done - yay! Basically it is a complete replacement for the real videoplug plugin that gives you quite a bit more.

Ask A Ninja, Blip, Break, Dailymotion, Vimeo, Youtube ... google videos, LiveVideo, Metacafe, Revver ... your own SWF files. That's eleven different embeddables. The first 6 can't use "special code" or "URL" anymore because not all their videos have the same width/height ratio, so you will have to use the "embed code". But don't worry: your previously embedded videos will still work the way they do now. The next 4 can go by "special code" or "URL" or "embed code" because they seem to always have the same width and height.

Did I mention how they will scale to fit your screen? Yeah. You set a parameter to the number of pixels you want and all videos will be that width. Did I mention how you can turn off this or that or the other thing? Yeah. The admin gets to say if, for example, Metacafe will be allowed or not. Also the admin can say if registered bloggers can turn off the toolbar if they don't want to see it.

Not bad eh? But wait! There's More!!!

Both Vimeo and Youtube offer a few extra options when you select the embed code, this plugin offers the same set of options. Not "per video" - you set them for your particular blog. - support here or in my hackblog. Have fun!

2 Apr 14, 2009 23:23

Hi Edb,
does this fix the inability for embedded youtubes(or whatever) working in the rss feed coming out of b2evo?

3 Apr 14, 2009 23:44

I'm not sure. I'll have to subscribe to myself to see. brb...

Nope! I was supposed to look at that too :( So that'll be cause for 11.2.1 to happen, though honestly I'm not sure how to fix it.

4 Apr 20, 2009 11:43

Hi ed. Somebody here showed me how to add the AM music player to the video plugin. How can I do that in yours?

5 Apr 20, 2009 16:25

Dunno. Can you send me the file that was your combined version so's I can see what made it go then figure out how to blend it in?

7 May 15, 2009 19:25

I'm trying to embed an swf, but nothing happens.
In the page source I get the line like this:

<div class="videoblock"><object type="application/x-shockwave-flash" style="width:512; height:256;" data=""><param name="movie" value="" /></object></div>

and that's it. I see nothing. I tried several swf's, each worked if I dragged them directly into ffox.

I'm trying to embed an swf player to play locally hosted flv's. I have no idea how to do that so at this point I'd happy to see any kind of swf embedded in a post...

EDIT: Damn... in IE it works... FFox shows nothing, not even the set frame for the swf...

8 May 15, 2009 20:32

See what happens if you add either "px" or "%" to the width and the height units.... eg 512px 256px

9 May 15, 2009 20:39

John wrote:

See what happens if you add either "px" or "%" to the width and the height units.... eg 512px 256px

Good idea. The plugin asks for an input then just spits it out, so unless a browser assumes something or the user provides it then there will be no units for width and height. I'll go with pixels as the "official" units.

10 May 15, 2009 20:39

Hmm... now it sets the frame size properly in IE, but still nothing in FFox.
One small step ahead, thanks. :)

12 May 15, 2009 21:00

Here is a testpage:
It should create a black, empty box where the flv player is.

But maybe I'm approaching the problem in a wrong way.

This is the example what I'd like to reproduce in a post:

I looked inside the videoplug and I found the preg_replace which makes the embedding.
In the example page above its not a single line which sets up the player but several. Is it possible to replace stuff with a multiline string?
(I've already modified the header so it includes that javascript.)

13 May 15, 2009 21:10

I think what you're trying to do is embed a .flv file, which isn't a .swf file - correct? If so you can't do that via the videoplug plugin. As you've figured out ;)

I'm pretty sure the thing to do is disable xhtml validation checking (or maybe enable posting javascript ... or something) then just post the javascript required to use your YTPlayer.swf to play your .flv file.

14 May 15, 2009 21:12

Zoltan wrote:

... I looked inside the videoplug and I found the preg_replace which makes the embedding.
In the example page above its not a single line which sets up the player but several. Is it possible to replace stuff with a multiline string? ...

Sure. Anything is possible eh? The problem is it becomes dependent on (a) javascript and (b) the exact script for any given .flv player. I've tried to find a generic way to embed .flv files without javascript dependency or having to use a specific type of script but couldn't, so I gave up on that idea.

Anyway it is probably easier to do it without using the plugin.

15 May 15, 2009 21:22

In the testpage I'm trying to load an .swf which is the player. Sure that won't play anything, but at least it should show up. As it does in IE.

I not sure if dependency on a javascript is bad. I mean its there, next to the php, it won't go away.

I've just found a docs on the topic:

I'll try to understand whats going on, and try to customize the videoplug. I'd rather keep using it to have a unified interface to insert all kind of videos.

16 May 15, 2009 22:41

For me on the testpage in Firefox I saw a black box with a rotating thingie in it that is supposed to mean "loading" but to me means "this needs javascript", and I block javascript by default (NoScript addon for Firefox ;) ). Plus I wouldn't say PHP is "next to" javascript. PHP is a server-side and javascript is client-side, which is kinda far apart eh? So I figure why should I let webs use my computer to make their pages? Not to mention the potential negative aspects of allowing anyone and their website to run scripts...

* As a rather exciting benefit of this, I never see google ads :)

Anyway I never found an xhtml-compliant javascript-free way to reliably embed .flv files, so I gave up. "embed" is not valid code is what I mean. So basically you have a couple of choices: modify the plugin to suit your tastes, or just post the script that makes the .flv player of your choice work. To me the easier method is to post it as-is, but hey that's just my opinion.

17 May 15, 2009 22:53

Wow you see the rotating thingy in firefox?! So it must be something going wrong on my end...
Well, then that's that. Thanks for the help, it seems that problem isn't related to this thread. :)

18 May 16, 2009 00:36

The swf plays, and it plays in all non IE browsers ( I don't have IE ) on a Mac.
Your issue is getting the Play/Stop etc javascripts to work and therefore provide controls for your swf.

Good luck

19 May 16, 2009 05:12

Zoltan wrote:

Wow you see the rotating thingy in firefox?! So it must be something going wrong on my end ...

Ah I'm still on FF2 so it might be FF3 isn't showing even the box. Still leaves you with the issue of getting it to actually play the file though eh?

Zoltan wrote:

... it seems that problem isn't related to this thread. :)

That sounds about right now that we have a full understanding of what you're trying to get done, though the bug about not having units was nice to learn about. er... not that bugs are nice :roll:

Slightly OT: I kinda like xhtml-compliant code and stuff that'll work for "anyone using anything", but others have asked for embedding .flv files and some folk would like to see some educational sites in that plugin and wow I'd like to add "TED talks". But javascript dependence isn't a good idea, and validatable code is. So I'm kinda torn on the right way to do the next upgrade. There are a couple of different javascripts for using the embed tag with a .flv file, and there might even be something in the jquery library that'll make it easy. And hey if someone else is okay with varying from the 'standards' then that's their call eh? Dunno which way to play it...

Anyway if you do manage to get the plugin working with embedding .flv files I'd love to see your changes and the scripts you added to the head section. Adding the scripts via the plugin isn't all that hard is the thing, so I dunno.

20 May 16, 2009 10:27

I see your dilemma. Unfortunately flash is the most accessible way to play videos. So I think if your plugin has an admitted and optional non standard solution for this then every user can decide which way to go.
If its important they would hack something in anyway. With you supporting this, at least it would be done properly. :)

I'll try to make this work and post the results.

PS: TED talks are great!

21 May 16, 2009 10:32

Cool - looking forward to it.

Alternatively is there a way for you to make your .flv file be a .swf file? I don't know anything about that stuff. All I know is every now and then I grab a .swf game or whatever that amuses me, and John made the bits that allows embedding .swf files, and I grabbed it when I was going to town with the original plugin. Oh and I know 2 of the flash games I clipped out of my IE cache won't play now that I have 2 monitors on one computer. Go figure...

22 May 16, 2009 10:51

As far as I know, the flv is the video data and the swf is the player interface. I heard nothing about embedding flv in an swf, but I'm no flash expert either. I'll look around to see if this is a viable option.

That two monitor issue is weird...

23 May 16, 2009 13:10

Well I'll be darned. It doesn't work! Like, I have a handful of .swf files that just work. I double-click them on my computer and they do whatever it is they're supposed to do (except for the one that gets broken because of the dual monitor thing). So I uploaded one based on it isn't very big (and got an error in my file manager which may be due to a hack I've done), tried to post it, and got a black square. Not even the "loading" thingie.


Reckon I ought to hack it fairly quick but I got 4 nights of work to deal with soon. Might be only 2 cuz the third shift is when they refuse to announce that they'll be announcing layoffs, but I'm kinda planning on 4 cuz I like living indoors...

24 May 16, 2009 13:25

No hurry mate, we can manage better without flash than you without a job. ;)

25 May 16, 2009 14:02

I can load your playable video into a post by saving it as an html page and importing it into your post via object tags...

<object data="" type="text/html" width="###" height="###"></object>

There are some issues with this and that crappy IE browser :)
While not your file, here is an imported xhtml page playing in a post. There are some handy related links that help sort out IE...

26 May 16, 2009 14:33

Importing an html page... interesting idea!
Your test page works great in IE... but I only get a black box in ffox, no photos... It seems that I have to reinstall ffox.

27 May 16, 2009 14:38

I think your FFox is stuffed :)

I viewed it on an old Win box and it works fine, IE, FF and Opera

28 May 16, 2009 14:48

Maybe it's just me, you can get swf's that play flv's without requiring js? ( eg/ [url=][/url] )

The html for it looks a tad like :

<div id="tv">
	<div id="tv_screen">
		<object id="myplayer" width="324" height="230" type="application/x-shockwave-flash" data="/videos/flvplayer.swf?file=home/showreel.flv&amp;image=/videos/home/home.jpg&amp;bufferlength=5" title=" whatever ">
			<param id="fred" name="movie" value="/videos/flvplayer.swf?file=home/showreel.flv&amp;image=/videos/home/home.jpg&amp;bufferlength=5"/>

			<a href="">Macromedia Flash Player (tm) 7 required</a>


29 May 16, 2009 20:35

FYI it was the Adblock addon which prevented me seeing the flash stuff. Not even emptying the filter list helps, I had to disable the whole addon...

EDIT: It's prolly because I'm carrying this profile since dunno ff1.0... I've just started using Adblock Plus and now flashes show up alright.

30 May 16, 2009 22:10

:) And I was going to mention Add On's
Glad that's sorted

31 May 18, 2009 09:34 flash. I keep using quicktime for the time being.
Here is where I'm at:

The flash video doesn't work in IE and Opera, god knows why.

Here is the modified videoplugin:

The flash video part is half baked with sh.t hardwired so beware. It uses the ytubeplayerHD:

I tried OS FLV too ( ) but the most I got was a "movie not found" text message, so I gave up.

However, the Quicktime embedding should work allright.

And I hope EdB won't get a heart attack seeing what I've done to his plugin. :)

32 May 18, 2009 09:56

You can add Safari to the list of browsers that won't play the Flash.

33 May 18, 2009 16:49

Oh I forgot to mention that the "Texturizer" plugin screws up the hacked in jscript block when it replaces the quotation marks with typographic ones.

34 May 18, 2009 16:51

Zoltan wrote:

... And I hope EdB won't get a heart attack seeing what I've done to his plugin. :)

Nope. Plugins are made to be built on :D I've got at least 3 more hours, and maybe 2 more nights at work before I can do anything with it, and I certainly look forward to that! I mean, getting .flv files to work in even one browser is nicer than none eh? Even if it requires clicking the "play" button.

OTOH the original at John's web is working so I dunno. There are so many variables that seem to affect this desired outcome. Heck it seems like even what a .swf file actually is might be open to interpretation. Cuz for example I can click a link to a .swf in a directory and it'll play in a browser, but not embed in a post. And is .swf a player or a file, and if it is a player then how come I have .swf files that actually play - no .flv associated with it? All I know is I don't know enough...

Anyway I now have the file you shared, and will learn from it and ¥åßßå's contribution here. ¥åßßå is at his best when his word count is at it's least, and this bit here is lean on words so yay! In a strange sort of way I hope they lay me off so I can waste away lots and lots of time pretending to know something about coding stuff. Until the sheriff kicks me out :roll:

... but pretending to not use certain words by mis-spelling them is lame. Much easier to rephrase eh?

Form is loading...