Linux 软件免费装
Banner图

Switch Video Quality

开发者 team-ok
更新时间 2020年11月13日 20:44
捐献地址: 去捐款
PHP版本: 3.6 及以上
WordPress版本: 5.5.3
版权: GPLv3
版权网址: 版权信息

标签

player video embed wordpress responsive media html5 change select playlist library iframe stream quality choose mediaelement self-hosted resolution bitrate HD 4K mejs svq

下载

1.0 1.5.5 1.1 1.2 1.3 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.6 1.5.7

详情介绍:

Switch Video Quality adds a quality switch button to the native wordpress video player (mediaelement.js), that allows to choose between different resolutions (e.g., SD and HD) and/or formats (mp4, webm, ogv) of a self-hosted html5-compatible video. Additionally it provides an iframe embed code to let your viewers embed your video into their website (optional). Features: How to use:

安装:

屏幕截图:

  • The player with the switch video quality button, the embed button, the optional info-overlay and the playlist (twenty-fifteen theme).
  • The embed code overlay with the custom size calculator.
  • Use the normal wordpress video shortcode (with width and height attributes set).
  • All settings are made within the post edit screen.

常见问题:

Wordpress won't let me upload files bigger than 2 MB. How can I change that?

Normal users: Ask your server administrator to increase the max filesize limit. Admins: Edit the php.ini file and change the values of upload_max_filesize, post_max_size and memory_limit.

To start a video I have to wait until it's fully loaded. Jumping to a part of the video that is not yet loaded isn't possible. Why?

Maybe your webserver doesn't support pseudo streaming over http. Ask your server administrator to install the missing module. Also make sure your video files are encoded properly. MP4s must have the MOOV Atom placed at the beginning of the file.

I have uploaded my video as mp4 and webm, but I can select only one of them in the player

At page load the plugin checks the types of html5 video your browser can play and then only the first supported file format is used.

Can I use more than one player on the same post/page?

No, sorry, the plugin is meant to be used with only one player instance per post/page. But you can have multiple posts (each with Switch Video Quality activated) displayed on a page, e.g., if you query by a certain category or tag.

I don't want to use Switch Video Quality with a certain post type. How can I remove it from the admin screen of that post type?

There's a filter hook for doing that. Copy the following code into your functions.php and change the content of the $to_be_excluded array with the registered names of the post types you want to exclude: add_filter('svq_exclude_post_types', 'custom_svq_exclude_post_types'); function custom_svq_exclude_post_types($excluded){ $to_be_excluded = array('post_type_name', 'another_post_type_name'); $excluded = array_merge($excluded, $to_be_excluded); return $excluded; } If you don't know the registered name of a custom post type: it's shown in your browser's adress bar when you look at the post type's managing screen (after edit.php?post_type=).

How can I define a default quality level for all videos?

Use the filter hook 'svq_default_quality'. Copy the following code into your functions.php and change the return value to whatever (unitless video height) you like: add_filter('svq_default_quality', 'set_svq_default_quality'); function set_svq_default_quality(){ return 720; } Your videos don't need to exactly match the defined quality. The one with the quality closest to (but not smaller than) the defined quality will be set as default.

I want do enable/disable the embed functionality for multiple posts at once. How can I do that?

Use the filter hook 'svq_embed_setting_overwrite'. Copy the following code into your functions.php and change the post IDs of the $not_active array to enable the embed functionality for all posts except the ones with the IDs you specified. You can easily modify this code to disable embedding for all posts or enable it for all posts that are in a certain category. add_filter( 'svq_embed_setting_overwrite', 'overwrite_svq_embed_setting', 10, 2); function overwrite_svq_embed_setting($setting, $post_id) { $not_active = array(32, 42); if ( !in_array($post_id, $not_active) ){ $setting = true; } return $setting; }

I'd like to use a specific page (for example '/embeds') for outputting the iframe content. Is that possible?

You can use the filter hook 'svq_embed_page_name'. Copy the following code into your functions.php and replace the page name in the return statement. add_filter( 'svq_embed_page_name', 'my_svq_embed_page_name'); function my_svq_embed_page_name(){ return 'embeds'; } Note that the default template used for generating the iframe content won't output the post content or any metadata of a specified page. If you want to add any code to the iframe, you'll need to write a custom template (see another question). But if you just want a certain page name to be a part of your embed codes, you can leave that page blank and use the default template.

How can I change the template used for generating the iframe content of an embedded video?

For everything to work properly copy the content of the plugin's embed template and modify or add only what you need. Save it as 'svq_embeds.php' (mandatory) and upload it to your theme or child-theme directory and the plugin will automatically use it. If you want to put it somewhere else, use the filter hook 'svq_locate_template'. Copy the following code into your functions.php and change the path to the template: add_filter('svq_locate_template', 'svq_locate_custom_template'); function svq_locate_custom_template(){ return YOURCUSTOMPATH . '/svq_embeds.php'; }

更新日志:

1.0 1.1 1.2 1.3 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7