Embedding video in wordpress
I am creating video/image uploader using wordpress as it seems to be the easiest way to do based on my clients demand. The image works fine but I am having trouble with video. The video uploads and puts up a link. Is there a way to automatically embed a video in 开发者_如何学Goa page regardless of its format. I looked into several plugins but most of them embeds online videos, like YouTube, but none of them gives option to embed video that is uploaded by a user.
In HTML5 there is a <video>
tag. However not all browsers can play all video files and this is not going to change in the near future. You can list multiple video files in the tag and the first playable one could be used by the browser. So you could encode in webM and h264. That will get the majority of browsers. Lots of info.
If you want broad video support then you will have to use an intermediary player technology like flash. This is what YouTube does depending on your browser.
So check out the open source flash player FlowPlayer. There is already the FV Wordpress Plugin that leverages it for playing media files.
Handling playback of video, and allowing people to upload their own is a complicated matter. There is a ton of stuff that you need to account for, you may need to do type conversions etc. I tried going this route at one point, but just ended up relying on YouTube. They do all the hard work. You embed links. Best of luck with whatever you try.
精彩评论