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

Youtube and Twitch videos now provide more accurate times than before #522

Merged
merged 1 commit into from
Oct 2, 2018
Merged

Youtube and Twitch videos now provide more accurate times than before #522

merged 1 commit into from
Oct 2, 2018

Conversation

jasonrsadler
Copy link
Contributor

@jasonrsadler jasonrsadler commented Sep 28, 2018

Fixes brave/brave-browser#971
Fixes brave/brave-browser#1277

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Needed or QA/No-QA-Needed) to include the closed issue in milestone

Test Plan:

  • See Additional Information for testing caveats
  1. Start Brave with clean profile and enable Rewards
  2. View a youtube video and ensure time is reflected properly in publisher_info_db with actual viewing time.

  1. Start Brave with clean profile and enable Rewards
  2. View a youtube video using a combination of pause and seek and ensure time is reflected properly with actual viewing time.

  1. Start Brave with clean profile and enable Rewards
  2. View four youtube videos and play all at once and ensure time is reflected properly with actual viewing time of each video.

  1. Start Brave with clean profile and enable Rewards
  2. View four youtube videos and play all at once using a combination of pause and seek and ensure time is reflected properly with actual viewing time of each video.

Repeat Previous tests using Youtube live streams

  1. Start Brave with clean profile and enable Rewards
  2. View a Twitch live stream and ensure time is reflected properly in publisher_info_db with actual viewing time.

  1. Start Brave with clean profile and enable Rewards
  2. View a Twitch VOD and ensure time is reflected properly in publisher_info_db with actual viewing time.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

Additional Information

  • Entries in publisher_info.db are updated at 10 seconds and then once every ~40 seconds after
  • Tabbing off of a video or closing a video tab will discard the current interval if it hasn't been polled yet. Example: If you watch 2 minutes of a video and have 120 logged, closing at 2:10 before the time interval has been polled will discard the last 10 seconds

@NejcZdovc
Copy link
Contributor

@jasonrsadler please rebase

@jasonrsadler
Copy link
Contributor Author

Done.

@jasonrsadler jasonrsadler reopened this Sep 28, 2018
@bbondy bbondy changed the title Youtube and Twitch videos now provide more accurate times than before WIP: Youtube and Twitch videos now provide more accurate times than before Oct 2, 2018
@NejcZdovc NejcZdovc changed the title WIP: Youtube and Twitch videos now provide more accurate times than before Youtube and Twitch videos now provide more accurate times than before Oct 2, 2018
…es time recording for media publishers
@NejcZdovc NejcZdovc self-requested a review October 2, 2018 16:37
@NejcZdovc NejcZdovc merged commit 1aacc21 into brave:master Oct 2, 2018
NejcZdovc added a commit that referenced this pull request Oct 2, 2018
Youtube and Twitch videos now provide more accurate times than before
NejcZdovc added a commit that referenced this pull request Oct 2, 2018
Youtube and Twitch videos now provide more accurate times than before
@NejcZdovc
Copy link
Contributor

master 1aacc21
0.56.x d7e77bc
0.55.x 20465a7

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