Extension:TimedMediaHandler/VideoJS Player/zh



The VideoJS Player is the replacement video player for MediaWiki and will soon replace the older video player featured on Wikimedia projects.

它基于VideoJS，具有更现代、更快的UI，并兼容移动设备和HTML5.

你可以在維基媒體基金會的桌面版專案，透過你的偏好設定頁作为Beta版本啟用這個功能.

Usage


There is both an audio and video player. You can find examples of both players on this page. Once launched you will see a control bar when interacting with the video.



The controls in order from left to right are:


 * VideoJS play pause control.png Play/pause control
 * VideoJS volume control.png Volume control
 * Playback position
 * Remaining playback time
 * VideoJS subtitle control.png Subtitle language selector and subtitle style controls
 * VideoJS resolution control.png Resolution selector
 * VideoJS picture-in-picture control.png Optional Picture-in-Picture control
 * VideoJS fullscreen control.png Fullscreen control
 * VideoJS file description control.png Info button to take you to the file description page

Mouse and keyboard controls

 * Click the play icon above the thumbnail to begin playback of the media file.
 * Right click or middle click the thumbnail to open the file description page
 * Play/Pause the player with a single mouse click inside the player window
 * Double click the player window to enter or leave fullscreen mode
 * The following keyboard controls are available:
 * k / spacebar-key : Play/pause the media playback
 * f-key : Enter/Leave fullscreen
 * m-key : Mute the audio
 * The player is fully keyboard accessible using tab, enter and spacebar keys

原因
Wikimedia自2010年以来使用的播放器有几个显著的缺点，这限制了我们进一步的改进.


 * 在移动设备上无法正常工作，而现在我们的大多数读者都使用移动设备.
 * 不被其他人廣泛使用.
 * 寫在HTML5視頻被標準化之前.
 * 使用自己的字幕系統.
 * 編寫時與Internet Explorer 6相容，並使用了當時的JavaScript標準.
 * 在我們自己的JavaScript堆棧開發之前編寫.
 * 自2011年以来几乎无人维护.

已知問題

 * 有些檔案的字幕會失效. 我们放弃了在字幕中对wikicode标记的支持， 因此建议您重写这些字幕(T224258).
 * Audio opens a dialog rather than displayed inline. This is a deliberate change, that will in future allow us to display transcriptions for audio. Please see T246035.

视频播放器仍在开发中，但若您发现任何问题，请在讨论页上报告，或在Phabricator中存档.

Developers
Developers working on features that use the Video.js player will need to initialize and configure it appropriately. Below is an example of typical usage.

Basic Configuration Example

 * Note, this is outdated and should be reworked to make use of our player wrappers, which apply consistent options and settings for videojs playback.

The  can also be provided in the HTML  element instead of in JS:

Advanced configuration with Ogv.js support
If you need cross-platform playback of OGG or WebM files (many files in Commons are in these formats), you can use the Ogv.js plugin for Video.js, which is also included in TimedMediaHandler. Example configuration: