4.8.83 • Published 10 months ago

@erboladaiorg/sequi-debitis-rerum v4.8.83

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@erboladaiorg/sequi-debitis-rerum v3

TypeScript client side library for building mediasoup based applications.

Website and Documentation

Support Forum

Usage Example

import { Device } from '@erboladaiorg/sequi-debitis-rerum';
import mySignaling from './my-signaling'; // Our own signaling stuff.

// Create a device (use browser auto-detection).
const device = new Device();

// Communicate with our server app to retrieve router RTP capabilities.
const routerRtpCapabilities = await mySignaling.request(
	'getRouterCapabilities'
);

// Load the device with the router RTP capabilities.
await device.load({ routerRtpCapabilities });

// Check whether we can produce video to the router.
if (!device.canProduce('video')) {
	console.warn('cannot produce video');

	// Abort next steps.
}

// Create a transport in the server for sending our media through it.
const { id, iceParameters, iceCandidates, dtlsParameters, sctpParameters } =
	await mySignaling.request('createTransport', {
		sctpCapabilities: device.sctpCapabilities,
	});

// Create the local representation of our server-side transport.
const sendTransport = device.createSendTransport({
	id,
	iceParameters,
	iceCandidates,
	dtlsParameters,
	sctpParameters,
});

// Set transport "connect" event handler.
sendTransport.on('connect', async ({ dtlsParameters }, callback, errback) => {
	// Here we must communicate our local parameters to our remote transport.
	try {
		await mySignaling.request('transport-connect', {
			transportId: sendTransport.id,
			dtlsParameters,
		});

		// Done in the server, tell our transport.
		callback();
	} catch (error) {
		// Something was wrong in server side.
		errback(error);
	}
});

// Set transport "produce" event handler.
sendTransport.on(
	'produce',
	async ({ kind, rtpParameters, appData }, callback, errback) => {
		// Here we must communicate our local parameters to our remote transport.
		try {
			const { id } = await mySignaling.request('produce', {
				transportId: sendTransport.id,
				kind,
				rtpParameters,
				appData,
			});

			// Done in the server, pass the response to our transport.
			callback({ id });
		} catch (error) {
			// Something was wrong in server side.
			errback(error);
		}
	}
);

// Set transport "producedata" event handler.
sendTransport.on(
	'producedata',
	async (
		{ sctpStreamParameters, label, protocol, appData },
		callback,
		errback
	) => {
		// Here we must communicate our local parameters to our remote transport.
		try {
			const { id } = await mySignaling.request('produceData', {
				transportId: sendTransport.id,
				sctpStreamParameters,
				label,
				protocol,
				appData,
			});

			// Done in the server, pass the response to our transport.
			callback({ id });
		} catch (error) {
			// Something was wrong in server side.
			errback(error);
		}
	}
);

// Produce our webcam video.
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
const webcamTrack = stream.getVideoTracks()[0];
const webcamProducer = await sendTransport.produce({ track: webcamTrack });

// Produce data (DataChannel).
const dataProducer = await sendTransport.produceData({
	ordered: true,
	label: 'foo',
});

Authors

Social

Sponsor

You can support mediasoup by sponsoring it. Thanks!

License

ISC

