[WordPress] 外掛分享: HTML5 Video Player for WordPress

首頁外掛目錄 › HTML5 Video Player for WordPress
200+
安裝啟用
★★★★
4.3/5 分(3 則評價)
3323 天前
最後更新
問題解決
WordPress 2.7+ v4.5.5 上架:2016-08-21

內容簡介

這是一個用 Video.js HTML5 播放器庫建立的 WordPress 外掛程式。使用了較美觀的皮膚並已更新至 Videojs 5.0+ 版本。允許在文章或頁面內嵌 HTML5、Flash 影片。支援播放 HTML5、FLV、HLS、m3u8、mp4、Youtube、Dailymotion 和 Vimeo 影片。

此外掛與 WordPress 核心的 短碼兼容且可以與 WordPress 的「插入媒體」按鈕搭配使用。

由於 Videojs 沒有為 WordPress 更新到 5.0+ 版本,因此我決定自行更新並分享於 WordPress 外掛程式庫內。

請參考 videojs.com 網站獲得更多資訊。

使用 [videojs] 短碼,你可以在文章或網頁中加入影片,並可使用以下選項:
也可以使用 WordPress 預設的 短碼。
相容於舊版 Videojs。
新增 HLS(HTTP 直播流)的直播影片播放功能,支援 m3u8 格式 (專業版)。
皮膚按鈕生成器 - 可以產生你自己的皮膚或從預建的皮膚中選擇(專業版)。

使用影片短碼:
使用影片短碼

Video Pro - 皮膚按鈕生成器:
使用 Video Pro,你可以建立自己的皮膚,或是選擇預建的皮膚範本開始,幫助你打造自己的皮膚。現在還可以播放 HLS(HTTP 直播流)的直播影片,支援 m3u8 格式

HLS(HTTP 直播流)m3u8 範例:Video Pro 皮膚按鈕生成器 HLS 範例(m3u8)

了解更多資訊: Video Pro 皮膚按鈕生成器.

範例:Video Pro 皮膚按鈕生成器範例

Video Pro 範例

影片短碼選項
mp4

使用 h.264/MP4 格式的影片位置。

[videojs mp4="http://vjs.zencdn.net/v/oceans.mp4"]

ogg

使用 Theora/Ogg 格式的影片位置。

[videojs ogg="http://vjs.zencdn.net/v/oceans.ogg"]

webm

使用 VP8/WebM 格式的影片位置。

[videojs webm="http://vjs.zencdn.net/v/oceans.webm"]

Flash FLV

使用 FLASH/FLV 格式的影片位置。

[videojs fvl="http://www.sample-videos.com/video/flv/480/big_buck_bunny_480p_10mb.flv"]

youtube

使用 Youtube 格式的影片位置。

[videojs youtube="https://www.youtube.com/watch?v=mcixldqDIEQ"]

poster

影片的封面位置。

[videojs poster="http://vjs.zencdn.net/v/oceans.png"]

width

影片的寬度。

[videojs width="640"]

height

影片的高度。

[videojs height="264"]

preload

在使用者點擊播放前即開始載入影片,可選擇 'auto'、'metadata' 或 'none'。當瀏覽器或行動裝置允許時, 'auto' 會預先載入,'metadata' 僅載入 meta 資料。

[videojs preload="auto"]

autoplay

當媒體準備好時立即播放,可選擇 'true' 或 'false'。

[videojs autoplay="true"]

外掛標籤

開發者團隊

⬇ 下載最新版 (v4.5.5) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「HTML5 Video Player for WordPress」→ 直接安裝(推薦)

原文外掛簡介

A video plugin for WordPress built on the Video.js HTML5 video player library. Updated for Videojs 5.0+ with a more beautifull skin. Embed HTML5, Flash video in your post or page. Play HTML5, FLV, HLS, m3u8, mp4, Youtube, Dailymotion, Vimeo.
Compatible with the WordPress core shortcode and work with the WordPress insert media button.
Videojs didn’t update their Videojs to 5.0+ for WordPress and i decided to do it and share it on the WordPress plugins page.
View videojs.com for additional information.

