Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
feat: add feature flag to enable the web gif processor instead of the…
Browse files Browse the repository at this point in the history
… unity gif processor (#812)

* test: set renderer to use it git decoder

* feat: add feature flag to enable the web gif processor instead of the unity gif processor
  • Loading branch information
kuruk-mm authored Jan 11, 2023
1 parent 03066cf commit 3e55cd0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/shared/meta/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ export const getDisabledCatalystConfig = (store: RootMetaState): string[] => {
export const isLiveKitVoiceChatFeatureFlag = (store: RootMetaState): boolean =>
getFeatureFlagEnabled(store, 'livekit-voicechat') as boolean

// Enable the gif processor on the web instead of processing it in Unity (just for WebGL build)
export const isGifWebSupported = (store: RootMetaState): boolean => getFeatureFlagEnabled(store, 'gif-web') as boolean

export function getMaxVisiblePeers(store: RootMetaState): number {
return (
QS_MAX_VISIBLE_PEERS ||
Expand Down
1 change: 1 addition & 0 deletions packages/shared/meta/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export type FeatureFlagsName =
| 'web_cap_fps' // caps the web client FPS
| 'disabled-catalyst'
| 'livekit-voicechat'
| 'gif-web'
| 'ping_enabled'
| 'use-synapse-server'
| 'new_tutorial'
Expand Down
4 changes: 3 additions & 1 deletion packages/unity-interface/kernelConfigForRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getWorld } from '@dcl/schemas'
import { injectVersions } from 'shared/rolloutVersions'
import { store } from 'shared/store/isolatedStore'
import { getSelectedNetwork } from 'shared/dao/selectors'
import { isGifWebSupported } from 'shared/meta/selectors'

export function kernelConfigForRenderer(): KernelConfigForRenderer {
const versions = injectVersions({})
Expand All @@ -30,7 +31,8 @@ export function kernelConfigForRenderer(): KernelConfigForRenderer {
gifSupported:
typeof (window as any).OffscreenCanvas !== 'undefined' &&
typeof (window as any).OffscreenCanvasRenderingContext2D === 'function' &&
!WSS_ENABLED,
!WSS_ENABLED &&
isGifWebSupported(globalState),
network,
validWorldRanges: getWorld().validWorldRanges,
kernelVersion: versions['@dcl/kernel'] || 'unknown-kernel-version',
Expand Down

0 comments on commit 3e55cd0

Please sign in to comment.