[wordpress插件] Degradable HTML5 audio and video可降解的HTML5音频和视频

wordpress 插件 文章 2020-04-14 18:10 557 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Embed video and audio on your website using shortcodes.

使用简码在您的网站上嵌入视频和音频。

The plugin enables HTML5 native playback for users with compatible browsers while offering an elegant degradation to other users through very lightweight Flash players.

该插件可为具有兼容浏览器的用户提供HTML5本机回放,同时通过非常轻巧的 Flash 播放器为其他用户带来优雅的降级效果。

For HTML5 playback, it auto-detects and offers different alternatives, or degrades to Flash, and (failing even that) to download links.

对于HTML5播放,它会自动检测并提供不同的选择,或者降级为Flash,甚至无法下载链接。

Typical usage is simply [audio src="http://myblog.com/wp-content/uploads/2009/09/mysong"]

典型用法只是 [audio src =“ http://myblog.com/wp-content/uploads/2009/09/mysong”]

The plugin will make sure this does the following:

插件将确保执行以下操作:

    1. If the user has an HTML5 support for video and audio, it will play the media natively in an appropriate format.
    2. 如果用户具有视频和音频的HTML5支持,它将以适当的格式原生播放媒体。

    3. Otherwise, if the user has Flash, it will play the media in lightweight Flash players.
    4. 否则,如果用户使用Flash,它将在轻型Flash播放器中播放媒体。

    5. Otherwise, there will be a link for the audio or video files so that the user can still play them using their installed software players.
    6. 否则,将存在音频或视频文件的链接,以便用户仍可以使用其安装的软件播放器来播放它们。

    The plugin also allows you to provide only one version of the file (and force Firefox to fallback on Flash).

    该插件还允许您仅提供文件的一个版本(并迫使Firefox在Flash上​​回退)。

    Refer to the Instructions section below on how to use the plugin.

    有关如何使用插件的信息,请参见下面的说明部分。

    Codecs and browsers: The current situation with HTML5 is not ideal.

    编解码器和浏览器: HTML5的当前情况并不理想。

    For video, you should supply two formats to support all browsers.

    对于视频,您应该提供两种格式以支持所有浏览器。

    (But if you do not mind forcing Firefox to fall back to Flash, you can provide H.264 version only.) See the tables below to see what file will be played based on the support in the current browsers.

    (但是,如果您不介意强迫Firefox重新使用Flash,则只能提供H.264版本。)请参阅下表,根据当前浏览器的支持来播放什么文件。

    VIDEO           Flash   H.264   Ogg Theora                

      VIDEO Flash H.264 Ogg Theora                

    .flv .m4v .ogv

    .flv .m4v .ogv

    Firefox 3.6 - - X

    Firefox 3.6--X

    Safari 4.0 - X -

    Safari 4.0-X-

    Chrome 4.0 - X X

    Chrome 4.0-X X

    Other (Flash) X X -

    其他(闪光灯)X X-

    When a browser supports multiple formats and the files are available, the preference goes from left to right (e.g. Chrome will prefer the H.264 format; reflecting the quality of the codecs).

    当浏览器支持多种格式并且文件可用时,首选项从左到右(例如,Chrome将首选H.264格式;这反映了编解码器的质量)。

    The FLV format is optional and it is provided for backwards compatibility to play older FLV-only videos either alone (no HTML5 video) or as a preferred fallback version when used alongside versions converted to H.264 and Ogg.

    FLV格式是可选的,并且提供向后兼容性以单独播放较早的仅FLV的视频(不包含HTML5视频),或者与转换为H.264和Ogg的版本一起使用时作为首选的后备版本。

    AUDIO         WAVE   MPEG-4   Ogg Vorbis   MPEG              

     音频波MPEG-4 Ogg Vorbis MPEG              

    .wav .m4a .oga .mp3

    .wav .m4a .oga .mp3

    Firefox 3.6 X - X -

    Firefox 3.6 X-X-

    Safari 4.0 X X - X

    Safari 4.0 X X-X

    Chrome 4.0 - X X X

    Chrome 4.0-X X X

    Other (Flash) - - - X

    其他(闪光灯)---X

    For audio, you have to include at least .mp3 and .oga/.ogg versions to cover all browsers.

    对于音频,您必须至少包括.mp3和.oga / .ogg版本才能覆盖所有浏览器。

    (Or, you can supply .mp3 only which will force Firefox to fall back to Flash).

    (或者,您只能提供.mp3,这将迫使Firefox退回到Flash)。

    Other formats are optional.

    其他格式是可选的。

    Again, the preference for multiple available files in browsers supporting multiple codecs is left to right.

    同样,支持多种编解码器的浏览器中对多个可用文件的偏好从左到右。

    The Flash players used are a standalone version of WordPress Audio Player by Martin Laine, and WordPress音频播放器

    http://code.google.com/p/mrdoob/wiki/videoplayer" rel="nofollow">Videoplayer by Mr.doob.

    http://code.google.com/p/mrdoob/wiki/videoplayer“ rel =” nofollow“>视频播放器,作者是Mr.doob。

    Plugin Homepage

    插件主页

    Instructions

    说明

    Currently, there is no settings panel.

    当前,没有设置面板。

    All you need is the syntax for the shortcodes explained below.

    您只需要下面说明的短代码的语法即可。

    Audio

    音频

    Basic syntax: [audio src="File URL/path"]

    基本语法: [audio src =“ File URL / path ”]

    Advanced syntax: [audio src="File URL/path" options="special string" id="string

    高级语法: [audio src =“ File URL / path ” options =“ special string ” id =“ string

    " format="special string"]

    “ format =” 特殊字符串“]

    Example:

    示例:

    [audio src="http://myblog.com/wp-content/uploads/2009/09/mysong" options="autoplay loop controls" id="header-audio"]

      [音频src =“ http://myblog.com/wp-content/uploads/2009/09/mysong” options =“自动播放循环控件” id =“ header-audio”]

      • src is required.

      • src 是必需的。

        It must be an absolute or relative path to audio with the file name (“mysong”, in the above example).

        它必须是文件名(在上面的示例中为“ mysong”)的音频的绝对路径或相对路径。

        The files need to be located somewhere in your content folder (usually ‘wp-content’) unless you specify the files using the format option.

        除非您使用 format 选项指定文件,否则文件必须位于内容文件夹中的某个位置(通常为“ wp-content”)。

        File extension can be omitted.

        文件扩展名可以省略。

        Upload “mysong.mp3”, “mysong.ogg” etc. as applicable to the specified location.

      • 上传适用于指定位置的“ mysong.mp3”,“ mysong.ogg”等。

      • options is optional.

      • options 是可选的。

        It is a space-separated list of attributes defining the player behavior:

        这是用空格分隔的定义玩家行为的属性列表:

        autoplay to start playback automatically;

        自动播放以自动开始播放;

        autobuffer to start preparing the playback, controls to display the built-in playback controls (otherwise you can build and hook up your own), and loop

        自动缓冲以开始准备播放,控件以显示内置的播放控件(否则您可以构建并连接自己的播放器),并循环

        > to start from the beginning when the end is reached.

        >从结尾处开始。

        The default value is "controls autobuffer".

      • 默认值为“控件自动缓冲”

      • id is optional.

      • id 是可选的。

        If you do not include one, the audio tag will have an automatically generated ID of html5audio-number.

        如果您不添加音频标签,则音频标签将自动生成 html5audio- number 的ID。

        The IDs for the Flash players are prefixed with f-.

      • Flash播放器的ID前缀为 f-

      • class is optional.

      • class 是可选的。

        It is applied to a ‘wrapper’ div and to the audio tag.

        它应用于“包装” div和音频标签。

        If you do not include one, the class will be ‘html5audio’.

      • 如果您不包括该类,则该类将为“ html5audio”。

      • format is optional.

      • format 是可选的。

        It is a space-separated list of available file formats.

        它是可用文件格式的以空格分隔的列表。

        (Recognized values are auto, m4a, mp3, oga, ogg and <

        (公认的值为 auto m4a mp3 oga ogg 和<

        strong>wav.) The default value is auto which autodetects the formats.

        strong> wav 。)默认值为 auto ,可自动检测格式。

        You can specify a list of available formats manually instead (e.g. format="oga mp3 wav").

      • 您可以手动指定可用格式的列表(例如 format =“ oga mp3 wav” )。

      Video

      视频

      Basic syntax: [video src="File URL/path"]

      基本语法: [video src =“ File URL / path ”]

      Advanced syntax: [video src="File URL/path" width="pixel size" height="pixel size

      高级语法: [video src =“ File URL / path ” width =“ pixel size ” height =“ pixel size

      >" options="string" id="string" format="special string"]

      >“ options =” string “ id =” string “ format =” 特殊字符串“]

      Example:

      示例:

      [video src="http://myblog.com/videos/vidclip" poster="http://myblog.com/wp-content/uploads/2009/09/clip-teaser.jpg"

        [video src =“ http://myblog.com/videos/vidclip” poster =“ http://myblog.com/wp-content/uploads/2009/09/clip-teaser.jpg”

      width="320" height="240" options="autoplay" id="vid-1"]

      宽度=“ 320”高度=“ 240”选项=“自动播放” id =“ vid-1”]

        • src is required.

        • src 是必需的。

          It must be an absolute or relative path to video with the file name (“vidclip”, in this example).

          它必须是文件名(在此示例中为“ vidclip”)的视频的绝对路径或相对路径。

          The files need to be located somewhere in your content folder (usually ‘wp-content’) unless you specify the files using the format option.

          除非您使用 format 选项指定文件,否则文件必须位于内容文件夹中的某个位置(通常为“ wp-content”)。

          File extension can be omitted.

          文件扩展名可以省略。

          Upload “vidclip.ogg” (in Ogg Theora format) and “vidclip.m4v” (in mp4 format) to the specified location.

        • 将“ vidclip.ogg”(Ogg Theora格式)和“ vidclip.m4v”(mp4格式)上传到指定位置。

        • poster is optional.

        • 海报是可选的。

          It is a URL to the image you want to display before the video loads/starts playback.

          它是您要在视频加载/开始播放之前显示的图像的URL。

          (If a jpg with the same file name can be detected, it will be used when ‘poster’ is not specified.)

        • (如果可以检测到具有相同文件名的jpg,则当未指定“海报”时将使用它。)

        • width and height are optional.

        • width height 是可选的。

          The default size is 480×320 (which is the resolution of iPhone; larger videos might not play back on iPhone/iPod Touch).

        • 默认尺寸为480×320(这是iPhone的分辨率;较大的视频可能无法在iPhone / iPod Touch上播放)。

        • options is optional.

        • options 是可选的。

          It is a space-separated list of attributes defining the player behavior:

          这是用空格分隔的定义玩家行为的属性列表:

          autoplay to start playback automatically;

          自动播放以自动开始播放;

          autobuffer to start preparing the playback, controls to display the built-in playback controls (otherwise you can build and hook up your own), and loop

          自动缓冲以开始准备播放,控件以显示内置的播放控件(否则您可以构建并连接自己的播放器),并循环

          > to start from the beginning when the end is reached.

          >从结尾处开始。

          The default value is "controls autobuffer".

        • 默认值为“控件自动缓冲”

        • id is optional.

        • id 是可选的。

          If you do not include one, the video tag will have an automatically generated ID of html5video-number.

          如果您不添加视频标签,那么视频标签将自动生成 html5video- number 的ID。

          The IDs for the Flash players are prefixed with f-.

        • Flash播放器的ID前缀为 f-

        • class is optional.

        • class 是可选的。

          It is applied to a ‘wrapper’ div and to the video tag.

          它应用于“包装” div和视频标签。

          If you do not include one, the class will be ‘html5audio’.

        • 如果您不包括该类,则该类将为“ html5audio”。

        • format is optional.

        • format 是可选的。

          It is a space-separated list of available file formats.

          它是可用文件格式的以空格分隔的列表。

          (Recognized values are auto, flv, m4v, ogg and ogv.)

          (公认的值为自动 flv m4v ogg ogv 。)

          The default value is auto which autodetects the formats.

          默认值为自动,它可以自动检测格式。

          You can specify a list of available formats manually instead (e.g. format="ogg m4v").

        • 您可以手动指定可用格式的列表(例如 format =“ ogg m4v” )。

        If you find this plugin useful, you can rate it and link to the

        如果您发现此插件有用,则可以对其进行评分并链接到 the

        plugin.

        插件。

        If you don’t like it, feel free to leave feedback and comments on the webpage.

        如果您不喜欢它,请随时在网页上留下反馈和评论。

安装步骤

    1. Upload the unzipped folder degradable-html5-audio-and-video to your plugins directory.
    2. 将解压缩的文件夹 degradable-html5-audio-video 上载到 plugins 目录。

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. And then follow the usage instructions on the Description page
    6. 然后按照“说明”页面上的使用说明进行操作

下载地址
https://downloads.wordpress.org/plugin/degradable-html5-audio-and-video.1.8.2.zip
-EOF-

AI助手支持GPT4.0