Commit graph

118 commits

Author SHA1 Message Date
zeppi
4e3b07ede5 disable aniview 2021-08-23 11:55:30 -04:00
jessopb
fb03d3a7f9
Fix video dispose (#6904)
* fix video dispose bug

* remove commented
2021-08-18 19:30:07 -04:00
jessopb
7f35f87893
aniview only web - v0.1 (#6898) 2021-08-18 11:00:51 -04:00
jessopb
5f55603fb2
send recsys powered-by (#6875)
* send recsys powered-by

* update lighthouse call in useLighthouse

* rename select selectors

* update channel search too
2021-08-17 10:03:25 -04:00
zeppi
892a6deeaf reenable prerolls 2021-08-10 16:30:58 -04:00
zeppi
68bc4e3b90 Revert "disable google imasdk"
This reverts commit 283bbb52fa.
2021-08-10 16:30:58 -04:00
infinite-persistence
1d6101ddd2 Report recsys info when 'share_data_usage' is enabled.
Previous:
~~Although it was collecting info for all platforms, the data is only sent for Odysee.~~ Correction: it became enabled for all platform after `master` became Odysee.

New:
Only send out the telemetry for `IS_WEB` or if there's user consent.
2021-08-03 09:34:36 -04:00
infinite-persistence
34368760de Fill in remaining Recsys fields
## 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.
2021-08-03 09:34:36 -04:00
infinite-persistence
ffad52d5b7 Remove console.log
Seems like lint is being bypassed recently?
2021-07-23 08:42:58 -04:00
zeppi
283bbb52fa disable google imasdk 2021-07-20 15:12:14 -04:00
zeppi
8674b97be8 disable aniview 2021-07-20 15:12:14 -04:00
zeppi
f6dc48fdc0 use odysee recsys plugin 2021-07-19 17:30:44 -04:00
zeppi
50875566ad more 2021-07-19 13:52:15 -04:00
DispatchCommit
d32af5606b move pre-roll ad logic into it's designated video.js plugin 2021-07-13 22:22:06 -04:00
DispatchCommit
47d9b4a866 fix site detection, add hide logo to macro url 2021-07-13 00:06:32 -04:00
DispatchCommit
8253f5e0dc center play button 2021-07-13 00:06:32 -04:00
DispatchCommit
b777669a7e Add pre-roll ads
change ad macro url
rework video.js load logic
fix autoplay and retry errors
yeet player.ended error
fix another race condition
fix another error message
add allowPreRoll restrictions
fix some lint issues
remove annoying lint rule
remove video.js lazy loading
more linting fixes
2021-07-13 00:06:32 -04:00
infinite-persistence
5d8e3d8b0a
Revert lazy-loading videojs
## Issue
The loading circle wasn't showing up, causing confusion.

Splitting CSS doesn't seem trivial as there seems to be a huge dependency on the load order. Pretty much similar to what this person is facing https://lihautan.com/css-code-splitting/#the-problem

## Change
This reverts videojs-specific changes from 4d638bcf.
2021-07-06 17:04:16 +08:00
infinite-persistence
2e0f8c6120
Fix videojs overlay css
Related:
aaffd3b089 "CodeSplit: Load 3rd-party css before ours."
2021-07-01 15:23:42 +08:00
DispatchCommit
da23a5625b fix video js imports 2021-06-30 19:12:21 -07:00
zeppi
304c0553da lint 2021-06-29 14:52:11 -04:00
John B Nelson
5e2a4960fb FIX video.js event firing issues fore RecsysPlugin
- 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.
2021-06-29 14:52:11 -04:00
infinite-persistence
5766dc34b5 Port recsys to master; enabled for SIMPLE_SITE only 2021-06-29 14:52:11 -04:00
Anthony
312c561529 update comment 2021-06-26 22:26:40 -04:00
Anthony
ab13b23cef dont display cc button via videojs settings 2021-06-26 22:26:40 -04:00
infinite-persistence
aaffd3b089
CodeSplit: Load 3rd-party css before ours.
A temporary solution until we code-split css.
2021-06-25 16:00:45 +08:00
infinite-persistence
244f5ecaa4 Fix videos not switching when floating player is up
## Issue
6278 Video doesn't switch when floating player is up

## Notes
Not sure why the double `src` call is needed, but it is.
2021-06-19 11:23:29 -04:00
zeppi
eff948f786 toms fix for player timeout bug 2021-06-11 13:40:01 -04:00
infinite-persistence
47539edcab Fix lint (removal of videoFetchDuration) 2021-06-10 10:14:52 -04:00
Anthony
272eb90392 remove native controls for ios 2021-06-04 15:41:42 -04:00
Anthony
eef218a807 use video js viewer for ios and add playsinline 2021-06-04 15:41:42 -04:00
infinite-persistence
2dac41e5e5
Mute video when autoplay is blocked by browser policy (#6087)
## Issue
When opening a video directly in Chrome Incognito, the video should autoplay (since that's the default Lbry setting), but it doesn't due to browser policy
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

## Changes
- We don't want to forcefully mute the video when `autoplay=true`; we just want to do it when the browser policy is applied.
- Fortunately, there is already an existing code-block for us to check that.

## Test cases
- [x] "Autoplay=Off" should not be affected.
- [x] After manually unmuting, the next autoplayed video should not be muted (this is "user interacted" opening, so the policy allows autoplay)
- [x] If manually muting, the next autoplayed video should retain user's last setting.

## Known issues
- I've seen `error` occasionally being undefined in the `catch` block. In those cases, the solution doesn't work. We could remove `if (player.autoplay() && !player.muted())` and simply just try muting it, but for now it's better to ensure `NotAllowedError` is due to unmuted first before applying the fix.
- This doesn't work for Firefox as there is an explicit "Allow Autoplay" button in the address bar that user needs to click themselves. Applies to all sites.
2021-05-19 11:56:54 -04:00
infinite-persistence
b0996d4d18 Mobile: make double-tap match the arrow keys (+/-5s instead of 10s)
## Issue
One of the items in 5865 Video shortcut issues

This one is not really an issue, but it would be nice to match what the arrow keys are doing. Also, in slower regions, seeking 10s will almost always end up buffering.
2021-04-27 09:26:19 +08:00
Max Kotlan
1279a6eaaf Fixed and cleaned up Hotkeys. Fixed overlapping lbry hotkeys with browser hotkeys 2021-04-19 13:34:10 -04:00
Sean Yesmunt
e08b71774c pre-roll ads 2021-04-12 12:55:06 -04:00
DispatchCommit
954966abbb fix linting errors 2021-03-21 20:36:50 -04:00
r0ckinn
6b8554517c also add keybinds for volume 2021-03-21 20:36:50 -04:00
r0ckinn
6b3dce0450 improve keyboard shortcuts 2021-03-21 20:36:50 -04:00
infiinte-persistence
83912627de vjs: Fix 'Video-setting persistence broken'
## Issue
5513: Video-setting persistence broken

## Notes
- Per videojs recommendation, the setting-restoration should be done after the video has been loaded, so the action was moved to `loadedmetadata`. This fixed the volume slider problem, and should have fixed the playbackRate too.
- For playbackRate, there is another special case where it gets reset to 1 (refer to comments in code).
2021-03-15 15:03:15 -04:00
infiinte-persistence
09c1cfeb8f vjs: Fix 'Video showing previous audio clip's thumbnail instead'
## Issue
5450: Video showing previous audio clip's thumbnail instead

## Notes
`createVideoPlayerDOM` depends on `isAudio`
2021-03-15 15:03:15 -04:00
DispatchCommit
1f3035b2f9 remove console.log for linter 2021-03-09 16:04:40 -05:00
DispatchCommit
d47b6eae0c Track duration for initial video fetch time
this may help identify degraded services and poor user experience.
2021-03-09 16:04:40 -05:00
DispatchCommit
db2e1aafb1 rename getHls to getVhs
adds deprecation warning and allows for backwards compatibility
2021-03-09 15:31:29 -05:00
DispatchCommit
d6aa72ed94 hls options is deprecated. Use vhs instead.
Fixes this video.js warning:
VIDEOJS: WARN: Using hls options is deprecated. Use vhs instead.
2021-03-09 15:31:29 -05:00
infinite-persistence
af8b683308 videojs: Localize + add shortcut tooltip
## Issue
Partially closes 3041: Display/hint what keyboard shortcuts are available in videos
(minus the "all shortcuts" overlay -- saving that for another day)
2021-03-08 14:13:56 -05:00
infinite-persistence
05383701af Restore video loading circle
## Issue
5554: Video: loading circle sometimes does not appear until 2nd click

## What's happening
videojs behavior:
(a) A `src` change makes the Play button re-appear.
(b) An `onPlay` (or `play()`) makes the button go away.

Due to the `m3u8` header async fetch (i.e. return is potentially delayed), the initial `onPlay` (which cleared the button) that happened after user clicked Play gets negated by a potentially-delayed `src` change.

# Changes
- Manually hide the play button that is induced by the change in `src`. In the fetch-delay scenario mentioned above, the player continues to be in a 'playing' state anyway.
- But don't hide the button if paused externally (e.g. browser-level)
Restore video loading circle
2021-03-08 13:28:25 -05:00
DispatchCommit
1d12fc8102 hide quality selector by default 2021-03-08 12:08:12 -05:00
DispatchCommit
46f58c63c8 Pull styling out out into it's own file
Also restores the CSS for vjs-overlay which I commented out previously for *some* reason (but I don't know why, and it doesn't seem to make a difference whether I comment it out or not)
2021-03-05 16:51:45 -05:00
DispatchCommit
d21a4fe8ab Remove intermediate accent-color sass var
Replaced with direct usage of `var(--color-primary);`
2021-03-05 16:51:45 -05:00
DispatchCommit
3fb0ac80ae Prevent user from highlight selecting UI 2021-03-05 16:51:45 -05:00