- Fixed value props being named like a function/selector.
- Fixed flow type for membership (should be `?string`).
- It might not matter in the current code, but the whole purpose of type checking to catch usage errors in the future.
- `hasXXX` indicates a boolean, so it doesn't make sense to force the client to input a string.
## 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.
* adding preorder button
* adding preorder modal
* frontend mostly done
* check if its already purchased
* refresh page after purchase
* smooth out purchase process
* check if user has card saved
* handle case where its the users own upload
* fix transaction listing order bug
* cleaning up code for merge
* fix lint errors
* fix flow errors
* allow eur purchases
* support eur on customer transaction page
* fix css
* Remove ad-handling in videojs.jsx
Primary impetus is to remove unnecessary IntersectionObserver usage, but it should be removed anyway because:
- no longer relevant today with Adnimation's script.
- we also globally hide floating ads now, so no more invisible divs.
- the code is wrongly placed -- it's not the responsibility of the Videojs component.
* use-lazy-loaded: skip if IntersectionObserver is not supported
## Issue
Page not loading in older Safari (e.g. ipad air 2)
## Approach
Instead of using a polyfill (which comes with implementation caveats), just not apply the lazy-loading for those old browsers. Not lazy-loading is better than not loading at all, plus this is way easier to test (even by just reading the code) than testing out the polyfill implementation's caveats.
The cons is we would need the polyfill if we use it in other places in the future.
## Code Changes
Factor out the src-setting code, and use it directly when IntersectionObserver is not found.
* PublishReleaseDate: improve calendar error handling
Ticket: 1738
- Report invalid `minute` and `day`. The 3rd-party widget auto-corrects the other fields. Don't think there is a way to make it autocorrect for all.
- Report invalid range (cannot set to future date).
* Block form on releaseDate error instead of silently sending last valid value
which does not tally with what's on screen.
## Issue
1709 - If you sign in while reporting, you end up in the homepage
## Notes
The other option is to just make `<Header>` always redirect back to where it came from using the full path. But existing code elsewhere seem to always trim off any params (e.g. `location.search`, `location.hash`) when doing redirects.
So, ended up making it generic and let the caller decide where to redirect (and with what params).
## Ticket
1526 strange thumbnail size requested on mobile layout (pc only?)
## Notes
The 900px was to account for blur tile thumbnails in mobile homepage (4f4803c6).
Fix to only do that in tile mode.
## Ticket
1526: strange thumbnail size requested on mobile layout (pc only?)
## General Problem
It was trying to fetch based on the exact size of the video container, which would satisfy Core Vitals (in an overkill way), but would bring several issues:
- server-side caching would not work since everyone's window size is different in a responsive layout design.
- the additional 200ms wait for container size to settle down is not good (hardcoded wait time).
- the code did not account for device-pixel-ratio, so it's quite a futile effort.
Aside: In the past, we used to take the same image url as the tiles, so the video poster would appear immediately from due to browser cache, but the quality is bad because the tile requested a much smaller size.
The embed wrapper was not going through the CDN either as a null `containerRef` was passed in.
## Change
Removed the container-size check and just request for 1280x720. Reasons for this size:
- On average, that would be the ballpark of the final calculated value anyway for the average screen (+DPR consideration).
- That seems to be the current suggested thumbnail size in most recommendations.
- Our YT Sync is grabbing a much smaller size anyway.
We are asking Outbrain to make it order-agnostic, but for now, we need to load the Sticky script first before the Banner script.
This is ugly code because the requirement is not obvious unless we put a bunch of comments, but I don't want to pollute `app/view.jsx`. Hopefully they can address this and we can revert in the coming days.
Fixed the title that did not update from stale closure because we no longer re-initialize the plugin.
We still continue to sever the connection when switching sources for now (although videojs is now single-instance) due to a problem that stops the next remote playback after 5-10 seconds. Unclear whether it is the plugin problem or due to our changes (although I don't see this issue in their repo).
1684
While Lighthouse suggests adding `alt`, I think it's just a recommendation that does not affect the Core Vitals score directly -- the large css plays a bigger role at the moment.
Also, these are more "decorative" than "functional", because one could click the channel name navigate.
* Playback-rate: fix popup behavior
- Part of 1637 - invokes the popup menu when clicked.
- This also makes the button consistent with other `MenuButton`s, i.e. to invoke a menu popup when clicked instead of hovered.
* Adjust CSS
Co-authored-by: Raphael Wickihalder <raphael.wickihalder@odysee.com>
* 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
* Save notification menu prototype
* Add dynamic links
* Add timestamps
* Mark as seen on click
* Fix guest mode
* Fix discussion links & channel thumbnails
* Adjust some details
* Adjust theme
* Replaxe Menu with MuiMenu
* Fix Mui behavior & transitions
* Adjust Mui menu behavior
* Adjust some padding
* Fix read & see
* Clean code
* Adjust border on top notification
* Add case for comment replies
* Save
* Make alignment pixel perfect
* Clean code
* Adjust gif avatars, stickers & tips
* Add delete function
* Add delete icon hover effect
* Add outline to delete icon
* Fix seeNotification call
* Add case for empty notification listä
- The function name is good and self-documenting, so removed the redundant comment. Whether it's 'precise' or not, it could change in the future and not worth maintaining a comment like that.
- Focused on the non-obvious reason for SHIFT key instead.
- Fixed "on scroll" variable naming since it is not just for scrolling (it applies to keyboard up/down too)