poush / H2

Supporting light weight extensions for heavy task lifting
MIT License
16 stars 32 forks source link

Find a way around for enabling all the youtube videos to work in H2 #69

Closed Anonymous26 closed 5 years ago

Anonymous26 commented 5 years ago

Few youtube videos aren't available in H2 right now due to some license reason. We need to find a way for enabling all the videos in H2 if possible. This issue is for discussion purposes, feel free to suggest idea to achieve the goal.

h2_issue

gloriousducks commented 5 years ago

@Anonymous26 @poush Just did some investigating and it won't allow embedding if the embedded player is trying to play a video that has "Music in video"

screen shot 2018-10-19 at 4 55 29 pm

I tried embedding it in CodePen and it shows up fine: https://codepen.io/anon/pen/WayvvO

So if embedded on a web server, it'll allow streaming but not on an electron app. Tried using a chrome user agent with no avail. Will take a look later and see if there is a workaround or if they've disabled this feature as they're trying to push Youtube Music and a lot of spotify clones rely on embedding youtube music videos hidden which goes against YouTube's terms but people still do it. (We might need to skim through the terms for youtube).

poush commented 5 years ago

If we can identify that these videos can't be played through embed, I think we can directly open the youtube page and automate the click on the full-screen button and possibly hide the button after that.

poush commented 5 years ago

Solved by https://github.com/poush/H2/commit/f7bb060009007017b7bf3a0fe504b335cf608e74