Add a video to the blog post
We can include a video in a blog post to make it available to readers.
To add a link to a video to a blog post, we can link directly to a Flash video if you have the URL for the video file. A Flash video usually has a *.swf file extension. If we are linking to an embedded video, such as a video in a YouTube page, copy the information for embedding the video and paste it into the HTML page of the rich text editor.
- Create a blog entry.
- To insert a Flash video:
- Click the Insert Flash Movie icon on the toolbar of the rich text editor.
- Enter the URL for the Flash video.
- Override the default display settings by entering values in pixels for the width and height, and for how much vertical space to display above and below the video.
- Use the Preview area to see how the video appears in the blog entry.
- To embed a video, such as video from a YouTube page::
- Copy the <embed> object information for the video to use and paste it into the editor.
Many video-sharing websites now provide iframe code for videos by default. It is still possible to get the old embed code although, for example on YouTube, we can do so by checking the Use old embed code option. Both iframes and old embed code can be pasted directly into the rich text editor. To embed a video from YouTube, click Share > Embed Copy the contents of the text field and paste it directly into the editor without switching to source view. The rich text editor automatically detects the object is an iframe and inserts an iframe object in the editor. If the old embed code is used instead, the editor automatically detects that this object is a flash video and a flash object is inserted in the editor. When the page is saved, the video contents can be viewed within the page.
If we are inserting an example of the video markup, it is important that you paste it directly as it appears in the video sharing website. Do not add any newlines, or spacing, or the automatic detection feature in the editor might not get triggered. Examples of video markup that are automatically detected are:
<iframe width="420" height="315" src="http://www.youtube.com/embed/-mcbsrAXlAg" frameborder="0" allowfullscreen></iframe>
Or:
<object width="420" height="315"><param name="movie" value="http://www.youtube.com/v/-mcbsrAXlAg?version=3&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/-mcbsrAXlAg?version=3&hl=en_US" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object>
If we try to paste video content into the rich text editor and it is not automatically converted into a flash video or iframe, try pasting the video sample into Notepad or some other plain text editor, and then copy it from there into the rich text editor. All samples that are pasted directly from the Share feature in applications such as YouTube, and Vimeo work as is.
- Add any other text to display in the entry.
- Save the entry.
What to do next
When users view this post, they can view the Flash video or the embedded video.
Parent topic:
Create a blog entry