stomme_poes — 2012-08-09T11:26:14-04:00 — #1
I'm losing some hair and the search engines don't seem to have a straightforward answer for me.
I'm rewriting some nasty decade-old code in a CMS which, via templates, creates HTML documents and other things... the current one I'm working on is replacing hoary decade-old Flash-embedding code with something modern. I chose SWFObject version 2.2 (at this time, the current version). It's a smallish player that should do everything needed (which isn't much. embed videos.).
I've got .swf files running fine (yay). Flv files however do nothing.
How do I get an FLV to play? The back-end code and templates are rendering everything to the document as they do for the .swf movie, so I have good code and I have a file.
I have found many sites saying someone with a copy of Flash can create an .swf to run the .flv. I can't tell clients to go buy Flash and make these .swf containers. They just want to use the movie files they already have. This should be possible?
I have found much on the SWFObject discussion areas where, if you use the dynamic loading method, you can use the flashvars variable to point to the .flv file... though I'm still unsure where the .swf file used in those codes is coming from. But I am not using the dynamic method.
Without telling the clients they can't use their files as-is, and without getting a whole other player (as much as I read that JWPlayer can run FLVs, their own site states that SWFObject can do this too... the dynamic embedding way anyway. For posting simple videos SWFObject ought to be enough. I'll exhaust all my options before switching the code over to another player), how can I get the static embed method of SWFObject to play .flv files?
I keep thinking this is possible. If it isn't, I'll rewrite everything to use a whole different (and larger) player. But I'd rather not.
Thanks in advance,
hexburner — 2012-08-10T15:55:42-04:00 — #2
You cannot embed FLV files directly into HTML, you will need an SWF container to play the video.
You could create your own video player, which will probably take more time than rewriting some code to embed video's using, e.g., JWPlayer.
Even if you choose to create your own video player or use another SWF container to play the video, you'll probably need to rewrite something somewhere to make the process somewhat user friendly.
I'd opt for JWPlayer, VideoJS, Flowplayer, ... or any other existing video player.
stomme_poes — 2012-08-12T14:02:34-04:00 — #3
Thanks for the reply.
So when JWPlayer's web site says you can use SWFPlayer to also play FLVs, they are wrong? Or they assume someone is using two players (SWFObject and JW)?
hexburner — 2012-08-22T04:03:41-04:00 — #4
I think you're mixing up SWFPlayer with SWFObject and JWPlayer.
JWPlayer (the video player) can play FLV's, and SWFObject is not a video player but provides an easy way to embed the JWPlayer in your website.
JWPlayer is an SWF file (Flash), more specifically player.swf and is the video player.
So, you can use SWFObject to embed JWPlayer in a website.
stomme_poes — 2012-08-26T08:16:45-04:00 — #5
It ended up being complicated and apparently will never work on our servers until I figure out where the mismatch is.
The client has stated they cannot use JWPlayer because of commercial license costs (they are a school but count as "commercial" apparently). Their current code does have a file called player.swf which seems to play FLVs on their site. I have not figured out why it works there, and nobody seems to know where this file came from.
I have copied all their current (non-SWFPlayer) code from their server, and it does not run on our servers (player.swf runs but complains). Until I figure out why there is a difference, I cannot continue to rewrite the code to use SWFObject anyway. I don't have a copy of Flash so I have no idea what is in their player.swf file, only that when sitting on their servers this file seems able to play FLVs. If they have some other, existing player like Flowplayer anywhere, I cannot find it, and they claim they aren't using anything other than the code in this directory. :/
I'm hoping it's something silly like a MIME-type mismatch.