By James Kanjo
Description
With the traditional Video Player, you need to manually inject your video's url into the html code. This also means you need an individual code block for each song you want to play.
This is very tedious, and frankly, too complicated for less advanced users. So I've expanded upon the original code, and made it possible to dynamically play videos as specified in the URL:
Code
The video player can play *.flv files and H.264 encoded files.
[[iframe http://snippets.wdfiles.com/local--code/code:video#VIDEO-URL frameborder="0" scrolling="no" height="320px" width="440px"]]
To make the player automatically start playing when the page loads, just append #autoplay to the video's URL. For example:
[[iframe http://snippets.wdfiles.com/local--code/code:video#http://squark.wdfiles.com/local--files/dev:9/video.flv#autoplay frameborder="0" scrolling="no" height="320px" width="440px"]]
In action
Thanks to tsangk for this great snippet: conditional-blocks
text above inserted with:
[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]
Other snippets posted by James Kanjo
Rate this solution
If you think this solution is useful — rate it up!
It seems the height and width options don't work. Any ideas? Also, is there a way to force the video to start in full screen mode? I've got a video running for my upcoming Haunted House volunteer project.
Thanks,
George
United Volunteers of Maine
See our Haunted House info at: http://uvm.wikidot.com/projects-hh/
I can create the same video as a avi, perhaps I could upload that to Youtube and embed from there?
- Rob, which SWF/FLV player do you use?
~ Paul
It seems to be having problems playing my .swf file. When you click play to says '10' with the spinning circle, nothing happens.
Template: http://hobstarcs.wikidot.com/video:_template
In action: http://hobstarcs.wikidot.com/video:1
Actual file: http://hobstarcs.wikidot.com/local--files/video/How-To-Upload_Images.swf
File seems to be fine, need a little help please. :)
It would be easier to help if you had page options turned on so we could view source, files, etc.. In looking at the HTML source, I see you're using a SWF instead of an FLV. Most SWF files require a separate FLV file unless you create the SWF so it has the video and player in the same file. I also found a small typo when viewing the HTML source:
There's an extra " in the height parameter. I doubt that's breaking things, but you never know…
I can try this later today with a variety of SWF/FLV files to see if I can narrow it down.
-Ed
Community Admin
I downloaded the swf to my site and tried to play it with the SWF/FLV player I normally use (I don't use James' snippet). However I am getting an error message from Flash Player 10 so something seems to be wrong with the source. You might try re-creating the swf file if you can.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Great,
Used to good effect here (click on "▼ Upload Images, How To" to view)