Title: Switch Video Quality
Author: team-ok
Published: <strong>27 آگوست 2015</strong>
Last modified: 13 نوامبر 2020

---

جستجوی افزونه‌ها

![](https://ps.w.org/switch-video-quality/assets/banner-772x250.png?rev=1233882)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/switch-video-quality/assets/icon-128x128.png?rev=1233901)

# Switch Video Quality

 توسط [team-ok](https://profiles.wordpress.org/team-ok/)

[دانلود](https://downloads.wordpress.org/plugin/switch-video-quality.1.5.7.zip)

 * [جزئیات](https://fa.wordpress.org/plugins/switch-video-quality/#description)
 * [نقد و بررسی‌ها](https://fa.wordpress.org/plugins/switch-video-quality/#reviews)
 *  [نصب](https://fa.wordpress.org/plugins/switch-video-quality/#installation)
 * [توسعه](https://fa.wordpress.org/plugins/switch-video-quality/#developers)

 [پشتیبانی](https://wordpress.org/support/plugin/switch-video-quality/)

## توضیحات

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:

 * serve your videos in **multiple qualities** to let your viewers choose (just 
   like youtube or vimeo)
 * upload your video files directly to the wordpress media library or use a separate
   web server to host your files (direct URLs have to be entered manually)
 * create a **playlist** when you have more than one video on a page (only one player
   needed). The playlist is placed below the player as a grid layout with thumbnails
   for each video
 * provide an automatically generated **iframe embed code** for each video
 * use subtitles for multiple languages
 * reorder playlist items with **drag and drop**
 * **quality level labels** show the video’s height value by default, but you can
   set custom ones easily
 * HD and 4K quality flags are added to the labels automatically
 * optionally show an **info overlay** in the player that contains title and duration
   information
 * turn on/off on a per-post basis
 * fully translatable (english and german language files already included)

#### How to use:

 * In the post editor, use the normal video shortcode (width and height set to your
   needs) to place the video player in your content area, like this:
    [video width
   =1024 height=576]
 * There are no other shortcode attributes necessary (actually even width and height
   aren’t necessary as they default to 640 x 480 px when they are omitted), but 
   you may add a src and a poster attribute to ensure normal shortcode functionality
   when Switch Video Quality is not used or deactivated.
 * Select the checkbox _Turn on/off_ to activate the plugin for the current post.
 * In the playlist item box enter some information about your video such as titles,
   names, locations, dates or an external link. This information will be displayed
   in the playlist and in the information overlay of the video player.
 * Upload a poster image or select one from the media library
 * Upload your videos with different resolutions and/or different formats (mp4, 
   webm or ogv).
 * You can select multiple video files in the media library and add them to the 
   current playlist item all at once.
 * The order of the files (quality levels) doesn’t matter as they will be sorted
   by their height value when they’re loaded into the player. The quality level 
   that is closest to (but – to avoid upscaling – not smaller than) the player’s
   size will be loaded as default.
 * All video details (URL, label, duration) are inserted automatically, but you 
   can change the default label text to whatever you like (e.g., low, medium, high)
 * If your video files are hosted on an external server, enter the URLs manually(
   the plugin will try to fill out the other fields automatically)
 * To add another playlist item, click on the plus icon at the top of the current
   playlist item box
 * To change the order of the playlist items, click on the playlist position number
   and drag and drop the box below or above another one.
 * When you click on the title of the box, this box gets expanded (content is shown)
   and all others will be collapsed. You can collapse all boxes by clicking on the
   title of an open one (makes rearranging of the boxes easier).
 * Empty a playlist item box by clicking on the rubber icon, remove the whole box
   completely by clicking on the X icon (not possible when there is only one box
   left)

## عکس‌های صفحه

 * [[
 * 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.

## نصب

 * Upload the unzipped folder `switch-video-quality` to the `/wp-content/plugins/`
   directory.
 * Activate the plugin through the _Plugins_ menu in WordPress.
 * It all happens in the post editing screen. Switch Video Quality has no global
   settings (but there are some filter hooks available to make global settings).

## سوالات متداول

### 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';
    }
    ```

## نقد و بررسی‌ها

![](https://secure.gravatar.com/avatar/2448dbb687cbadebe53ad90869e18f17e6c2b54bf59e1dfade1ef4b018a37fab?
s=60&d=retro&r=g)

### 󠀁[Doesn’t do anything](https://wordpress.org/support/topic/doesnt-do-anything-62/)󠁿

 [Digital Comm](https://profiles.wordpress.org/digital1comm/) 7 آوریل 2022 1 پاسخ

a warning appears : Warning: Illegal string offset ‘svq_embed_active’ in /wp-content/
plugins/switch-video-quality/switch_video_quality.php on line 384 And nothing changes
in the video player, no quality selector !

![](https://secure.gravatar.com/avatar/301ab6bbe1c743af86dd2d004d06d6683b262d581dc3a6512b018d815ce09a72?
s=60&d=retro&r=g)

### 󠀁[No video quality options](https://wordpress.org/support/topic/it-sucks-16/)󠁿

 [arashg](https://profiles.wordpress.org/arashg/) 9 آوریل 2020 3 پاسخ

I tried to upload videos using URLs because I couldn’t have them on my media. I 
uploaded my videos through both Dropbox and Google Drive but both of them gave me
this error: The url you have entered is invalid/unreachable or the file type is 
not supported by your browser. However, When I went to my website, the player was
working but it didn’t have the quality options and I couldn’t open that gear icon
menu to set the quality. Still, the video was playing with the quality that was 
the first URL in the adding URL section.

![](https://secure.gravatar.com/avatar/c781dbe7826a5a953da42fb137b951c92ad8aac433cb3bb0a6e416f413f24b24?
s=60&d=retro&r=g)

### 󠀁[too bad](https://wordpress.org/support/topic/too-bad-24/)󠁿

 [rezabsh](https://profiles.wordpress.org/rezabsh/) 10 فوریه 2020 3 پاسخ

two subtitle doesnt work well exactlly show the latest subtitle

![](https://secure.gravatar.com/avatar/ec2279cfb8a0c3c4a945f8746567b0a3fd690e79e7a2a3769afe962daff4359e?
s=60&d=retro&r=g)

### 󠀁[Essential plugin !](https://wordpress.org/support/topic/essential-plugin-160/)󠁿

 [Anonymous User 17429174](https://profiles.wordpress.org/anonymized-17429174/) 
10 آگوست 2019 1 پاسخ

Thanks for this plugin ! It’s absolutely necessary for those who want to offer a
good visitor’s experience with self-hosted videos. But, wouldn’t it be nice to add
a SD button, like the HD, to inform the users that they can change the video quality?

![](https://secure.gravatar.com/avatar/30ef4224181df7918c4fe63aa3622b90a2ec67a45aef9b1bde2872259c8bb076?
s=60&d=retro&r=g)

### 󠀁[Great Plugin](https://wordpress.org/support/topic/great-plugin-18583/)󠁿

 [yeephuang](https://profiles.wordpress.org/yeephuang/) 20 جولای 2018

nice to use, used for few years.

![](https://secure.gravatar.com/avatar/74bd82fb2e708c7a966a4d6ed6d6ded2e522e69dabd9fa5e14e28493b8104e30?
s=60&d=retro&r=g)

### 󠀁[Great plugin and excellent](https://wordpress.org/support/topic/great-plugin-and-excellent/)󠁿

 [monasr](https://profiles.wordpress.org/monasr/) 23 ژانویه 2018

Thank you very much for this plugin I loved him But I have a problem 1 that turn
on / off does not appear in the player. I have an important request for me I want
to add a download button in the trigger and when the user clicks it appears a window
like Embedding They must sign in to be able to download. Thank you

 [ خواندن تمامی 11 نقد و بررسی‌ ](https://wordpress.org/support/plugin/switch-video-quality/reviews/)

## توسعه دهندگان و همکاران

“Switch Video Quality” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

 *   [ team-ok ](https://profiles.wordpress.org/team-ok/)

[ترجمه “Switch Video Quality” به زبان شما.](https://translate.wordpress.org/projects/wp-plugins/switch-video-quality)

### علاقه‌ مند به توسعه هستید؟

[Browse the code](https://plugins.trac.wordpress.org/browser/switch-video-quality/),
check out the [SVN repository](https://plugins.svn.wordpress.org/switch-video-quality/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/switch-video-quality/)
by [RSS](https://plugins.trac.wordpress.org/log/switch-video-quality/?limit=100&mode=stop_on_copy&format=rss).

## گزارش تغییرات

#### 1.0

 * Initial Version

#### 1.1

 * Added compatibility with older php versions (< 5.4).

#### 1.2

 * Added a filter to change the post types switch video quality is connected with(
   see FAQ).

#### 1.3

 * Added embed functionality (automatic embed code generation with custom size calculation
   and template supply).
 * Improved usability of post editing screen (collapsible playlist boxes, less required
   user input).
 * Changed the way the plugin decides which quality to use initially (on page load):
   the order of the qualities in the admin screen doesn’t matter anymore. The plugin
   now sets the one that is closest to (but not smaller than) the player’s height
   as default.
 * Added a filter hook (‘svq_default_quality’) to set a default quality level for
   all videos that will be used regardless of the player’s height.
 * Added an option to place an external link below the title information of a playlist
   item.
 * Changed plugin’s (formerly intended) behaviour in cases where title information
   or a poster image were set, but the video urls were missing (the player didn’t
   show up at all). Now you can set up a complete playlist for preview purposes 
   and add the video urls later.
 * Removed input data sanitization (spaces in urls (that actually shouldn’t be there…)
   got stripped in sanitization producing unreachable urls).
 * Fixed a bug when added video qualities (files) weren’t saved correctly in cases
   where a video quality field was removed and then new ones were added.
 * Design improvements (responsive icons as svg-sprites, some changes in css).
 * Added a filter hook (‘svq_locate_template’) to change the page template for embedded
   videos.
 * Added a filter hook (‘svq_embed_setting_overwrite’) to overwrite the embed activation
   setting of the post edit screen (for example to enable or disable it globally).
 * Added a filter hook (‘svq_embed_page_name’) to set the name of a an embed page
   to be used in the embed code (for example ‘/embeds’).
 * Added a filter hook (‘svq_default_background’) to change the default thumbnail
   of the playlist items (the one that is used when no poster image has been set).
 * Plugin now looks for translation files in the default wordpress language folder
   first, then inside the plugin’s ‘lang’ folder.
 * Added a filter hook (‘plugin_locale’) to change the locale the plugin currently
   uses for choosing the appropriate translation file.
 * Changed the filter hook used for filtering the video shortcode. The plugin now
   uses ‘wp_video_shortcode_override’ which allows to completely overwrite the default
   wordpress video shortcode output.

#### 1.4

 * Fixed a bug in the post metadata saving process that could lead to metadata deletion
   in cases where the post was being updated from outside the post edit screen.

#### 1.4.1

 * Set priority of wp_video_shortcode_override filter hook to a higher value (lower
   priority).
 * Some minor CSS improvements.

#### 1.5

 * Fixed compatibility issues with WordPress 4.9
 * Added subtitle feature

#### 1.5.1

 * Fixed subtitle error related to WP 5.0 saving empty required input fields
 * CSS fixes (HD and 4K labels)

#### 1.5.2

 * Fixed the “A non-numeric value encountered”-warning (only PHP >= 7.1) that was
   displayed when using shortcode attributes with non-numeric values where numeric
   values were expected.

#### 1.5.3

 * Fixed compatability issues with manually entered video urls that don’t end with
   a file extension. Now mp4-MIME type is assumed in this cases.

#### 1.5.4

 * Fixed JavaScript errors in Safari that caused SVQ to stop working.

#### 1.5.5

 * Fixed a bug that stopped hd and 4k labels from showing up.

#### 1.5.6

 * Added the “muted” shortcode attribute. May be set to “true” or “yes” or anything
   truthy (not an empty string) to load the player initially muted.

#### 1.5.7

 * Restored time indicators (current time and duration)

## اطلاعات

 *  نگارش **1.5.7**
 *  Last updated **5 سال پیش**
 *  نصب‌های فعال **100+**
 *  نگارش وردپرس ** 3.6 یا بالاتر **
 *  Tested up to **5.5.18**
 *  زبان
 * [English (US)](https://wordpress.org/plugins/switch-video-quality/)
 * Tags
 * [change](https://fa.wordpress.org/plugins/tags/change/)[choose](https://fa.wordpress.org/plugins/tags/choose/)
   [quality](https://fa.wordpress.org/plugins/tags/quality/)[resolution](https://fa.wordpress.org/plugins/tags/resolution/)
   [select](https://fa.wordpress.org/plugins/tags/select/)
 *  [نمایش پیشرفته](https://fa.wordpress.org/plugins/switch-video-quality/advanced/)

## امتیازها

 4.3 از 5 ستاره.

 *  [  امتیاز 9 5-ستاره     ](https://wordpress.org/support/plugin/switch-video-quality/reviews/?filter=5)
 *  [  امتیاز 0 4-ستاره     ](https://wordpress.org/support/plugin/switch-video-quality/reviews/?filter=4)
 *  [  امتیاز 0 3-ستاره     ](https://wordpress.org/support/plugin/switch-video-quality/reviews/?filter=3)
 *  [  امتیاز 0 2-ستاره     ](https://wordpress.org/support/plugin/switch-video-quality/reviews/?filter=2)
 *  [  امتیاز 2 1-ستاره     ](https://wordpress.org/support/plugin/switch-video-quality/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/switch-video-quality/reviews/#new-post)

[مشاهده همه بررسی‌ها](https://wordpress.org/support/plugin/switch-video-quality/reviews/)

## مشارکت کنندگان

 *   [ team-ok ](https://profiles.wordpress.org/team-ok/)

## پشتیبانی

چیزی برای گفتن دارید؟ نیاز به کمک دارید؟

 [مشاهده انجمن پشتیبانی](https://wordpress.org/support/plugin/switch-video-quality/)

## کمک مالی

آیا تمایل دارید از پیشرفت این افزونه حمایت کنید؟

 [ کمک مالی به این افزونه ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y9ZJCWAFT4QF2&lc=US)