igrigorik / videospeed

HTML5 video speed controller (for Google Chrome)
https://chrome.google.com/webstore/detail/video-speed-controller/nffaoalbilbmmfgbnbgppjihopabppdk
MIT License
3.83k stars 544 forks source link

Add support to Kiwi Browser (Android) #736

Open wilianwrech opened 3 years ago

wilianwrech commented 3 years ago

This extension could work perfectly with Kiwi Browser without any hard work, expanding compatible devices, allowing Android users to use it.

inject.js function getShadow() uses Array.flat, which is not supported by Kiwi and could be fixed with a simple code:

Object.defineProperty(Array.prototype, 'flat', {
    value: function(depth = 1) {
      return this.reduce(function (flat, toFlatten) {
        return flat.concat((Array.isArray(toFlatten) && (depth>1)) ? toFlatten.flat(depth-1) : toFlatten);
      }, []);
    }
});

I tested this myself, injecting this prototype definition with chrome://inspect#devices and it works fine.

jd1900 commented 3 years ago

It could be great to have some kind of Android suuport.

barwerf commented 3 years ago

Will it be getting Kiwi support soon?

barwerf commented 3 years ago

This extension could work perfectly with Kiwi Browser without any hard work, expanding compatible devices, allowing Android users to use it.

inject.js function getShadow() uses Array.flat, which is not supported by Kiwi and could be fixed with a simple code:

Object.defineProperty(Array.prototype, 'flat', {
    value: function(depth = 1) {
      return this.reduce(function (flat, toFlatten) {
        return flat.concat((Array.isArray(toFlatten) && (depth>1)) ? toFlatten.flat(depth-1) : toFlatten);
      }, []);
    }
});

I tested this myself, injecting this prototype definition with chrome://inspect#devices and it works fine.

Could you explain how we can get this to work on the Kiwi browser?

wilianwrech commented 3 years ago

Could you explain how we can get this to work on the Kiwi browser?

Copy and paste the code implementing Array.flat is enough, I am using it without any issues.

barwerf commented 3 years ago

Could you explain how we can get this to work on the Kiwi browser?

Copy and paste the code implementing Array.flat is enough, I am using it without any issues.

Copy the code you shared above? Where do I paste it? Trying to get video speed control to work on Kiwi for Android. On Facebook videos, the speed controls are dim and not functioning Thanks for the help.

jd1900 commented 3 years ago

No news here?

wilianwrech commented 3 years ago

Could you explain how we can get this to work on the Kiwi browser?

Copy and paste the code implementing Array.flat is enough, I am using it without any issues.

Copy the code you shared above? Where do I paste it? Trying to get video speed control to work on Kiwi for Android. On Facebook videos, the speed controls are dim and not functioning Thanks for the help.

The way I did this was using remote debugging, just copy and paste in the console.