## Issue
The 15s saving interval (hijacking the position-saving code) is too far apart, causing rescys data to be lost when tab is closed/refreshed.
## Change
While I think it is fine to save to redux every second, it is still best to avoid that since a state change will always cause the map-to-props to evaluate.
Chose 5s as the interval and moved away from the position-saving code (the recsys videojs plugin is a better choice to handle this).
Also save it on `t=1` so that at least we know it played prior to the tab refreshing/closing.
## Considered
- Didn't want to do `beforeunload` again since it is unreliable and a pain to test in mobile.
Ticket: 1751
## Issue
The `totalPlayTime` resides in the videojs plugin and is only sent to the recsys object in `onPlayerDispose`, so it missed the redux rehydration in the browser close/refresh scenario.
## Change
Update the recsys value for `totalPlayTime` immediately so that it'll be part of the redux stashing (and later, rehydration).
Note that recsys data is currently being saved to redux in a 15s interval. Will change that in the next commit.
* add mobile plugin back on ios
* further touchups and fix ios
* finish mobile functionality
* dont show big play button on mobile
* remove logs
* proof of concept
* dont go full screen on rotate
* add back functionality
* replace dispose event with navigate away
* bugfix
* turn off show if you liked button and nag only on homepage
* add back old functionality
* ending event not working
* test here
* working but needs cleanup
* more player touchups
* bugfix
* add settings button on mobile
* more touchups
* more cleanups
* touchup loading functionality
* fix hover thumbnails
* touchup and eslint fix
* fix repopulation bug
* change recsys event name
* bugfix events
* change the way buttons are removed and added
* finish chapters button
* refactor to use videojs methods
* refactor to fix autoplay next
* ux touchups
* seems to be behaving properly
* control bar behaving how it should
* fix control bar on ios
* working on flow and eslint errors
* bugfix and flow fixes
* bring back nudge
* fix playlist button bug
* remove chapter markers properly
* show big play button
* bugfix recsys closed event
* fix analytics bug
* fix embeds
* bugfix
* possible bugfix for kp
* bugfix playlist buttons
* fix issue with mobile ui plugin
* fix firefox autoplay issue
* fix bug for play on floating player closed
* bugfix volume control for ios
* instantiate new player if switching between claim types
* fix flow and lint errors
* fix control bar not showing up when switching sources
* dispose old player if recreating
* bugfix save position
* reset recsys data between videos
* fix audio upload posters
* clear claimSrcVhs on reload
* bugfix errant image previews showing up
* reset player value of having already switched quality
* fix watch position not being used
* bugfix switching between sources not perserving position
* fix save position bug
* fix playlist buttons
* bugfix
* code cleanup and add back 5 second feature
* recsys wip
better logging
fix floating player popout playing uri bug with recsys
lint
add empty entries to create
use beacon; fire on visibilitychange
cleanup, not record recs if not seen
ifweb recsys beacon
recsys handle embeds, cleanup
use history.listen to trigger events
fix recsys embed bug
bugfix
more default data
cleaner
cleaner
* remove tentative
* disable recsys debug logging
## Issue
6366 Recsys Evaluation Telemetry
The recommended list from lighthouse is obtained from `makeSelectRecommendedContentForUri`. This list is further tweaked by the GUI (e.g. move autoplay next item to top, remove blocked content, etc.). Recsys wants the final recommendation list and the clicked index (in exact order), so we need pass these info to the videojs recsys plugin somehow. Also, Recsys wants a recommendation list ID as well as the parent (referrer) ID, we so need to track the clicks and navigation.
## General Approach
- It seems easiest to just spew back the final (displayed) list and all the required info to Redux, and the recsys plugin (or anyone else in the future) can grab it.
- Try to touch few files as possible. The dirty work should all reside in `<RecommendedContent>` only.
## Changes
- `ClaimPreview`: add optional parameters to store an ID of the container that it is in (for this case, it is `ClaimList`) as well as the index within the container.
- When clicked, we store the container ID in the navigation history `state` object.
- For general cases, anyone can check this state from `history.location.state` to know which container referred/navigated to the current page. For the recsys use case, we can use this as the `parentUUID`.
- `ClaimList`: just relay `onClick` and set IDs.
- `RecommendedContent`: now handles the uuid generation (for both parent and child) and stores the data in Redux.
- The `rateChange` event now logs the updated speed,
not just the time at which it occurred.
- The `scrub` now (more) accurately logs the position
it came from before the destination.
- The recsys events get consolidated for logical consistency.