JenieX / unmute-reddit-videos

Override the default behavior of Reddit videos, that is being played as muted
MIT License
3 stars 0 forks source link

Reddit video once expanded, can't play fullscreen, pressing play un-maximises video again. #2

Closed p3ngwin closed 2 years ago

p3ngwin commented 2 years ago

I narrowed this script as the cause i think, apologies if it's not the actual root cause.

Annoyingly, Reddit's embedded player will only show the play button in the center of the video, no other controls, if you want to view fullscreen, you have to hit play to start the video to expose the controls, then pause it, then hit expand, then play again.

Hitting expand works, but once fullscreen if try to play/pause the video, it will pause, but play will un-maximise the video back to normal embedded view again. Makes it impossible to view and play fullscreen.

JenieX commented 2 years ago

No need for apologies. 😄

This embedded video seems to be working as it should, and the controls gets exposed when hovering the video. Care to share a post that has this issue.

p3ngwin commented 2 years ago

Hey thanks for the swift response :)

Your linked video oddly doesn't have the problem.

These also DO work: https://www.reddit.com/r/JusticeServed/comments/wf6cbh/pos_arrested_on_the_pitch_and_banned_for_life/

https://www.reddit.com/r/interestingasfuck/comments/wfifc5/a_gummy_bear_reacting_with_potassium_chlorate/

https://www.reddit.com/r/WinStupidPrizes/comments/wff7nc/going_200_kph_towards_a_roundabout/

https://www.reddit.com/r/PublicFreakout/comments/wfc8d8/alex_jones_caught_in_a_lie_in_court_where_he_is/

https://www.reddit.com/r/Whatcouldgowrong/comments/wfbhls/trying_to_get_out_of_a_tree/

These do NOT work:

https://www.reddit.com/r/WhatsWrongWithYourCat/comments/wf9v9v/comment/iiuizmq/?context=3

https://www.reddit.com/r/MyPeopleNeedMe/comments/wf4u3p/i_must_go_my_pavement_people_need_me/

https://www.reddit.com/r/holdmycosmo/comments/wfbcy2/hmc_while_walking_on_a_pond/

https://www.reddit.com/r/aww/comments/wf5vii/boy_is_getting_eaten_alive_by_horde_of_hungry/

These are all Reddit-player embeds, so i'm not sure what the differentiator could be, maybe i've found an edge case ??

P.S.

I think i've found the difference, all the videos that work have SOUND, any other video with NO SOUND will have this odd behaviour !

No idea WHY, i defer to your coding abilities hopefully to learn the reason, and find a solution :)

Hope this helps !

JenieX commented 2 years ago

I think you have solved it.

This script checks for and click the last button in the controls, which usually is the mute/unmute button. But not in the case of videos with no sound obviously. I'll figure a proper way around and update the script.

p3ngwin commented 2 years ago

Happy to help, do you have a means to receive donations, i'd like to throw something your way ?

JenieX commented 2 years ago

Happy to help, do you have a means to receive donations, i'd like to throw something your way ?

No, I don't. I just code for fun, because I like coding. 😄

p3ngwin commented 2 years ago

Well, you my appreciation for the lovely script you made that makes my day a little better every time i play a video on Reddit :)

Thank you.

JenieX commented 2 years ago

No problem.

I have updated the script, and it should work as expected.

P.S. That cat video was super funny. 😄

p3ngwin commented 2 years ago

YES ! confirmed working 100% THANK YOU !!

and yes, that cat vid is so cute :)