vjs-video icon indicating copy to clipboard operation
vjs-video copied to clipboard

How to add resolution toggle

Open ajai-jayakumar opened this issue 8 years ago • 4 comments

Hi, Thanks for providing this plugin, I wanted to add resolution toggle say SD, HD toggle with this directive I tried the following

$scope.mediaToggle = {
sources: [{
                src: /example/video,
                type: 'video/mp4',
                label: '360',
                res: '360'
              },
              {
                src:  /example/video,
                type: 'video/mp4',
                label: '480',
                res: '480'
              }
            ];
};

But am not getting the media toggle as expected, kindly help in resolving this. Thanks in advance.

ajai-jayakumar avatar Feb 25 '17 10:02 ajai-jayakumar

@ajai-sandy I'll take a look at this shortly. I think it may be that those values aren't getting properly passed through to video.js.

ghost avatar Feb 25 '17 16:02 ghost

Same problem here. Im trying to use https://github.com/kmoskwiak/videojs-resolution-switcher and the problem is : Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

piuskamil avatar Mar 03 '17 09:03 piuskamil

[updated] how can i use videojs-resolution-switcher plugin with this directive?

sorry, nvm - released you can add plugins via vjs-setup

marksy avatar Apr 24 '17 09:04 marksy

I was trying to put together a codepen demo to demonstrate this. Perhaps I will add a section to the documentation on how to use plugins with vjs-video.

ghost avatar Apr 26 '17 10:04 ghost