Git Product home page Git Product logo

Comments (25)

kraig-droid avatar kraig-droid commented on August 18, 2024 3

PR is here.

I'm not sure what's the easiest way for folks to preview/test.

One way is to:

  1. In your browser, disable your existing videospeed extension
  2. Download my code https://github.com/kraig-droid/videospeed/zipball/handle-shadow-roots/
  3. Unzip
  4. "...open Chrome/Brave/Chromium and enable developer mode via Settings > Extensions > Manage Extensions and toggle Developer mode in the top-right corner."
  5. "Click Load unpacked and browse to the folder you cloned videospeed to."
    (The above two steps quoted from this repo's contributing guidelines)
  6. Test it out
  7. NOTE: D+ intercepts 's' and 'd' keypresses. I had to add more keys -- I used '[' and ']' like VLC uses. If you change keys, you'll need to reload the web page for them to work.

from videospeed.

kraig-droid avatar kraig-droid commented on August 18, 2024 3

I made an additional PR to fix the issue with forceLastSavedSpeed and shadow DOM players like D+.

PR is here.

I'm not sure what's the easiest way for folks to preview/test.

One way is to:

  1. In your browser, disable your existing videospeed extension
  2. Download my code https://github.com/kraig-droid/videospeed/zipball/fix-shadowRoot-events/
  3. Unzip
  4. "...open Chrome/Brave/Chromium and enable developer mode via Settings > Extensions > Manage Extensions and toggle Developer mode in the top-right corner."
  5. "Click Load unpacked and browse to the folder you cloned videospeed to."
  6. (The above two steps quoted from this repo's contributing guidelines)
  7. Test it out
  8. NOTE: D+ intercepts 's' and 'd' keypresses. I had to add more keys -- I used '[' and ']' like VLC uses. If you change keys, you'll need to reload the web page for them to work.

@mariusi7 -- I'm hoping you can take a look, thanks!

from videospeed.

kraig-droid avatar kraig-droid commented on August 18, 2024 2

I looked at the source code (inject.js) and saw:

var tc = {
  // ...
  // Holds a reference to all of the AUDIO/VIDEO DOM elements we've attached to
  mediaElements: []
}

OK, mediaElements will have <video ...> (and perhaps <audio ...>) elements.

Well, let's see if it finds the D+ <video ...> element. So I added a console.log:

function defineVideoController() {
    // ...
    tc.mediaElements.push(target);
    console.count('found a media element');
    // ...

Nope, no media elements found on a playing D+ vid. (Working sites do show this count.)

Why? Seems like a shadow DOM issue.

Here's some of the HTML:

...
<disney-web-player>
    #shadow-root (open)
    <div class="btm-media-client" ...>
        <video ...>
        </video>
    </div>
</disney-web-player>
...

JavaScript won't normally "reach into" shadow DOMs. I suspect that's the issue here. I see this is mentioned in another (unsolved?) issue in this repo here. But I'll see if I can figure something out.

from videospeed.

ldsands avatar ldsands commented on August 18, 2024 2

It looks like you more or less have it all figured out. I found a temporary workaround in the meantime. Maybe the workaround and my observation about Hulu might help.

I found out that if you click the settings symbol/button (image shown below) in the upper right of the screen while a video is playing then the variable speed playback extension will start working.

image

I also think this is in someway tied to them incorporating Hulu into Disney+. I think this is the case because I first noticed issues with the extension working when watching something from Hulu within Disney+. The speed would not work on the Hulu videos but would work on the rest of Disney+. Then once everyone else noticed that it wouldn't work at all anywhere on Disney+ is also when I noticed the same issue throughout Disney+.

Hope this helps and either way thanks for figuring this out!

from videospeed.

dallinfarrer avatar dallinfarrer commented on August 18, 2024 2

I have discovered something really odd. The playback speed controls started working for me today. I clicked the subtitle settings in the top right corner once the settings overlay came up, the speed bumped up to my preset. No idea what would cause this interaction, but I can now watch Disney+ at whatever speed I want.

from videospeed.

mariusi7 avatar mariusi7 commented on August 18, 2024 1

Is there a planned release of a new version containing this ? I saw it got merged (together with some other changes).

from videospeed.

lucasgondim avatar lucasgondim commented on August 18, 2024 1

It looks like you more or less have it all figured out. I found a temporary workaround in the meantime. Maybe the workaround and my observation about Hulu might help.

I found out that if you click the settings symbol/button (image shown below) in the upper right of the screen while a video is playing then the variable speed playback extension will start working.

image

I also think this is in someway tied to them incorporating Hulu into Disney+. I think this is the case because I first noticed issues with the extension working when watching something from Hulu within Disney+. The speed would not work on the Hulu videos but would work on the rest of Disney+. Then once everyone else noticed that it wouldn't work at all anywhere on Disney+ is also when I noticed the same issue throughout Disney+.

Hope this helps and either way thanks for figuring this out!

Worked for me, thanks!

from videospeed.

kraig-droid avatar kraig-droid commented on August 18, 2024 1

from videospeed.

mariusi7 avatar mariusi7 commented on August 18, 2024

Tried to look for errors in the console. Nothing special, only one critical:
"mel-hive.js:2 Accessing HLSPlayer#isLive : live state is not known until presentationState is LOADED"
Nothing more logged when I change the context to VSC only (or I'm doing it wrong).
https://i.imgur.com/jxlUpig.png

The player: doesn't look changed. Also, still works in Firefox with the fork (not perfect though, can't +/-).
Maybe I'll debug more in the weekend if no one else has time to help with this or I get suggestions.
CC @igrigorik

from videospeed.

dieblume56 avatar dieblume56 commented on August 18, 2024

Hi,

other extensions seem to have the same problem. This developer has a solution:
dvlden/uw-pub#15

from videospeed.

kraig-droid avatar kraig-droid commented on August 18, 2024

I have working code on my machine. I'll be making a PR soon. Dunno if it will be accepted. Gotta' look for contributing guidelines, etc first.

from videospeed.

thebgllc avatar thebgllc commented on August 18, 2024

First test worked flawlessly. THANK YOU!

from videospeed.

dieblume56 avatar dieblume56 commented on August 18, 2024

Works perfectly. Thank you very much.

from videospeed.

Nino39x avatar Nino39x commented on August 18, 2024

I can't get this to work on Disney+; I'm having the same issue as before. I tried it on Max -- it worked there.

from videospeed.

dieblume56 avatar dieblume56 commented on August 18, 2024

I can't get this to work on Disney+; I'm having the same issue as before. I tried it on Max -- it worked there.

Can you give us some more information? Can you see the overlay in the videos? Can you see the overlay on the mainpage in all the boxes?

from videospeed.

n3cr0cr0w avatar n3cr0cr0w commented on August 18, 2024

I can confirm that this patch works in @kraig-droid's upload.
Unable to duplicate the fix it in the userscript version.

from videospeed.

mygsunny avatar mygsunny commented on August 18, 2024

it doesn't go pass 1.1x and under 0.9x

from videospeed.

kraig-droid avatar kraig-droid commented on August 18, 2024

it doesn't go pass 1.1x and under 0.9x

Hi, sorry, that's not enough info to troubleshoot. Is this for Disney+? Mac or PC? Chrome?

Here's a screenshot of speed 1.3 on PC, Edge (with ']' set to 'Increase speed' by '0.1'.)
Clipboard01

from videospeed.

mygsunny avatar mygsunny commented on August 18, 2024

it doesn't go pass 1.1x and under 0.9x

Hi, sorry, that's not enough info to troubleshoot. Is this for Disney+? Mac or PC? Chrome?

Here's a screenshot of speed 1.3 on PC, Edge (with ']' set to 'Increase speed' by '0.1'.) Clipboard01

I'm using chrome on an m1 mac with the hot key set to "[". and "]"

from videospeed.

n3cr0cr0w avatar n3cr0cr0w commented on August 18, 2024

@kraig-droid
I have seen the 0.9/1.1 issue when I use the Remember playback speed and/or Force last saved speed settings. Please retry your test.

from videospeed.

kraig-droid avatar kraig-droid commented on August 18, 2024

I'm using chrome on an m1 mac with the hot key set to "[". and "]"

FYI: I just tested on an Intel MacBook Pro with Chrome. Works. (I doubt silicon makes a difference -- we're way above the hardware in JS.)

from videospeed.

kraig-droid avatar kraig-droid commented on August 18, 2024

@kraig-droid I have seen the 0.9/1.1 issue when I use the Remember playback speed and/or Force last saved speed settings. Please retry your test.

I've never used those features and will look tonight. Are they off for you?

from videospeed.

mygsunny avatar mygsunny commented on August 18, 2024

Force last saved speed settings.

@kraig-droid I have seen the 0.9/1.1 issue when I use the Remember playback speed and/or Force last saved speed settings. Please retry your test.

I've never used those features and will look tonight. Are they off for you?

wow! turning off Force last saved speed settings fixed it!

from videospeed.

Emanuele676 avatar Emanuele676 commented on August 18, 2024

It looks like you more or less have it all figured out. I found a temporary workaround in the meantime. Maybe the workaround and my observation about Hulu might help.

I found out that if you click the settings symbol/button (image shown below) in the upper right of the screen while a video is playing then the variable speed playback extension will start working.

image

I also think this is in someway tied to them incorporating Hulu into Disney+. I think this is the case because I first noticed issues with the extension working when watching something from Hulu within Disney+. The speed would not work on the Hulu videos but would work on the rest of Disney+. Then once everyone else noticed that it wouldn't work at all anywhere on Disney+ is also when I noticed the same issue throughout Disney+.

Hope this helps and either way thanks for figuring this out!

Also for me, when the extension doesn't work and I click on that symbol to get it to work again, I can't change the speed except by -/+0.1 (I had set an initial speed of 1.7x, so it went from 1.6x to 1.8x). This had happened to me in the past with Apple TV+ as well.

I'm not sure if the speed shown is actually the one running, however, I refreshed the page and it started working normally again, so I couldn't do any further testing, it often happens that by refreshing several times suddenly it starts working again without having changed anything.

from videospeed.

mariusi7 avatar mariusi7 commented on August 18, 2024

Can this be fixed, since it was integrated ?
When can we expect a new version released @igrigorik ?
2 months of not working on Disney (well, except workaround to load the zip)... :(

from videospeed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.