Commit Graph

141 Commits

Author SHA1 Message Date
Bettenbuk Zoltan 2a5adfc601 Remove some Flow annotations 2019-03-25 13:53:08 +01:00
Saúl Ibarra Corretgé c025c7e132 flow: tame the beast
🔥🔥🔥
2019-03-21 14:47:55 +01:00
Saúl Ibarra Corretgé 0e92e73789 chore: use strings as action types
Using anything non-serializable for action types is discouraged:
https://redux.js.org/faq/actions#actions

In fact, this is the Flow definition for dispatching actions:

declare export type DispatchAPI<A> = (action: A) => A;
declare export type Dispatch<A: { type: $Subtype<string> }> = DispatchAPI<A>;

Note how the `type` field is defined as a subtype of string, which Symbol isn’t.
2019-03-21 14:47:55 +01:00
Leonard Kim 7614ceda68 ref(video): remove deprecated lifecycle methods from gesture handler 2018-12-03 11:45:09 +01:00
Leonard Kim 822bc31d69 ref(video): use videoTrack from props
It doesn't seem like videoTrack needs to be set onto state
if it can be accessed directly from props. Removing the state
automatically removes the deprecated componentWillReceiveProps.
2018-12-03 10:10:24 +01:00
Bettenbuk Zoltan 3fdf944763 Fix eslint/jsdoc warnings (doc change only!) 2018-11-08 15:52:34 +01:00
Leonard Kim 486e8e35d9 ref: move all prop type declaration to flow
For the most part the changes are taking the "static propTypes" declaration off
of components and declaring them as Flow types. Sometimes to support flow some
method signatures had to be added. There are some exceptions in which more had
to be done to tame the beast:
- AbstractVideoTrack: put in additional truthy checks for videoTrack.
- Video: add truthy checks for the _videoElement ref.
- shouldRenderVideoTrack function: Some component could pass null for the
  videoTrack argument and Flow wanted that called out explicitly.
- DisplayName: Add a truthy check for the input ref before acting on it.
- NumbersList: Move array checks inline for Flow to comprehend array methods
  could be called. Add type checks in the Object.entries loop as the value is
  assumed to be a mixed type by Flow.
- AbstractToolbarButton: add additional truthy check for passed in type.
2018-11-07 17:38:10 +01:00
Saúl Ibarra Corretgé d290d28248 feat(Audio): fix react warning 2018-10-10 18:07:36 +02:00
Ritwik Heda 1d99abc4a4 removes need for `eslint-disable-next-line react/jsx-wrap-multilines` and `eslint-diable-line no extra-parens` 2018-08-12 17:06:35 -05:00
Lyubo Marinov b9c5ed3b03 Fixes typo, comment 2018-08-05 17:18:14 -05:00
paweldomas 6a31c59081 ref(media/VideoTrack.native): remove fade animation 2018-07-27 12:08:54 +02:00
Saúl Ibarra Corretgé 87fa8de815 feat(sanity): axe IE and Temasys plugin support 🔥🔥🔥 2018-06-28 13:55:12 +02:00
Saúl Ibarra Corretgé 7b0a6a2ee5 [RN] Add ability to loop sounds 2018-06-22 14:34:01 +02:00
Daniel Ornelas ad259988b9 [RN] Fix for creating video track when conference is ending. 2018-06-20 11:24:07 +02:00
Saúl Ibarra Corretgé 0817482b9c flow: tame the beast 2018-06-04 16:05:48 -05:00
Lyubo Marinov 92fee790f2 Fix jsdoc 2018-05-28 18:54:11 -05:00
Saúl Ibarra Corretgé bbb1dce42a [RN] Simplify styles which fill the parent view
Turns out React Native offers an object with the following definition:

