Skip to content
Merged
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
2 changes: 1 addition & 1 deletion examples/rtp-receiver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
<version>2.8.9</version>
</dependency>


Expand Down
2 changes: 1 addition & 1 deletion examples/webrtc-client-example/components/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const HomeContainer = () => {
</div>
</div>
</div>
);
)
}

export { HomeContainer }
10 changes: 5 additions & 5 deletions examples/webrtc-client-example/components/status/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,30 @@ const ViewStatus = ({
<div className={styles.sub_container}>
<div className={styles.name}>{'$Transport State : '}</div>
<div className={styles.details}>
<TextTransition text={transportState} />
<TextTransition>{transportState}</TextTransition>
</div>
</div>
<div className={styles.sub_container}>
<div className={styles.name}>{'$RTC State : '}</div>
<div className={styles.details}>
<TextTransition text={channelId} />
<TextTransition>{channelId}</TextTransition>
</div>
<div className={styles.details}>{'|'}</div>
<div className={styles.details}>
<TextTransition text={rtcState} />
<TextTransition>{rtcState}</TextTransition>
</div>
</div>
<div className={styles.sub_container}>
<div className={styles.name}>{'$Audio State : '}</div>
<div className={styles.details}>
<TextTransition text={isMuted ? 'Muted' : 'Not Muted'} />
<TextTransition>{isMuted ? 'Muted' : 'Not Muted'}</TextTransition>
</div>
</div>
{isListener && (
<div className={styles.sub_container}>
<div className={styles.name}>{'$Broadcaster State : '}</div>
<div className={styles.details}>
<TextTransition text={broadcasterState} />
<TextTransition>{broadcasterState}</TextTransition>
</div>
</div>
)}
Expand Down
89 changes: 89 additions & 0 deletions examples/webrtc-client-example/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import { defineConfig, globalIgnores } from 'eslint/config'
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})

export default defineConfig([
globalIgnores([
'.next/**',
'node_modules/**',
'dist/*',
'examples/*',
'resources/*',
'scripts/*',
'src/__tests__/*',
'**/*.js',
'**/*.test.tsx',
]),
{
extends: compat.extends('eslint:recommended', 'plugin:prettier/recommended'),

languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

parser: tsParser,
ecmaVersion: 6,
sourceType: 'module',

parserOptions: {
ecmaFeatures: {
modules: true,
},
},
},

rules: {
'no-console': 'warn',
'no-unused-vars': 'off',

'max-len': [
'error',
{
code: 120,
ignoreUrls: true,
},
],
},
},
{
files: ['**/*.ts'],

extends: compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
),

plugins: {
'@typescript-eslint': typescriptEslint,
},

rules: {
'@typescript-eslint/ban-ts-comment': ['off'],
'@typescript-eslint/no-inferrable-types': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
},
],
},
},
])
8 changes: 3 additions & 5 deletions examples/webrtc-client-example/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ module.exports = {
testPathIgnorePatterns: ['<rootDir>[/\\\\](node_modules|.next)[/\\\\]'],
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(ts|tsx)$'],
transform: {
'^.+\\.(ts|tsx)$': 'babel-jest',
'^.+\\.(ts|tsx)$': ['babel-jest', { presets: ['next/babel'] }],
},
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
moduleNameMapper: {
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/test/__mocks__/fileMock.js',
},
testEnvironment: 'jsdom',
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ class BenzingaListenerIntegration {
private _client: SquawkJS

async initializeSDK(apiKeyType: string, key: string, callback: ListenerCallback): Promise<any> {
let builder = new SquawkSDK.Builder({
maxRetry: 10000,
maxRetryIntervalInMs: 15000,
retryIntervalBackoffInMs: 15000,
retryIntervalInMs: 15000,
},this._transportConfig, callback)
let builder = new SquawkSDK.Builder(
{
maxRetry: 10000,
maxRetryIntervalInMs: 15000,
retryIntervalBackoffInMs: 15000,
retryIntervalInMs: 15000,
},
this._transportConfig,
callback,
)
if (apiKeyType === 'api-key') builder = builder.withApiKey()
else if (apiKeyType === 'token') builder = builder.withJWT()
else {
Expand All @@ -26,8 +30,8 @@ class BenzingaListenerIntegration {
return this._client.initialize(key)
}

async startListening(channelId: number, element: any): Promise<any> {
return this._client.subscribeChannel(channelId, element)
async startListening(channelId: number, _element: any): Promise<any> {
return this._client.subscribeChannel(channelId)
}

async stopListening(channelId: number): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,23 @@ import SquawkSDK, { PublisherCallback, SquawkJS, TransportConfig } from '@benzin
class BenzingaPublisherIntegration {
private _transportConfig = {
maxRetry: 10000,
connectionTimeoutInMs: 15000,
requestTimeoutInMs: 15000,
serverAddress: 'wss://squawk-lb.zingbot.bz/ws/v4/squawk',
} as TransportConfig
private _client: SquawkJS

async initializeSDK(apiKeyType: string, key: string, callback: PublisherCallback): Promise<any> {
let builder = new SquawkSDK.Builder(this._transportConfig, callback)
let builder = new SquawkSDK.Builder(
{
maxRetry: 10000,
maxRetryIntervalInMs: 15000,
retryIntervalBackoffInMs: 15000,
retryIntervalInMs: 15000,
},
this._transportConfig,
callback,
)
if (apiKeyType === 'api-key') builder = builder.withApiKey()
else if (apiKeyType === 'token') builder = builder.withJWT()
else {
Expand All @@ -20,8 +31,8 @@ class BenzingaPublisherIntegration {
return this._client.initialize(key)
}

async startBroadcast(channelId: number, element: any): Promise<any> {
return this._client.startBroadcasting(channelId, element)
async startBroadcast(channelId: number, _element: any): Promise<any> {
return this._client.startBroadcasting(channelId)
}

async stopBroadcast(channelId: number): Promise<void> {
Expand Down
3 changes: 2 additions & 1 deletion examples/webrtc-client-example/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
Loading