Commit graph

167 commits

Author SHA1 Message Date
infinite-persistence
7cbb7a54aa
Handle browsers that don't support IntersectionObserver (#1739)
* 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.
2022-06-23 08:10:27 -04:00
mayeaux
d50f51bd3b
fix plays inline bug on ios (#1723) 2022-06-21 09:55:25 -04:00
mayeaux
63f7a8f15c
bugfix streams continuing to run in the background (#1714) 2022-06-20 18:17:12 -04:00
Anthony
c3fd7ab8d7 show poster on first audio file 2022-06-15 09:59:41 -04:00
infinite-persistence
363fe82050
Fix chromecast title handling (#1685)
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).
2022-06-14 00:34:35 -04:00
infinite-persistence
d3365d69f9
Playback-rate: fix popup behavior (#1650)
* 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>
2022-06-13 15:55:05 +02:00
mayeaux
87c94e3c1c
Reuse videojs instance between video reload, return mobile UI plugin for iOS (#1512)
* 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
2022-06-10 12:18:58 -04:00
mayeaux
8aaa820e2f
Add volume control using scroll wheel from myzel, with flow errors fixed (#1638)
* created function

* removed console logs

* made volume change on mousewheel functional

* improved code

* added precise volume control

* updated behavior

* fixed error

* fix flow errors

Co-authored-by: myzel394 <50424412+Myzel394@users.noreply.github.com>
2022-06-06 09:37:44 -04:00
Anthony
9b2cc7eb79 dont show subs for ios and correct position for actual subs 2022-05-31 10:41:31 -04:00
Raphael Wickihalder
ca135cc7f8 Integrate media session api 2022-05-29 09:18:57 -04:00
saltrafael
3918906605
Remove clearPosition functions for playlists (#1560)
- Let the position be cleared at the end like regular videos
2022-05-24 06:07:46 -04:00
mayeaux
bb065eb408
dont run image preview on mobile (#1527) 2022-05-18 16:50:30 -04:00
mayeaux
0cf8c181df
Preview image thumbnails (#1514)
working example

use my forked package

touchups to presentation

Make progress bar thumbnail sprite pixel perfect

add vtt path

fix progress bar a bit

add a black background

use odysee team package

fix two issues for merge
2022-05-18 18:02:02 +02:00
Thomas Zarebczan
1d61d80009
more analytics + fixes (#1476)
more analytics + refactor

- passes player with time to start (until we move this api to watchman)
- supports livestream metrics for buffering
- fixes bug with buffering over 10 second period
- less head calls by moving to videojs-events

* review fixes
2022-05-17 10:47:44 -04:00
infinite-persistence
5e944499f3
Refactor "Theather Mode" 2022-05-17 16:16:39 +08:00
infinite-persistence
535d02807a
Refactor "Autoplay Next" 2022-05-17 16:16:38 +08:00
infinite-persistence
36ddc69c13
videojs: refactor i18n (breaking up 'events' file)
## Issue
I couldn't find where the i18n went because the "events" refactor is just as confusing as the original -- unrelated things are still lumped together in a file.

Also, factoring based on events isn't useful -- it is features that drive what events are needed, not the other way around. This forces features to register events here, and do other things elsewhere? It will be more intuitive to have a one-file-per-feature structure.

## Change
Use existing frameworks to encapsulate things to manageable units/features:
(1) the React useEffect files (can be used isolate out React features like 'tap-to-mute' handling).
(2) the videojs plugins framework.
2022-05-17 16:16:37 +08:00
Thomas Zarebczan
ac0ec4794a
Fix quality selector 2022-05-12 11:48:21 -04:00
infinite-persistence
9fd890cfc2 Remove orphaned comment and unnecessary flow marker
Was confused on which part of the code this was referring to, but turns our `subCaps` was recently removed.
2022-05-04 10:02:22 -04:00
infinite-persistence
c5e185fa6d DRY: VIDEO_PLAYBACK_RATES 2022-05-04 10:02:22 -04:00
Rafael
daaa787f97 Initial quality notify based on already set setting 2022-04-26 08:18:41 -04:00
Rafael
753c47ace5 Add initial change Toast notify 2022-04-26 08:18:41 -04:00
Rafael
ef7e6a56b4 Only change default from settings page 2022-04-26 08:18:41 -04:00
Rafael
73f27cc67e Add ability to store quality settings as default 2022-04-26 08:18:41 -04:00
infinite-persistence
7445063405 Use videojs::http-streaming for all except iPhones
## Ticket
31: "quality selector not available on safari browsers"

## Notes
The quality selector isn't populated in some Apple products -- a known issue with videojs as the platform doesn't relay the info.

But it seems like only iPhone is affected, so let's enable the override for all platforms except iPhone.
2022-04-25 09:14:24 -04:00
Thomas Zarebczan
8144a9bb87 livestream new api
Re-used lots of Anthony's code + made fixes to a few areas including the publish page.

a

new videojs

video.js@7.18.1 + http-streaming@2.14.2

remove console log
2022-04-20 15:53:28 -04:00
infinite-persistence
49db1fe83b Replace IS_IOS and IS_ANDROID with platform 2022-04-14 10:29:01 -04:00
infinite-persistence
c1fb160452 Use non-VHS link when "original" is selected.
Ticket: 638
2022-04-14 02:41:23 -04:00
infinite-persistence
33adf7aab2 Add "original" quality button 2022-04-14 02:41:23 -04:00
infinite-persistence
4f600fbc8e Cleanup; no functional change.
- Handle null `vjsPlayer` so we don't need to add FlowFixMe everywhere.
- Remove redundant comments.
2022-04-14 02:41:23 -04:00
Thomas Zarebczan
17d5d5c73b partial new livestream api support 2022-04-13 11:52:00 -04:00
Thomas Zarebczan
e40b65b975 Revert "send 10 percent of traffic to other server"
This reverts commit 0fcdbc7858.
2022-03-25 15:35:05 -04:00
Anthony
0fcdbc7858 send 10 percent of traffic to other server 2022-03-25 14:28:57 -04:00
Thomas Zarebczan
087282578f add airplay 2022-03-25 11:31:11 -04:00
Thomas Zarebczan
7477208c4e
Chromecast on Lives
+ remove some dev code that's no longer needed...
2022-03-23 00:19:53 -04:00
Raphael Wickihalder
5632624cd9
Center play button 2022-03-17 10:30:50 +01:00
Rafael
f4fdee8331 socket improvements 2022-03-16 16:36:50 -04:00
Thomas Zarebczan
60c317dedf various fixes 2022-03-16 16:36:50 -04:00
Rafael
6dea79819d livestream + old APIs 2022-03-16 16:36:50 -04:00
David Granado
ce903c9280
Patch to restore position upon returning to video until more fully fleshed out fix can be introduced (#817)
* Patch to restore position upon returning to video until more fully fleshed out fix can be introduced

* Add code to notify other open tabs of position saving

* Fix typo

* Wrap localStorage access in try/catch in event browser settings make it unavailable

* Remove formatting changes

* Move constant from 'pages' to 'player'

* Move dispatch out of try/catch

* Fixed typo
2022-02-07 12:51:26 -05:00
mayeaux
373766c5b5
Fix vidcrunch on ios to only show ad when its scrolled to (#651)
* fix vidcrunch on ios to only show ad when its scrolled to

* clean up and optimize code
2022-01-10 22:21:55 +01:00
mayeaux
b822fbdac8
fix ios can autoplay bug (#640) 2022-01-06 22:20:42 +01:00
mayeaux
58bdcbd1ed
Reduce triple call to single call, improve video loading, fix embed play button being off-center (#546)
Lots of optimizations and cleanup for the player. If we run into any strange issues, can revert.
2022-01-06 14:28:27 -05:00
Anthony
bc514b1d5c fix lint errors 2021-12-15 15:00:28 -05:00
Anthony
c214209747 disable preroll ads 2021-12-15 15:00:28 -05:00
infinite-persistence
561ed0ea23 -- experiment with forcefully closing the session on dispose 2021-12-10 14:16:03 -05:00
infinite-persistence
42a8f3180d Pass the title and channel name to Chromecast.
As noted in a comment, we need to be careful when adding props to `VideoJs` to avoid renders.

Used primitive strings (title, channelName) instead of passing the entire `claim`, which could have its reference invalidated.
2021-12-10 14:16:03 -05:00
infinite-persistence
4c84fde31b Add Chromecast support on Google Chrome. 2021-12-10 14:16:03 -05:00
infinite-persistence
428c00901b
Fix double pause button in mobile (#408)
Restored css load-order that was changed from a recent refactor.
2021-12-01 22:06:22 -05:00
saltrafael
4fd4309829
add Player.js Support (#378)
* Reorder video.js imports and props

* Install player.js

* Add player.js adapter for video.js
2021-11-30 15:46:03 -05:00