视频播放测试(video.js播放器代码)

添加视频播放的代码要在文本格式下编辑,不能在可视化界面编辑,切换模式在编辑文章的右边有个切换选项

外链说明文件

Videojs HTML5 Player For WordPress – WPHowTo

例子如下

[删除这段文字videojs_video url=”gdvideo.southcn.com/f0a16be3c40071eebffb5017f0f80102/a00cfe5bfea34d678de38f01dee6e2ce-ff5c236236cc6728d2fcaea29f5dba3d-hd.mp4″删除这段文字]

带宽度属性控制

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″ width=”480″删除这段文字]

 

 

 

 

以下为外链说明截取片段,带参数说明

Video.js Player Setup
In order to embed a video insert the following shortcode into a post/page.

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″删除这段文字]
You need to specify the location of a MP4 video file in the url parameter (H.264 encoded). This parameter is mandatory in order to embed a video using this plugin.

Video Demo
screenshot showing a demo of videojs html5 player for wordpress
Video Shortcode Options
Videojs plugin accepts a wide range of shortcode parameters that you can use to customize the video playback and controls.

WebM
“webm” parameter allows you to specify the location of a webm video file. For example:

 

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″ webm=”https://example.com/wp-content/uploads/video/vid.webm”删除这段文字]

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″ webm=”https://example.com/wp-content/uploads/video/vid.webm”删除这段文字]
Ogv
“ogv” parameter allows you to specify the location of a ogv video file. For example:

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″ webm=”https://example.com/wp-content/uploads/video/vid.webm” ogv=”https://example.com/wp-content/uploads/video/vid.ogv”删除这段文字]
Width
“width” parameter allows you to set the width of the video. For example:

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″ width=”480″删除这段文字]
Controls
“controls” parameter allows you to show/hide video controls. By default video controls will be displayed. If set to “false” controls will be disabled. For example:

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″ controls=”false”删除这段文字]
Preload
“preload” parameter allows you to specify if and how a video should be loaded when the page loads.

“auto” – the video should be loaded entirely when the page loads (default)
“metadata” – only metadata should be loaded when the page loads
“none” – the video should not be loaded when the page loads

For example:

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″ preload=”metadata”删除这段文字]
Autoplay
“autoplay” parameter allows you to automatically play the video when the page is rendered. For example:

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″ autoplay=”true”删除这段文字]
Poster
“poster” parameter allows you to set a poster image for the video. For example:

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″ poster=”http://example.com/wp-content/uploads/poster.jpg”删除这段文字]
Loop
“loop” parameter allows for the looping of the video file (The video will start over again, every time it is finished). For example:

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″ loop=”true”删除这段文字]
Muted
“muted” parameter allows you to mute the audio output of the video. For example:

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.mp4″ muted=”true”删除这段文字]
Video.js HTTP Streaming
The plugin supports the m3u8 file format that can be used for HTTP Streaming. It allows you to play HLS, DASH, and other HTTP streaming protocols with Video.js, even where they are not natively supported.

[删除这段文字videojs_video url=”https://example.com/wp-content/uploads/video/vid.m3u8″删除这段文字]
Video.js Player Add-ons
Video.js HTML5 Player plugin comes with add-ons that you can use to enhance its functionality on your website.

Disable Right Click
This add-on allows you to disable right click on the Video.js player.

disable right click on the video.js player
Videojs Disable Right Click
Videojs Disable Right Click
Disable right click on the Video.js player.

 

发表评论

<