forked from stream-labs/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Streaming refactor for backend changes (stream-labs#4497)
* Update repository number. * Refactor streaming for api changes. * Fix: Fixes from PR notes. (1 of 3). * WIP. * Fix: Fixes from PR Notes. Update streaming and restream services to reflect latest changes. Add mode property to platform start stream options.(2 of 3). * Fix: Fixes from PR Notes. Move persisted video settings to green service. Fix display base resolution. (3 of 3). * Refactor video contexts to instance variable. * Appropriate use and assign video contexts on state. * Removed unnecessary inits. * Added optional operator for video values and base resolution. * Video settings set state in mutations. * Fix for strict null checks. * More fixes for strict null tests. * WIP, null regressions tests. * Fix for strict null regression test. * Update own version. * Update set/get base resolution. * Update repo json. * Update native deps script. * Refactor establishing contexts for tests. * Fix for autoconfig test. * Fix for video settings test. * Fixes from pr notes. * Simplify filter categories logic.
- Loading branch information
1 parent
9c5f01b
commit 27eeab4
Showing
33 changed files
with
1,252 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { $t } from 'services/i18n'; | ||
import { TPlatform } from 'services/platforms'; | ||
|
||
export enum EOutputDisplayType { | ||
Horizontal = 'horizontal', | ||
Green = 'green', | ||
} | ||
|
||
export type TGreenDisplayType = EOutputDisplayType.Horizontal | EOutputDisplayType.Green; | ||
|
||
export interface IGreenPlatformSetting { | ||
platform: TPlatform; | ||
display: EOutputDisplayType; | ||
} | ||
|
||
export type TGreenPlatformSettings = { | ||
[Platform in TPlatform]: IGreenPlatformSetting; | ||
}; | ||
|
||
export type TDisplayPlatforms = { | ||
[Display in EOutputDisplayType]: TPlatform[]; | ||
}; | ||
|
||
export const GreenPlatformSettings: TGreenPlatformSettings = { | ||
['twitch']: { | ||
platform: 'twitch', | ||
display: EOutputDisplayType.Horizontal, | ||
}, | ||
['facebook']: { | ||
platform: 'facebook', | ||
display: EOutputDisplayType.Horizontal, | ||
}, | ||
['youtube']: { | ||
platform: 'youtube', | ||
display: EOutputDisplayType.Horizontal, | ||
}, | ||
['trovo']: { | ||
platform: 'trovo', | ||
display: EOutputDisplayType.Horizontal, | ||
}, | ||
['tiktok']: { | ||
platform: 'tiktok', | ||
display: EOutputDisplayType.Green, | ||
}, | ||
}; | ||
|
||
export const platformLabels = (platform: TPlatform | string) => | ||
({ | ||
['twitch']: $t('Twitch'), | ||
['facebook']: $t('Facebook'), | ||
['youtube']: $t('YouTube'), | ||
['trovo']: $t('Trovo'), | ||
}[platform]); | ||
|
||
export const displayLabels = (display: EOutputDisplayType | string) => | ||
({ | ||
[EOutputDisplayType.Horizontal]: $t('Horizontal'), | ||
[EOutputDisplayType.Green]: $t('Green'), | ||
}[display]); |
Oops, something went wrong.