{
    bottom: 0,
    left: 0,
    position: 'absolute',
    right: 0,
    top: 0
}
2018-05-23 14:30:22 +02:00
hristoterezov c344a83376 Outgoing call ringtones (#2949)
* fix(PresenceLabel): Use translated strings for the presence label.

* feat(sounds): Implements loop and stop functionality.

* feat(invite): Add ringtones.

* fix(invite): Code style issues.
2018-05-16 11:03:10 -04:00
zbettenbuk 959db3a665 Make web use the redux settings/profile 2018-05-09 15:20:22 +02:00
zbettenbuk 6947926494 Add dynamic move threshold to pnz touch detection 2018-04-25 16:35:22 -05:00
Lyubo Marinov 66bf5cf966 [RN] Avoid "pinch to zoom" onPress
It's too sensitive and most of the time I cannot perform an onPress. In
contrast, the builtin/default/standard onPress is noticeably more
forgiving. While we fix the sensitivity of "pinch to zoom", don't use
its onPress unless absolutely necessary i.e. use it only for desktop
streams.
2018-04-17 17:42:46 -05:00
zbettenbuk e30d141cec Proper use of getPropertyValue in base/media 2018-04-13 21:57:40 -05:00
zbettenbuk 1513e1f3b3 Make getPropertyValue's config easier to use 2018-04-13 21:57:07 -05:00
Zoltan Bettenbuk 78ff0f7864 Separate handling config and profile with precedence (#2784) 2018-04-11 10:02:31 -07:00
paweldomas 8b2ce21e1a fix(RN): bundle sound files in release build
On Android the files will be copied to the assets/sounds directory of
the SDK bundle on build time. To play the "asset:/" prefix has to be
used to locate the files correctly.

On iOS each sound file must be added to the SDK's Xcode project in order
to be bundled correctly. To playback we need to know the path of the SDK
bundle which is now exposed by the AppInfo iOS module.
2018-04-10 10:59:52 +02:00
Zoltan Bettenbuk 79b7e1641d Add pinch zoom functionality 2018-04-10 01:20:53 -05:00
Zoltan Bettenbuk decbcefbd4 [RN] Don't press on Conference in preparation for 'pinch to zoom'
TouchableWithoutFeedback and TouchableHighlight interfere with the
implementation of 'pinch to zoom' to come. We prepare for it by driving
the onClick/onPress handler(s) out of Conference, through LargeVideo and
ParticipantView into Video itself where the bulk of 'pinch to zoom' will
be implemented.
2018-04-10 01:20:52 -05:00
Zoltan Bettenbuk cb70c084b3 [RN] "The View is never the target of touch events"
In preparation for "pinch to zoom" support in desktop streams on mobile, make
certain Views not intervene in touch event handling. While the modification is
necessary for "pinch to zoom" which is coming later, it really makes sense for
the modified Views to not be involved in touching because they're used to aid
layout and/or animations and are to behave to the user as if they're not there.
2018-04-10 01:20:52 -05:00
paweldomas 4dbcaf851f flow(AbstractAudio): specific function types 2018-03-13 16:57:29 -05:00
paweldomas 04dff9059b ref(AudioOutputPreview): use Audio from base/media 2018-03-13 16:57:28 -05:00
paweldomas 60e03e3dec feat: add join/leave sounds on mobile
Adds base/sounds feature which allows other features to register a sound
source under specified id. A new SoundsCollection component will then
render corresponding HTMLAudioElement for each such sound. Once "setRef"
callback is called by the HTMLAudioElement, this element will be added
to the Redux store. When that happens sound can be played through the
new 'playSound' action which will call play() method on the stored
HTMLAudioElement instance.
2018-03-13 16:57:28 -05:00
zbettenbuk 04690dfc8f Facelift Welcome screen 2018-02-26 18:39:48 -06:00
Lyubo Marinov 48f4317adb [RN] Make video track fade-in effect cross-platform 2018-01-19 16:05:59 -06:00
Saúl Ibarra Corretgé 75f6786588 [RN] Make video track fade-in effect cross-platform
Android uses a SurfaceView to render video, which is not quite a View, so the
fade-in animation (which varies the opacity) doesn't work.

Instead, add an opaque black view covering the video, which transitions to
transparent. This creates much smoother transitions on Android, while behaving
the same.

In addition, I removed the flip animation for local tracks, which is no longer
used, since the camera is switched without changing tracks.
2018-01-19 15:32:17 -06:00
bgrozev 090f2f9ccb Restructures the analytics events (#2333)
* ref: Restructures the pinned/unpinned events.

* ref: Refactors the "audio only disabled" event.

* ref: Refactors the "stream switch delay" event.

* ref: Refactors the "select participant failed" event.

* ref: Refactors the "initially muted" events.

* ref: Refactors the screen sharing started/stopped events.

* ref: Restructures the "device list changed" events.

* ref: Restructures the "shared video" events.

* ref: Restructures the "start muted" events.

* ref: Restructures the "start audio only" event.

* ref: Restructures the "sync track state" event.

* ref: Restructures the "callkit" events.

* ref: Restructures the "replace track".

* ref: Restructures keyboard shortcuts events.

* ref: Restructures most of the toolbar events.

* ref: Refactors the API events.

* ref: Restructures the video quality, profile button and invite dialog events.

* ref: Refactors the "device changed" events.

* ref: Refactors the page reload event.

* ref: Removes an unused function.

* ref: Removes a method which is needlessly exposed under a different name.

* ref: Refactors the events from the remote video menu.

* ref: Refactors the events from the profile pane.

* ref: Restructures the recording-related events.

Removes events fired when recording with something other than jibri
(which isn't currently supported anyway).

* ref: Cleans up AnalyticsEvents.js.

* ref: Removes an unused function and adds documentation.

* feat: Adds events for all API calls.

* fix: Addresses feedback.

* fix: Brings back mistakenly removed code.

* fix: Simplifies code and fixes a bug in toggleFilmstrip

when the 'visible' parameter is defined.

* feat: Removes the resolution change application log.

* ref: Uses consistent naming for events' attributes.

Uses "_" as a separator instead of camel case or ".".

* ref: Don't add the user agent and conference name

as permanent properties. The library does this on its own now.

* ref: Adapts the GA handler to changes in lib-jitsi-meet.

* ref: Removes unused fields from the analytics handler initializaiton.

* ref: Renames the google analytics file and add docs.

* fix: Fixes the push-to-talk events and logs.

* npm: Updates lib-jitsi-meet to 515374c8d383cb17df8ed76427e6f0fb5ea6ff1e.

* fix: Fixes a recently introduced bug in the google analytics handler.

* ref: Uses "value" instead of "delay" since this is friendlier to GA.
2018-01-03 13:24:07 -08:00
virtuacoplenny 9b67e796bd ref(analytics): centralize all event names (#2272)
* ref(analytics): centralize all event names

* squash: fix typo and alpha ordering

* squash: rename file to AnalyticsEvents to parallel lib-jitsi-meet
2017-12-11 12:48:32 -06:00
Lyubo Marinov 8fd91573fc Fix eslint & flow errors
Prepares for the latest eslint & flow-related npm packages which cause
these errors.
2017-11-16 12:27:54 -06:00
virtuacoplenny 5c464a7bda feat(audio-only): be able to lock a browser into capturing audio only (#2125)
* feat(audio-only): be able to lock a browser into capturing audio only

* squash: try to make string more clear about audio only support

* squash: final strings
2017-11-09 13:59:16 -08:00
paweldomas b74bede0e7 feat(web/RN): update React to v16 and React Native to 0.49 2017-11-02 14:32:35 +01:00
hristoterezov 0b50578de9 style(analytics): sendEvent -> sendAnalyticsEvent 2017-10-17 19:33:32 -05:00
hristoterezov 0eddef4d62 feat(mute): Add analytics and console logs for audio/video mutes 2017-10-13 09:50:48 -05:00
hristoterezov f050e7026d fix(media_actions): remove unused actions 2017-10-13 09:50:48 -05:00
Lyubo Marinov dfebd692f3 eslint 4.8.0
ESLint 4.8.0 discovers a lot of error related to formatting. While I
tried to fix as many of them as possible, a portion of them actually go
against our coding style. In such a case, I've disabled the indent rule
which effectively leaves it as it was before ESLint 4.8.0.

Additionally, remove jshint because it's becoming a nuisance with its
lack of understanding of ES2015+.
2017-10-02 18:12:38 -05:00
Lyubo Marinov 4bf19d73fd [RN] Fix documentation comments
* Javadoc introduced @code as a replacement of <code> and <tt> which is
  better aligned with other javadoc tags such as @link. Use it in the
  Java source code. If we switch to Kotlin, then we'll definitely use
  Markdown.

* There are more uses of @code in the JavaScript source code than <tt>
  so use @code for the sake of consistency. Eventually, I'd rather we
  switch to Markdown because it's easier on my eyes.

* Xcode is plain confused by @code and @link. The Internet says that
  Xcode supports the backquote character to denote the beginning and end
  of a string of characters which should be formatted for display as
  code but it doesn't work for me. <tt> is not rendered at all. So use
  the backquote which is rendered itself. Hopefully, if we switch to
  Markdown, then it'll be common between JavaScript and Objective-C
  source code.
2017-10-01 01:35:19 -05:00
Lyubo Marinov 3b5ee2d4c6 [iOS] Add initial CallKit support 2017-09-29 12:00:13 -05:00
Lyubo Marinov 2e2129fa44 Import PropTypes from prop-types
Prepare for React 16.
2017-09-27 16:24:53 -05:00
Lyubo Marinov d521deecc4 Coding style 2017-09-26 23:39:30 -05:00
Saúl Ibarra Corretgé d03a815572 [RN] Add ability to start a call in audio-only mode 2017-09-26 23:39:30 -05:00
Lyubo Marinov 41c6759a23 Coding style 2017-09-26 23:39:30 -05:00
Saúl Ibarra Corretgé f62288ae17 feat(conference): add helper function to check for audio-only muted status 2017-09-26 23:39:30 -05:00
Leonard Kim f3783efc48 squash: remove unused prop, update comment 2017-09-18 13:22:15 -05:00
Leonard Kim 1e84f993b4 fix(device-selection): use non-connect video preview
Filmstrip only mode displays a device selection dialog that
does not have access to the redux/connect. However, the current
VideoTrack extends from AbstractVideoTrack, which assumes a
redux connection. The fix is to move video display logic into
a separate component and have device selection use that, while
the existing VideoTrack remains connected to redux but
uses the new video display component.
2017-09-18 13:22:15 -05:00
Saúl Ibarra Corretgé 3102ea6818 [RN] Try to create local tracks when unmuting, if track is missing
This is only desired when the unmuting action took place due to a manual user
intervention or the audio-only mode being disengaged.
2017-08-22 07:28:19 -05:00
Paweł Domas 99ce46cfa8 feat(conference, toolbox, API) get rid of {audio,video}Muted' flags
* ref: video muted state

Get rid of 'videoMuted' flag in conference.js

* ref: audio muted state

Get rid of 'audioMuted' flag in conference.js

* fix(conference.js|API): early audio/video muted updates

* ref(conference.js): rename isVideoMuted

Rename isVideoMuted to isLocalVideoMuted to be consistent with
isLocalAudioMuted.

* doc|style(conference.js): comments and space after if

* ref: move 'setTrackMuted' to functions

* fix(tracks/middleware): no-lonely-if

* ref(features/toolbox): get rid of last argument

* ref(defaultToolbarButtons): rename var
2017-08-18 13:30:30 +02:00
Lyubo Marinov 85a168d51b [RN] base/media is intent, base/tracks is reality 2017-08-04 16:07:48 -05:00
Saúl Ibarra Corretgé d600504d85 [RN] Refactor video muting
Simplify the code by using a bitfied instead of a couple of boolean flags. This
allows us to mute the video from multiple places and only make the unmute
effective once they have all unmuted.

Alas, this cannot be applied to the web without a massive refactor, because it
uses the track muted state as the source of truth instead of the media state.
2017-08-04 16:07:48 -05:00
Lyubo Marinov dcc6ce025f Convert a function to an asynchronous redux action creator 2017-07-31 12:26:39 -05:00
paweldomas 40c9f583fa ref(tracks): remove duplication in mute/unmute 2017-07-31 12:26:39 -05:00
paweldomas 68f4a4ae9f ref: enable/disable microphone button
Make toolbar's microphone button enabled whenever there are any
'audioinput' devices available and allow to add audio during
the conference even if microphone permissions were denied on startup.
2017-07-28 12:06:42 -05:00
Saúl Ibarra Corretgé f1c9e57b43 [RN] startWithAudioMuted & startWithVideoMuted 2017-07-27 16:48:38 -05:00
paweldomas 122a7f6346 fix(AudioOnly+web): crash when untoggle audio only
Because on web video track is stored both in redux and in 'localVideo'
field, video is attempted to be unmuted twice when turning off the audio
only mode. This will crash the app with 'unmute operation is already in
progress'. This commit will prevent from taking action from the web
world if the video track already exists and will make the redux side
rollback unmuted status in case unmute fails.
2017-07-25 11:05:02 +02:00
Lyubo Marinov db88c555dc Fix warning 2017-07-21 17:40:09 -05:00
Lyubo Marinov 7f041170f7 Consistent formatting 2017-07-16 03:44:07 -05:00
Lyubo Marinov e54744e5ef [Android] Use target API 23 2017-07-16 02:26:09 -05:00
virtuacoplenny 244de8096f feat(local-video): convert to react (#1705)
* feat(local-video): convert to react

- Create a VideoTrack component for displaying a video element.
  This mirrors native also having a VideoTrack component.
- The VideoTrack component does not let React update it to prevent
  the video element from re-rendering, which could cause flickers
  and would not work with temasys's overriding of the video element.
- VideoTrack extends AbstractVideoTrack to mirror native
  implementation and to get the dispatch of the onplaying event.
- Remove the onclick handler on the video element. Honestly, I
  didn't get it to work, and did not try, but it is also unnecessary
  because another handler already exists on the video wrapper.

* ref(device-selection): VideoInputPreview uses VideoTrack to show video

* squash into conversion: change css selectors

* squash into conversion: mix in abstract props

* squash into conversion: change shouldComponentUpdate check

* squash: update comment about why triggerOnPlayingUpdate is used
2017-07-14 14:22:27 -05:00
paweldomas 2281b1acd2 ref: enable/disable video button
Dynamically enables/disables the toolbar video button. Prior to that
commit if we would start with no video there would be no way to enable
it later on.
2017-07-12 10:29:18 -07:00
Lyubo Marinov ca94563c51 [RN] Coding style
The files styles.js are used (pretty much) on React Native only and each
of them exports 1 name. Export it as default to cut down on source code.
2017-06-10 18:07:51 -05:00
Lyubo Marinov 409255f056 [React] Cross-platform Components
Introduce certain React Components which may be used to write
cross-platform source code such as Audio like Web's audio, Container
like Web's div, Text like Web's p, etc.
2017-06-06 00:11:39 -05:00
Lyubo Marinov 4dc658c270 Fix 'Missing JSDoc comment  require-jsdoc' 2017-06-01 21:01:50 -05:00
Saúl Ibarra Corretgé 5304660e14 [RN] Polyfill Symbol 2017-05-26 16:37:22 -05:00
Saúl Ibarra Corretgé ae8c5287e4 [RN] Remove workaround for video mirroring on iOS
It's now natively supported:
https://github.com/oney/react-native-webrtc/pull/244
2017-04-06 14:17:12 -05:00
Saúl Ibarra Corretgé 7c76f124bf [RN] Use native API for toggling cameras
Use the curstom _switchCamera API provided by react-native-webrtc to toggle the
camera instead of destroying the current track and creating a new one.

_switchCamera is implemented at a low level, so the track perceives no changes,
thus being a lot faster and less involved since the capturer doesn't need to be
destroyed and re-created.

In addition, don't mirror the video for the back camera.

Ref: https://github.com/oney/react-native-webrtc/pull/235
2017-04-05 00:21:35 -05:00
Lyubo Marinov 32634356a6 Simplify naming 2017-04-05 00:20:17 -05:00
Lyubo Marinov 684572bd05 Comply w/ coding style 2017-04-04 17:52:06 -05:00
Lyubo Marinov 84b9c5f5fd Coding style 2017-03-24 09:06:54 -05:00
Saúl Ibarra Corretgé 43c8fc6847 [RN] Fix mirroring video views on platforms with native support 2017-03-24 09:02:32 -05:00
Lyubomir Marinov 55a8b44224 Consistent middleware and reducer imports 2017-02-10 11:04:40 -06:00
Lyubomir Marinov b50f858556 [flow] Expand the coverage of flow-monitored files 2017-02-03 16:36:14 -06:00
Lyubomir Marinov 5de1a74429 [flow] Take advantage of flow-typed 2017-02-03 16:36:14 -06:00
Lyubomir Marinov 349c04d8d1 Consistent naming of functions
Until we make a decision on access modifier hints and adopt a respective
coding style, consistency is king.
2017-01-28 17:28:13 -06:00
Lyubomir Marinov eaed9db1e7 Name folders consistently 2017-01-17 08:53:23 -06:00
Lyubomir Marinov 4f8b7a934c Comply w/ coding style 2017-01-17 08:32:20 -06:00
Lyubomir Marinov 71c04936af Merge branch 'actions-rename' of https://github.com/saghul/jitsi-meet into saghul-actions-rename 2017-01-17 08:18:52 -06:00
Lyubomir Marinov 5f21e4c5b6 Introduce Platform in React
React Native provides Platform.
2017-01-15 12:09:52 -06:00
Saúl Ibarra Corretgé e71e6c5b79 Name Redux actions consistently
Redux actions which represent "commands" should be imperative, and those
representing events should use the past tense.
2017-01-11 13:11:11 -06:00
Lyubomir Marinov daf56455a5 Use Symbol for Redux action types to prevent conflicts 2016-12-11 22:21:51 -06:00
Lyubomir Marinov 0db33bb45c React propTypes as static class properties 2016-11-30 19:53:40 -06:00
Ilya Daynatovich c3428e8213 Split React components out of index.html 2016-11-24 02:21:02 -06:00
Lyubomir Marinov 4997ae79e3 Fix toolbar's mute buttons when starting muted
The toolbar's mute buttons depict respective features/base/media states.
However, (un)muting is practically carried out by features/base/tracks.
When the mobile app enters a conference configured to invite the joining
participant to mute themselves, the tracks would be muted but the
toolbar's mute buttons would not reflect that.
2016-10-25 11:43:15 -05:00
Lyubomir Marinov 7f3ff13c18 Merge jitsi-meet-react's mobile support
As a step toward merging jitsi-meet-react with jitsi-meet to share as
much source code as possible between mobile and Web, merge the part of
jitsi-meet-react's source tree which supports mobile inside the
jitsi-meet source tree and leave jitsi-meet-react's Web support in the
source code revision history but don't have it in master anymore because
it's different from jitsi-meet's Web support. In other words, the two
projects are mechanically merged at the file level and don't really
share source code between mobile and Web.
2016-10-12 10:31:52 -05:00
Lyubomir Marinov d55e0f70d9 Import jitsi/jitsi-meet-react#2f23d98
As an intermediate step on the path to merging jitsi-meet and
jitsi-meet-react, import the whole source code of jitsi-meet-react as it
stands at
2f23d98424
i.e. the lastest master at the time of this import. No modifications are
applied to the imported source code in order to preserve a complete
snapshot of it in the repository of jitsi-meet and, thus, facilitate
comparison later on. Consequently, the source code of jitsi-meet and/or
jitsi-meet-react may not work. For example, jitsi-meet's jshint may be
unable to parse jitsi-meet-react's source code.
2016-10-12 10:31:52 -05:00