Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working on https://pan.baidu.com #523

Open
wangbuyao opened this issue Oct 1, 2019 · 30 comments
Open

not working on https://pan.baidu.com #523

wangbuyao opened this issue Oct 1, 2019 · 30 comments
Labels

Comments

@wangbuyao
Copy link

im sure the video is HTML5 and this extension runs well on any other web

@thrashbun
Copy link
Collaborator

thrashbun commented Oct 1, 2019 via email

@wangbuyao
Copy link
Author

wangbuyao commented Oct 1, 2019 via email

@thrashbun
Copy link
Collaborator

thrashbun commented Oct 1, 2019 via email

@wangbuyao
Copy link
Author

wangbuyao commented Oct 1, 2019 via email

@thrashbun
Copy link
Collaborator

thrashbun commented Oct 1, 2019 via email

@wangbuyao
Copy link
Author

wangbuyao commented Oct 1, 2019 via email

@thrashbun
Copy link
Collaborator

Hmm none of that seems to be about this extension from what i can tell. You can filter to 'inject.js' and see if that still comes up with errors.

What do you mean by not working? Does the overlay with the speed show up in the top corner?

@wangbuyao
Copy link
Author

wangbuyao commented Oct 1, 2019 via email

@thrashbun
Copy link
Collaborator

That could be helpful. Please open the console for it.

@wangbuyao
Copy link
Author

wangbuyao commented Oct 1, 2019 via email

@wangbuyao
Copy link
Author

wangbuyao commented Oct 2, 2019 via email

@Songkeys
Copy link

@jacobcolbert

I just found the problem and got here.

The blight is that this site is using a shadow-root to contain videos.

image

More specifically, it uses "closed" shadow-root to prevent end-user to access the node. So, the basic script is not able to detect the video element in the hidden document.

To crack this, we need make the "closed" shadow-root "open", and then recursively check potential shadow-root's and their children in the current page as well.

To open the shadow-root, one trick is to inject custom script in the head of the document which re-defines the Element.prototype.attachShadow() behavior to prevent the site calling el.attachShadow({ mode: 'closed' }) taking effects.

(I don't know if there's any other video websites doing so, but the reason the site holding back the videos like this is that the speedup feature is a premium service requiring payment. Anyway...)

@Songkeys
Copy link

I think it might be a good idea to let users to select the video element in the page manually if the auto-detect not working? This may handles all cases.

@ChadBailey
Copy link
Collaborator

This is a great report - and good evidence that our efforts to make a generic solution to #540 was worth the effort. A fix is currently being pursued, hopefully it will become available soon.

@wangbuyao
Copy link
Author

wangbuyao commented Nov 25, 2019 via email

@ChadBailey
Copy link
Collaborator

Do you have an updated link I can try? The one you posted before is no longer working

@wangbuyao
Copy link
Author

wangbuyao commented Nov 25, 2019 via email

@ChadBailey
Copy link
Collaborator

Sorry I can't seem to get it to work... looks like it's asking to log in or use an app? It's difficult to tell since having to use a translator

@Songkeys
Copy link

Songkeys commented Nov 25, 2019

@ChadBailey
Try this one..?
https://pan.baidu.com/s/1wmsOcea9PX7q-Uu0nSFY8w
Password: 9kss

Wait, The videospeed seems working on the sharing mode, but not working as being a logged-in user. I can help you test it if you want tho.

@wangbuyao
Copy link
Author

wangbuyao commented Nov 25, 2019 via email

@wangbuyao
Copy link
Author

wangbuyao commented Nov 25, 2019 via email

@ChadBailey
Copy link
Collaborator

It's fine, I probably wouldn't have gotten to it either way... I am on my way to work now so I will have to look at it later. Thanks for the prompt responses!

@wangbuyao
Copy link
Author

wangbuyao commented Nov 25, 2019 via email

@igrigorik
Copy link
Owner

@wangbuyao @ChadBailey thanks for working on this one.

Closing due to lack of activity but please reopen if there is more to investigate.

@ChadBailey
Copy link
Collaborator

For context that I didn't mention before, this appears to be impacted by the bug that impacts appleTV. It should be fixed when PR #541 gets implemented

@ChadBailey ChadBailey reopened this Mar 2, 2020
@ChadBailey
Copy link
Collaborator

Although this has been merged, it has not been confirmed to have fixed the problem so I am re-opening. I don't think the official distribution has caught up yet so the fix hasn't been pushed out to the clients yet (afaik). I'll post again to have you confirm it's fixed once those changes have been pushed.

@wangbuyao
Copy link
Author

wangbuyao commented Mar 2, 2020 via email

ChadBailey added a commit to ChadBailey/Video-Speed-Controller-Experimental that referenced this issue Mar 2, 2020
@ChadBailey
Copy link
Collaborator

This may be fixed in the latest version just release v0.6.1. Can you check it out and validate if it's fixed for me?

@ChadBailey ChadBailey added blocked:feedback We are waiting for clarification questions to be answered Work Complete The work has been complete and merged, waiting on the next release labels Mar 26, 2020
@Songkeys
Copy link

Songkeys commented Mar 27, 2020

This may be fixed in the latest version just release v0.6.1. Can you check it out and validate if it's fixed for me?

@ChadBailey sadly not fixed.

image

By calling getShadow, the real shadow root seems to be skipped?https://github.com/igrigorik/videospeed/blob/master/inject.js#L439-L456

I'm not sure but can you confirm that the closed shadow root is accessible?

I think we need to modify the web API Element.prototype.attachShadow() to force it to create an open shadow root?

Check #523 (comment)

@ChadBailey
Copy link
Collaborator

interesting, thanks for all the detailed information. i'll change the labels and hopefully someone can get it fixed. i'll take a swing at it if no one has by the time i get the chance

@ChadBailey ChadBailey added bug and removed Work Complete The work has been complete and merged, waiting on the next release blocked:feedback We are waiting for clarification questions to be answered labels Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants