/**
 * @ngdoc directive
 * @name com.2fdevs.videogular.plugins.controls.directive:ngPlaybackButton
 * @restrict E
 * @description
 * Directive to display a playback buttom to control the playback rate.
 *
 * <pre>
 * <videogular vg-theme="config.theme.url">
 *    <vg-media vg-src="sources"></vg-media>
 *
 *    <vg-controls vg-autohide='config.autohide' vg-autohide-time='config.autohideTime'>
 *        <vg-playback-button></vg-playback-button>
 *    </vg-controls>
 * </videogular>
 * </pre>
 *
 */
angular.module("com.2fdevs.videogular.plugins.controls")
    .run(
    ["$templateCache", function ($templateCache) {
        $templateCache.put("vg-templates/vg-playback-button",
            '<button class="playbackValue iconButton" ng-click="onClickPlayback()">{{playback}}x</button>');
    }]
)
    .directive("vgPlaybackButton",
    [function () {
        return {
            restrict: "E",
            require: "^videogular",
            templateUrl: function (elem, attrs) {
                return attrs.vgTemplate || 'vg-templates/vg-playback-button';
            },
            link: function (scope, elem, attr, API) {
                scope.playback = '1';

                scope.setPlayback = function(playback) {
                    scope.playback = playback;
                    API.setPlayback(parseFloat(playback));
                };

                scope.onClickPlayback = function onClickPlayback() {
                    var playbackOptions = ['0.5', '1', '1.5', '2'];
                    var nextPlaybackRate = playbackOptions.indexOf(scope.playback.toString()) + 1;

                    if (nextPlaybackRate >= playbackOptions.length) {
                        scope.playback = playbackOptions[0];
                    }
                    else {
                        scope.playback = playbackOptions[nextPlaybackRate];
                    }

                    scope.setPlayback(scope.playback);
                };

                scope.$watch(
                    function () {
                        return API.playback;
                    },
                    function(newVal, oldVal) {
                        if (newVal != oldVal) {
                            scope.setPlayback(newVal);
                        }
                    }
                );
            }
        }
    }]
);
@@ -198,16 +198,132 @@
 ate.%0A *%0A
+ * @param %7Barray%7D vgSpeeds Bindable array with a list of speed options as strings. Default %5B'0.5', '1', '1.5', '2'%5D%0A
  * %3Cpre%3E
@@ -323,16 +323,16 @@
 * %3Cpre%3E%0A
-
  * %3Cvide
@@ -533,16 +533,50 @@
 k-button
+ vg-speeds='config.playbackSpeeds'
 %3E%3C/vg-pl
@@ -1212,32 +1212,99 @@
 %0A            %7D,%0A
+            scope: %7B%0A                vgSpeeds: '=?'%0A            %7D,%0A
             link
@@ -1673,16 +1673,34 @@
 ptions =
+ scope.vgSpeeds %7C%7C
  %5B'0.5',
@@ -2552,10 +2552,11 @@
 %0A    %7D%5D%0A
-
 );
+%0A

Allow for custom playback speeds to be passed in