Use the [videojs] shortcode in your post or page using the following options.
Can use the WordPress default shortcode.
Compatible with the old Videojs version.
NEW HLS (HTTP Live Streaming) Live Streaming Video m3u8 (Pro Version).
Skin Builder – Generate your own skin or choose bettween prebuild skins (Pro Version).

Using video Shortcodes
Using video Shortcodes
Video Pro – Skin builder
Build your own skin with Video Pro, Allo you to create your own skin or use the prebuild demos skins to start and help you creating you own skin. Now play HLS (HTTP Live Streaming) like m3u8 streaming video
HLS (HTTP Live Streaming) m3u8 Demo: Video Pro skin builder hls demo (m3u8)
more infos at: Video Pro skin builder.
Demo: Video Pro skin builder demo
Demo Video Pro

Video Shortcode Options
mp4
The location of the h.264/MP4 source for the video.
[videojs mp4="http://vjs.zencdn.net/v/oceans.mp4"]

ogg
The location of the Theora/Ogg source for the video.
[videojs ogg="http://vjs.zencdn.net/v/oceans.ogg"]

webm
The location of the VP8/WebM source for the video.
[videojs webm="http://vjs.zencdn.net/v/oceans.webm"]

Flash FLV
The location of the FLASH/FLV source for the video.
[videojs fvl="http://www.sample-videos.com/video/flv/480/big_buck_bunny_480p_10mb.flv"]

youtube
The location of the YouTube source for the video.
[videojs youtube="https://www.youtube.com/watch?v=mcixldqDIEQ"]

poster
The location of the poster frame for the video.
[videojs poster="http://vjs.zencdn.net/v/oceans.png"]

width
The width of the video.
[videojs width="640"]

height
The height of the video.
[videojs height="264"]

preload
Start loading the video as soon as possible, before the user clicks play.
Use ‘auto’, ‘metadata’, or ‘none’. Auto will preload when the browser or device allows it. Metadata will load only the meta data of the video.
[videojs preload="auto"]

autoplay
Start playing the video as soon as it’s ready. Use ‘true’ or ‘false’.
[videojs autoplay="true"]

loop
Causes the video to start over as soon as it ends. Use ‘true’ or ‘false’.
[videojs loop="true"]

controls
Use ‘false’ to hide the player controls.
[videojs controls="false"]

muted
Use ‘true’ to initially mute video.
[videojs muted="true"]

id
Add a custom ID to your video player.
[videojs id="movie-id"]

class
Add a custom class to your player. Use full for floating the video player using ‘alignleft’ or ‘alignright’.
[videojs class="alignright"]

Tracks
Text Tracks are a function of HTML5 video for providing time triggered text to the viewer. To use tracks use the [track] shortcode inside of the shortcode. You can set values for the kind, src, srclang, label, and default attributes. More information is available in the Video.js Documentation.
[videojs][track kind="captions" src="http://vjs.zencdn.net/v/oceans-captions.vtt" srclang="en" label="English" default="true"][/videojs]

All Attributes Example
[videojs mp4="http://vjs.zencdn.net/v/oceans.mp4" ogg="http://vjs.zencdn.net/v/oceans.ogv" webm="http://vjs.zencdn.net/v/oceans.webm" poster="http://vjs.zencdn.net/v/oceans.png"
preload="auto" autoplay="true" width="640" height="264" id="movie-id" class="alignleft" controls="false" muted="true"][track kind="captions" src="http://example.com/path/to/captions.vtt" srclang="en" label="English" default="true"][/videojs]

Compatible with WordPress core video shortcode
The location of the h.264/MP4 source for the video.

Video.js Settings Screen

--------------------------

The values set here will be the default values for all videos, unless you specify differently in the shortcode. Uncheck “Use CDN hosted version?” if you want to use a self-hosted copy of Video.js instead of the CDN hosted version. Using the CDN hosted version is preferable in most situations.
If you are using a responsive WordPress theme, you may want to check the Responsive Video checkbox.
Uncheck the Use the shortcode? option only if you are using WordPress 3.6+ and wish to use the tag for MediaElement.js. You will still be able to use the [videojs] tag to embed videos using Video.js.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon