Skip to content
Permalink
Browse files

Update SDP library, remove shim expansion for it

  • Loading branch information...
legastero committed Aug 8, 2019
1 parent d0cf106 commit fe897504fb723423a2278a7b6c946e069daf26f6
@@ -233,7 +233,7 @@ export default class FileTransferSession extends ICESession {
jingle.contents![0].application = {
applicationType: NS_JINGLE_FILE_TRANSFER_5,
file: {
date: new Date(file.lastModified),
date: file.lastModified ? new Date(file.lastModified) : undefined,
hashesUsed: [
{
algorithm: 'sha-1'
@@ -1,5 +1,6 @@
import * as SDPUtils from 'sdp';

import { JingleAction, JingleReasonCondition, JingleSessionRole } from '../Constants';
import * as SDPUtils from '../lib/SDP';
import { NS_JINGLE_ICE_UDP_1 } from '../Namespaces';
import { Jingle, JingleContent, JingleIce, JingleReason } from '../protocol';

@@ -1,4 +1,4 @@
import * as SDP from '../../lib/SDP';
import * as SDP from 'sdp';

// ====================================================================
// Intermediate Object Descriptions
@@ -19,7 +19,7 @@ export interface IntermediateMediaDescription {
rtcpParameters?: SDP.SDPRtcpParameters;
streams?: SDP.SDPMediaStreamId[];
candidates?: SDP.SDPIceCandidate[];
sctp?: SDP.SDPSctpParameters;
sctp?: SDP.SDPSctpDescription;
}

export interface IntermediateSessionDescription {
@@ -84,7 +84,7 @@ export function importFromSDP(sdp: SDP.SDPBlob): IntermediateSessionDescription
media.streams = [];
}
} else if (kind === 'application') {
media.sctp = SDP.parseSctpMap(mediaSection);
media.sctp = SDP.parseSctpDescription(mediaSection);
}

media.candidates = SDP.matchPrefix(mediaSection, 'a=candidate:').map(SDP.parseCandidate);
@@ -1,5 +1,6 @@
import * as SDP from 'sdp';

import { directionToSenders, JingleSessionRole, sendersToDirection } from '../../Constants';
import * as SDP from '../../lib/SDP';
import { NS_JINGLE_RTP_1 } from '../../Namespaces';
import {
Jingle,

This file was deleted.

@@ -10,9 +10,9 @@ import { attribute, DefinitionOptions, integerAttribute } from '../jxt';
import { NS_JINGLE_DTLS_SCTP_1, NS_JINGLE_ICE_0, NS_JINGLE_ICE_UDP_1 } from '../Namespaces';

export interface JingleSctpMap {
number: string;
port: number;
protocol: string;
streams: string;
streams?: string;
}

declare module './xep0176' {
@@ -34,7 +34,7 @@ const Protocol: DefinitionOptions = {
],
element: 'sctpmap',
fields: {
number: attribute('number'),
port: integerAttribute('number'),
protocol: attribute('protocol'),
streams: attribute('streams')
},
@@ -84,6 +84,11 @@ declare module 'sdp' {
rtcpFeedback?: SDPFeedbackParameter[];
}

export interface SDPGroup {
semantics: string;
mids: string[];
}

export interface SDPMLine {
kind: string;
port?: number;
@@ -126,6 +131,12 @@ declare module 'sdp' {
fecMechanisms: string[];
}

export interface SDPSctpDescription {
port: number;
protocol: string;
maxMessageSize?: number;
}

export const localCname: string;

export function generateIdentifier(): string;
@@ -181,6 +192,12 @@ declare module 'sdp' {
export function parseRtcpParameters(mediaSection: SDPSection): SDPRtcpParameters;
export function parseMsid(mediaSection: SDPSection): SDPMediaStreamId;

export function parseSctpDescription(mediaSection: SDPSection): SDPSctpDescription;
export function writeSctpDescription(
mediaSection: SDPMLine,
desc: SDPSctpDescription
): SDPSection;

export function generateSessionId(): string;
export function writeSessionBoilerplate(
sessId?: string,

0 comments on commit fe89750

Please sign in to comment.
You can’t perform that action at this time.