Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion audio-livecast.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@
"STT_AUTO_START": false,
"CLOUD_RECORDING_AUTO_START": false,
"ENABLE_SPOTLIGHT": false,
"AUTO_CONNECT_RTM": false
"AUTO_CONNECT_RTM": false,
"ENABLE_TEXT_TRACKS": true
}
3 changes: 2 additions & 1 deletion audio-livecast.config.light.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@
"STT_AUTO_START": false,
"CLOUD_RECORDING_AUTO_START": false,
"ENABLE_SPOTLIGHT": false,
"AUTO_CONNECT_RTM": false
"AUTO_CONNECT_RTM": false,
"ENABLE_TEXT_TRACKS": true
}
4 changes: 3 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,7 @@
"ENABLE_SPOTLIGHT": false,
"AUTO_CONNECT_RTM": false,
"ENABLE_CONVERSATIONAL_AI": false,
"CUSTOMIZE_AGENT": false
"CUSTOMIZE_AGENT": false,
"ENABLE_TEXT_TRACKS": true,
"PLAY_REMOTE_AUDIO": false
}
3 changes: 2 additions & 1 deletion config.light.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,6 @@
"ENABLE_SPOTLIGHT": false,
"AUTO_CONNECT_RTM": false,
"ENABLE_WAITING_ROOM_AUTO_APPROVAL": true,
"ENABLE_WAITING_ROOM_AUTO_REQUEST": true
"ENABLE_WAITING_ROOM_AUTO_REQUEST": true,
"ENABLE_TEXT_TRACKS": true
}
3 changes: 2 additions & 1 deletion live-streaming.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@
"STT_AUTO_START": false,
"CLOUD_RECORDING_AUTO_START": false,
"ENABLE_SPOTLIGHT": false,
"AUTO_CONNECT_RTM": false
"AUTO_CONNECT_RTM": false,
"ENABLE_TEXT_TRACKS": true
}
3 changes: 2 additions & 1 deletion live-streaming.config.light.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@
"STT_AUTO_START": false,
"CLOUD_RECORDING_AUTO_START": false,
"ENABLE_SPOTLIGHT": false,
"AUTO_CONNECT_RTM": false
"AUTO_CONNECT_RTM": false,
"ENABLE_TEXT_TRACKS": true
}
7 changes: 5 additions & 2 deletions template/bridge/rtc/webNg/RtcEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,11 @@ export default class RtcEngine {
// If the subscribed track is an audio track
if (mediaType === 'audio') {
const audioTrack = user.audioTrack;
// Play the audio
audioTrack?.play();
if ($config.PLAY_REMOTE_AUDIO) {
// Play the audio
audioTrack?.play();
}

this.remoteStreams.set(user.uid, {
...this.remoteStreams.get(user.uid),
audio: audioTrack,
Expand Down
4 changes: 3 additions & 1 deletion template/defaultConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ const DefaultConfig = {
AI_LAYOUT: 'LAYOUT_TYPE_1',
SDK_CODEC: 'vp8',
ENABLE_WAITING_ROOM_AUTO_APPROVAL: false,
ENABLE_WAITING_ROOM_AUTO_REQUEST: false
ENABLE_WAITING_ROOM_AUTO_REQUEST: false,
ENABLE_TEXT_TRACKS: true,
PLAY_REMOTE_AUDIO: true,
};

module.exports = DefaultConfig;
2 changes: 2 additions & 0 deletions template/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ interface ConfigInterface {
SDK_CODEC: string;
ENABLE_WAITING_ROOM_AUTO_APPROVAL: boolean;
ENABLE_WAITING_ROOM_AUTO_REQUEST: boolean;
ENABLE_TEXT_TRACKS: boolean;
PLAY_REMOTE_AUDIO: boolean;
}
declare var $config: ConfigInterface;
declare module 'customization' {
Expand Down
36 changes: 18 additions & 18 deletions template/src/components/Controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -817,22 +817,22 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
}

// 13. Text-tracks to download
// const canAccessAllTextTracks =
// useControlPermissionMatrix('viewAllTextTracks');

// if (canAccessAllTextTracks) {
// actionMenuitems.push({
// componentName: 'view-all-text-tracks',
// order: 13,
// icon: 'transcript',
// iconColor: $config.SECONDARY_ACTION_COLOR,
// textColor: $config.FONT_COLOR,
// title: viewTextTracksLabel,
// onPress: () => {
// toggleTextTrackModal();
// },
// });
// }
const canAccessAllTextTracks =
useControlPermissionMatrix('viewAllTextTracks');

if (canAccessAllTextTracks) {
actionMenuitems.push({
componentName: 'view-all-text-tracks',
order: 13,
icon: 'transcript',
iconColor: $config.SECONDARY_ACTION_COLOR,
textColor: $config.FONT_COLOR,
title: viewTextTracksLabel,
onPress: () => {
toggleTextTrackModal();
},
});
}

useEffect(() => {
if (isHovered) {
Expand Down Expand Up @@ -980,11 +980,11 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
)}
</>
)}
{/* {canAccessAllTextTracks && isTextTrackModalOpen ? (
{canAccessAllTextTracks && isTextTrackModalOpen ? (
<ViewTextTracksModal setModalOpen={setTextTrackModalOpen} />
) : (
<></>
)} */}
)}
<ActionMenu
containerStyle={globalWidth < 720 ? {width: 180} : {width: 260}}
hoverMode={true}
Expand Down
57 changes: 42 additions & 15 deletions template/src/components/common/data-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ interface TableHeaderProps {
rowStyle?: ViewStyle;
cellStyle?: ViewStyle;
firstCellStyle?: ViewStyle;
lastCellStyle?: ViewStyle;
textStyle?: TextStyle;
}

Expand All @@ -28,22 +29,27 @@ const TableHeader: React.FC<TableHeaderProps> = ({
rowStyle,
cellStyle,
firstCellStyle,
lastCellStyle,
textStyle,
}) => (
<View style={[style.thead, containerStyle]}>
<View style={[style.throw, rowStyle]}>
{columns.map((col, index) => (
<View
key={col}
style={[
style.th,
index === 0 && style.plzero,
cellStyle,
index === 0 && firstCellStyle,
]}>
<Text style={[style.thText, textStyle]}>{col}</Text>
</View>
))}
{columns.map((col, index) => {
const isFirst = index === 0;
const isLast = index === (columns.length > 1 ? columns.length - 1 : 0);
return (
<View
key={col}
style={[
style.th,
cellStyle,
isFirst && firstCellStyle,
isLast && lastCellStyle,
]}>
<Text style={[style.thText, textStyle]}>{col}</Text>
</View>
);
})}
</View>
</View>
);
Expand Down Expand Up @@ -151,7 +157,7 @@ const TableFooter: React.FC<TableFooterProps> = ({

export {TableHeader, TableFooter, TableBody};

const style = StyleSheet.create({
export const style = StyleSheet.create({
scrollgrow: {
flexGrow: 1,
},
Expand Down Expand Up @@ -222,7 +228,7 @@ const style = StyleSheet.create({
flex: 1,
alignSelf: 'stretch',
justifyContent: 'center',
paddingHorizontal: 12,
// paddingHorizontal: 12,
},
thText: {
color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.medium,
Expand All @@ -249,7 +255,6 @@ const style = StyleSheet.create({
flex: 1,
alignSelf: 'center',
justifyContent: 'center',
// height: 100,
gap: 10,
},
tpreview: {
Expand All @@ -275,6 +280,8 @@ const style = StyleSheet.create({
tactions: {
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'flex-end',
},
tlink: {
color: $config.PRIMARY_ACTION_BRAND_COLOR,
Expand Down Expand Up @@ -382,4 +389,24 @@ const style = StyleSheet.create({
pl15: {
paddingLeft: 15,
},
// icon celles
tdIconCell: {
flex: 0,
flexShrink: 0,
alignItems: 'flex-start',
justifyContent: 'center',
minWidth: 52,
// paddingRight: 50 + 12,
},
thIconCell: {
flex: 0,
flexShrink: 0,
alignSelf: 'stretch',
justifyContent: 'center',
minWidth: 50,
paddingHorizontal: 12,
},
alignCellToRight: {
alignItems: 'flex-end',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const controlPermissionMatrix: Record<
isHost &&
$config.ENABLE_STT &&
$config.ENABLE_MEETING_TRANSCRIPT &&
$config.ENABLE_TEXT_TRACKS &&
isWeb(),
};

Expand Down
Loading