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

Add support for rewind and fast forward in drive.google.com and structured the code #1151

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zeolee01
Copy link

@zeolee01 zeolee01 commented Nov 6, 2024

Google Drive Video Player Rewind and Fast Forward Extension (Updated) and structured the code

In response to a recent update to Google Drive’s video player, the previous functionality that enabled rewind and fast-forward features (which were based on the YouTube video player) stopped working. The earlier solution relied on the YouTube player API, but with the new update to Google Drive’s video player, the previous approach became incompatible.

To restore the desired functionality, I personally updated the code to ensure users can still control video playback with ease. This extension now allows rewind and fast-forward features for videos hosted on Google Drive, ensuring that users can navigate videos efficiently as they did before the update.

New Features:

•	Rewind: Jump backward in time by a specified number of seconds, enabling users to skip unwanted content or go back to an earlier section.
•	Fast Forward: Jump forward by a specified number of seconds, allowing users to quickly skip ahead to a desired point in the video.
•	Cross-platform Support: The functionality now works seamlessly across browsers and with Google Drive’s updated video player.

@zeolee01 zeolee01 changed the title Add support for rewind and fast forward in drive.google.com Add support for rewind and fast forward in drive.google.com and structured the code Nov 6, 2024
break;
default:
// Directly update the media tag if it's neither Netflix nor Google Drive
mediaTag.currentTime += seekSeconds;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, isn't the default branch doing exactly the same thing?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the extension is not working for the videos stored in google drive... so i thought this was the reason...

Copy link
Owner

@igrigorik igrigorik Nov 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the injected script is literally doing the same operation:

videoElement.currentTime += event.data.seekMs / 1000;

Something else is amiss here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants