Implemented in 4.2. Some may ask why we didn't just reject this request and use another party's solution like XFMG? From our tests with such HTML5 players, it was possible to playback and/or download such media without forum permissions, if the URL was known. This meant that forum owners would be unable to paywall their media content in those solutions. Those solutions also transcoded to formats currently protected by patent, again limiting the forum owner's ability to paywall the media content.
In VaultWiki 4.2, audio and video wiki attachments are playable inline if embedded with the FILE BB-Code, provided that:
- You have up-to-date ffmpeg, ffprobe, and php binaries accessible and executable by PHP. The path must be configured in Options > VaultWiki: Content Types.
This approach was taken because:
- Uploaded attachments must be hidden from users who don't have permission. Because of this, a custom streaming solution is needed.
- Due to the custom streaming solution, we must ensure that uploads are converted into a special format, even if the uploaded format would be playable on its own.
- Especially for videos, certain patents may prohibit you from using permissions to control playback, unless you purchased separate licenses for various file formats. Converting to an internal format that uses open-source technologies bypasses this.
We made some changes to the uploader to generally allow for chunked uploads of very large files (in case you wanted to upload a file of several hundred MB). To make use of this, you will first need to increase the VaultWiki's global attachment size limit (in the Options) as well as the size limits for the desired filetypes. You will also need to configure the filetype as being audio or video.
Due to the extra overhead involved in large media files, playable attachments are not tracked in version history. For this reason, you may wish to Protect such attachments.
To accommodate audio/video, the FILE BB-Code has been updated with new options:
- time=Timecode1[-Timecode2][,...TimecodeN1[-TimecodeN2]]
You can chain any number of timecodes (format: 00:00:00) - playlist-title=[Title]
Display Name for a Playlist - playlist=[Prefix:Title]
for a wiki container whose audio/video children are the playlist items, ordered by the container's sort - playlistid=[WikiType]:[ID#]
for a wiki container whose audio/video children are the playlist items, ordered by the container's sort (mostly useful for personal feeds which are normally only accessible by ID) - playlist-entry=[Prefix:Title][,DisplayText][,...TimeCodeN1[-TimecodeN2]]
Playlist entries are for building a custom playlist using the BB-Code only. You can stack multiple playlist-entry uses in the same FILE, and they will be listed in the order entered. If the FILE usage does not match an entry in the playlist, the playlist will be played after the FILE's media. Only the first argument Prefix:Title is required, which specifies the audio/video for that entry. DisplayText is custom text to use instead of that media's title. After the first two arguments, you can chain any number of arguments containing timecodes (format: 00:00:00).
For timecode-related arguments, each argument can be simply a jump-time (one timecode) or a range (timecode - timecode), which is relative to the original media. If you specify multiple timecodes, ranges are typically more desirable. Once a range is used, the media is time-cropped for this usage, so the original timecodes are not visible; for example if you only wanted to play 0:05 - 0:12 of a 2 minute video, the resulting player would only show a 7 second clip.