polywock / globalSpeed

Web extension to set a default speed for video and audio
https://chrome.google.com/webstore/detail/global-speed-youtube-netf/jpbjcnkcffbooppibceonlgknpkniiff?hl=en
1.58k stars 179 forks source link

(Request) Please add support for media features when playing videos from any site (including youtube) in full-screen and background like samsung browser has inbuilt in edge browser mobile addon. #470

Open Varniit-pro-90s opened 7 months ago

Varniit-pro-90s commented 7 months ago

(Request) Please add support for media features when playing videos from any site (including YouTube) in full-screen and background like Samsung browser has inbuilt in edge browser mobile addon.

If you are aware dev, then your addon is now supported on edge mobile but as limitations are, you addon works on limited capabilities. I hope you can improve it for better video watching experience.

For more screenshots apart from these, you can the link below -

https://github.com/brave/brave-browser/issues/35441

photo1707589362 photo1707589343

LifeJustDLC commented 4 months ago

I'm sad it's a paid feature of youtube. I'm happy that globalSpeed is now an android edge support extension. I'm worried about whether it will last long.

As a temporary solution, you could:

But I should admit that maybe either UX of these sucks.

polywock commented 4 months ago

@Varniit-pro-90s Hi. Apologies for the late reply. If I'm understanding correctly (not super familiar with Samsung browser or cococ), you want a small control overlay on each video? Which features in particular do you want accessible through this overlay? I'll look into implementing it. Edge-mobile specific features would be nice.

LifeJustDLC commented 4 months ago

I'll look into implementing it. Edge-mobile specific features would be nice.

@polywock If you're going to implement an always on virtual button (probably with gestures) to adjust speed and seeking for convenience as well. Maybe I can help with the UX design and coding.

BTW, I'm very exited that Edge had the official extension support recently. By leveraging globalSpeed and its ability to customize, the user experience could easily exceed any players on the market even including the native ones. (I actually kind of worried if youtube will make their intentionally weakened mobile site available to these powerful tools)

polywock commented 4 months ago

@LifeJustDLC Hello. Thanks for the offer. Please don't pull/work on the current code available on Github as it's outdated. The draft release is significantly different.

I'm thinking of two Edge-mobile specifies features.

On-video gestures

Video overlay control panel

LifeJustDLC commented 4 months ago

@polywock Sorry for a late reply. I'm doing some investigation.

This will be optional and opt-in as it may conflict with the website's existing gesture system.

One of the possible conflicting gestures on YouTube is, dragging down in landscape full screen mode to exit from it. This might conflict with a speed decreasing gesture I used to plan. (I'll explain the details later.) But there's workaround, by dividing touch area into left, middle and right areas, assign only the middle area for site default behavior (exit landscape mode). Additionally, on portrait mode, we can choose to disable any custom gestures. Otherwise, make an right bottom corner, semitransparent hold-expand "dial" button, similar to the classical "bubble" on iPhone. (I don't have a name for it now, anyway, not urgent.)

(IMHO, preventing default behavior isn't necessarily a bad thing. I actually abused globalSpeed to prevent number keys and M key from functioning on YouTube.)

Besides, I don't think gesture system is a common thing, for the websites users mostly likely to use them. I observed a lot of sites using double tap to seek, but is it 10s base? or 5s base? Is it correlated with the current speed? Can it even be configured? I don't know. I'd rather use GS to define my own.

Once touched, it will show the expanded form with all the controls

That's "a little too more steps" I think. I'm currently doing some work about a gesture system (loading JavaScript by GS on Edge for Android), which is customizable by user, just like GS on desktop. You can consider any below "gesture" to be a "key", which can be bind to a specific function:

The best part, "vibration feedback" on each discrete level crossing. Such as speed 1.0 -> 1.25 (0.25 is a level), seek now -> 2s before (2s is a level), and if it could be, configurable by user. This is good for user to feel the accurate time they are traveling. And freely cycling through any playback rates, even made desktop users jealous.

Several facts I found out recently: Firefox have disabled vibration API since 2020* (Safari doesn't support it at all). It officially support Android WebExtension development, but doesn't have a handy interactive screencast for devtools to inspect. Chrome still doesn't have mobile WebExtension support nowadays. Edge on Android only support 3 extensions officially (including GS) at the moment. It is like Chrome cannot load extensions to Android version. It seems able to load .crx now, but I still don't have any clue why my script is not appear in the page, after several days of debugging (guessing). So the only development solution falls on: Mostly on Android Firefox and finally test it on Android Edge (by manually copy paste JavaScript to devtools console.)

Playback rate will be one of the controls, but what else would be useful?

Volume boosting (over 100%) might be a necessity on such small devices. but IFAIK this is not implemented neither on desktop?

As for this specific issue, the screen-off-playing mode button. I don't know how would YouTube think if they find out this extension enable users to do what they don't want them to do. (I just found out today, that Edge (at least Canary) is actively announcing their ad blocking feature (AdBlock Plus under the hood) in the after-install user guide page...I'm a newbie in this world so maybe your decision is far from bold as I thought. Never mind. Doesn't do anything on YouTube ads as expected.) Anyway, I will offer my trivial help to this great project. Such as porting to Firefox on Android.

Additionally, I accidentally found that an alert can break YouTube pause-on-screen-off behavior, considering blocking visibilitychange event and manipulating document.hidden might not be a good idea. The down-side is that user have to close the prompt every time. I think it's an acceptable trade-off at this stage, except any better solution came out.

(If a long post isn't a good practice, from an experienced developer's perspective, apologizing for that and please let me know...)

LifeJustDLC commented 4 months ago

BTW, the current issue I'm trying to solve is latency/delay of the feedback sound effect (as I'm on Firefox, prohibiting vibration).

polywock commented 4 months ago

Hello. Thanks for sharing those insights. I've been thinking it through and I'm very hesitant on doing of a gesture system, even if it's opt-in by user. I think it'll probably cause a lot of site-specific issues or require a lot of maintenance. Taking your feedback into consideration, maybe a little gesture circle that you can interact with to seek, change speed

Hold down for a few seconds to move it around. Touch and drag right to seek right. Touch and drag left to seek left. Touch and drag up to increase speed. Touch and drag down to decrease speed. Touch and drag diagonally top-left to X. ... etc

Make this all customizable in the options page. Definitely not as convenient as gesture from anywhere on the video, but my main priority is writing Global Speed in such a way where maintenance is low or nothing. (That's how I get away with not updating GS in 2 years 😆 )

Volume boosting (over 100%) might be a necessity on such small devices. but IFAIK this is not implemented neither on desktop?

Global Speed does allow volume boosting, but only for Chromium browsers as the Tab Capture API isn't available on Firefox. However, even for Chromium, it's not suitable for gestures, etc as Chromium requires the user first invoke the extension before being allowed to manipulate audio, and only way to do that is through a browser-level shortcut key, click on extension toolbar icon, etc.

888beside commented 1 month ago

COVID-19 cyberthreats.pdf mediaviews-20240707-20240727 Air traffic control - Wikipedia.pdf [Uploading infogr-he6-radiation-20082019-od-web-pages-2.pdf…]()

888beside commented 1 month ago

Confirmation_for_BookingID#_1216169988.pdf [