css variableES2017structuredClonetelephonetacitcolorsarrayfigletvisualpatchjQueryclassnamequerystringjsxsqspersistentenvironmentinstallidlequeueMicrotaskeslint-pluginmacosregularES6eventDispatcherwritenumberstyleguidefile systemconcatMapyupreducereslintpluginelmstatereact-hook-formcss lesssyntaxdescriptorstypednativewgetrouteexpressionefficientArray.prototype.filterenvironmentsmobileglobal objectreadablestreamdescriptorimmerfnmatchvalidatorcloudfronttypedarraySymbolshebangsubprocessdragtypessuperstructpackageshigher-orderless compilerremovestyled-componentsobjectObject.valuesArrayBuffer.prototype.slicees5pruneworkflowerror-handlingautoprefixercurldeepgraphql.envextendReactiveExtensionsObject.fromEntriesfunction.lengthprogressloadingjwtECMAScript 2020objstylesheethttpregular-expressionhardlinkslesscsspreserve-symlinksreversearraybufferformsigintStyleSheetshamagenttrimLefthas-ownincludeschineseweakmappropESclass-validatorttymomentflagsharedarraybufferreversedtsenderposestylingES3protocol-bufferscallboundtrimStartbinObject.keysFloat64Arrayreadableeffect-tswarningObject.definePropertyguidreadECMAScript 2015propertieslistenersloggingpinolrudynamodbajaxasciistyleselflesstostringtagwaitES2021typeofspringtyped arrayarraystraverseES20166to5comparecorebuffersmanagerObject.getPrototypeOfequaldataViewcore-jses-shim APIcheckrgbbcryptfilecall-bindes8compilerutilityES2020eslintconfigshimreusewindowcloudtraildiffsameValueZerofluxdatastructurekinesishascollection.es6matchECMAScript 7Uint8ArraybundleruninstallvalidatepropertyparsingString.prototype.matchAllgetintrinsicawesomesaucepnpm9helpersloadbalancingclassnamestslibrapidECMAScript 2021flatsyntaxerrordayjsstringifyreact-hooksec2Array.prototype.flatMapfullwidthgetterdomdefinePropertyObjectamazonplugines2017nodejsnodees2016fpsvarsintrinsic$.extendtc39localtddArray.prototype.flattenvariablesexiteslintgradients css3yamlworkspace:*artgradients cssWebSocketsrulesqsWeakSetcloudformation-0linuxmapreducebyteOffsetvalidationencryptionfastify__proto__keypureform-validationtermwritablepackage.jsonInt8ArrayinternalharmonyES2022typeerrorArrayBufferescapeECMAScript 6transpilerjsoneventEmitterfast-deep-copystringpostcssObject.isjoitrimRightmulti-packagematchAllaccessibilitylintwindowsroutingfantasy-landpositiveunicodeenvsuperagentl10ncensorpreprocessores7[[Prototype]]trimEndschemamatchesexectypescriptRxhotglobalsless mixinsimportexport.gitignoredependencies_.extendtransportdeep-copyspinnerpushObject.assignprivatestarterapollowaffullwidthastthreeio-tsarktypeargsUint8ClampedArrayformsterminalfunctionallanguageUint32ArraycommanderTypedArrayiaminspectroute53awsglobal this valueECMAScript 2018letbootstrap lessvalueforkopensslflagsqueryhookformsortargumentes2018performanceReactiveXnpmignorespawndropcjkwaapiperformantgenericscss-in-jsbrowserauthsymlinksramdaRegExp#flagsless.jsArraychildtypeframerpackage managerruntimeeveryairbnbUint16ArrayoptimizerinferenceCSSexecutecirculardependency managervalidnamesxhrsetPrototypeOfECMAScript 2023sigtermfpconfigisHyBisettingshasOwnCSSStyleDeclarationglobaljson-schema-validationclonees2015regexputilitiesECMAScript 3modulesquoteES2018filterlastdeterministicStreaminputauthenticationformatvestfastcopyAsyncIteratorpredictablefastclonereducevaluessnstextconsoleiterationes6estreerfc9562callbindsharedentriesutil.inspectuuidpicomatchbyteLengthpasswordfindLastIndextoSortedYAMLgetPrototypeOfpoint-freetypanionirqworkerInt32Arraypostcss-plugintouchlinkWebSocketURLSearchParamsurlsymbolreplayassertdateconsta11ybeanstalkfetchdirfunctionacornmodulereactschemeredactfindLastcliajv256testertoReversedbinariesdeleteprocessasterisksreal-timeerrorlockfilesignalsomitsetmixinslivetranspilejshintrdsES2015iteratorArray.prototype.containsglacierdom-testing-librarydescriptionJSONeventsfastsafestreamsRFC-6455east-asian-widthgroupByviewgesturesECMAScript 2016npminterruptsutil@@toStringTagjsdiffless cssxtermArrayBuffer#sliceforEachisConcatSpreadablecharacterObject.entriesprotobufES7SetchromeObservablecollectionTypeBoxWeakMapidentifierscloudsearchvpcpopmotiontoArraydatajsconcathandlersReflect.getPrototypeOfmapsimpledbpolyfillsideweaksetoptionArray.prototype.findLastArray.prototype.findLastIndexESnextsequenceshellbundlingautoscalingstringifierECMAScript 2022installerprettycryptokeysfast-clonefast-copy
4.8.83

10 months ago

4.8.82

10 months ago

4.7.82

10 months ago

4.7.81

11 months ago

4.7.80

11 months ago

4.7.79

11 months ago

4.7.78

11 months ago

4.7.77

11 months ago

3.7.77

11 months ago

3.7.76

11 months ago

3.7.75

11 months ago

3.7.74

11 months ago

3.7.73

11 months ago

3.7.72

11 months ago

3.7.71

11 months ago

3.7.70

11 months ago

3.7.69

11 months ago

3.7.68

11 months ago

3.7.67

11 months ago

3.7.66

11 months ago

3.7.65

11 months ago

3.7.64

11 months ago

3.7.63

11 months ago

3.6.63

11 months ago

3.6.62

11 months ago

3.6.61

11 months ago

3.6.60

11 months ago

3.6.59

11 months ago

3.6.58

11 months ago

3.6.57

11 months ago

3.6.56

11 months ago

3.6.55

11 months ago

3.6.54

11 months ago

3.6.53

12 months ago

3.6.52

12 months ago

3.6.51

12 months ago

3.5.51

12 months ago

3.5.50

12 months ago

3.5.49

12 months ago

3.5.48

12 months ago

3.5.47

12 months ago

3.5.46

12 months ago

3.5.45

12 months ago

3.5.44

12 months ago

3.5.43

12 months ago

3.5.42

12 months ago

3.5.41

12 months ago

3.5.40

12 months ago

3.5.39

12 months ago

3.5.38

12 months ago

3.5.37

12 months ago

3.5.36

12 months ago

3.5.35

12 months ago

3.5.34

1 year ago

3.5.33

1 year ago

3.5.32

1 year ago

3.5.31

1 year ago

3.5.30

1 year ago

3.5.29

1 year ago

3.5.28

1 year ago

3.4.28

1 year ago

3.4.27

1 year ago

3.4.26

1 year ago

3.3.26

1 year ago

3.3.25

1 year ago

3.3.24

1 year ago

3.3.23

1 year ago

3.3.22

1 year ago

3.3.21

1 year ago

3.3.20

1 year ago

2.3.20

1 year ago

2.3.19

1 year ago

2.2.19

1 year ago

2.2.18

1 year ago

2.2.17

1 year ago

2.2.16

1 year ago

2.1.16

1 year ago

2.1.15

1 year ago

2.1.14

1 year ago

2.1.13

1 year ago

2.0.13

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago