function createDescriptionNode(jingle, mtype) {
    var content = $(jingle.tree()).find(">jingle>content[name=\"" +
        mtype + "\"]");

    if(!content || !content.length) {
        $(jingle.tree()).find(">jingle").append(
            "<content name=\"" + mtype + "\"></content>");
        content = $(jingle.tree()).find(">jingle>content[name=\"" +
            mtype + "\"]");
    }

    var desc = content.find(">description");
    if(!desc || !desc.length) {
        content.append("<description " +
            "xmlns=\"urn:xmpp:jingle:apps:rtp:1\" media=\"" +
            mtype + "\"></description>");
        desc = content.find(">description");
    }
    return desc;
}
/**
 * Returns the description node related to the passed content type. If the node
 * doesn't exists it will be created.
 * @param jingle - the jingle packet
 * @param mtype - the content type(audio, video, etc.)
 */
Returns the description node related to the passed content type. If the node
doesn't exists it will be created.
@param jingle - the jingle packet
@param mtype - the content type(audio, video, etc.)
Returns the description node related to the passed content type . If the node doesn ' t exists it will be created . @param jingle - the jingle packet @param mtype - the content type ( audio video etc . )
function createDescriptionNode(jingle, mtype) {
    var content = $(jingle.tree()).find(">jingle>content[name=\"" +
        mtype + "\"]");
    if(!content || !content.length) {
        $(jingle.tree()).find(">jingle").append(
            "<content name=\"" + mtype + "\"></content>");
        content = $(jingle.tree()).find(">jingle>content[name=\"" +
            mtype + "\"]");
    }
    var desc = content.find(">description");
    if(!desc || !desc.length) {
        content.append("<description " +
            "xmlns=\"urn:xmpp:jingle:apps:rtp:1\" media=\"" +
            mtype + "\"></description>");
        desc = content.find(">description");
    }
    return desc;
}
function createDescriptionNode ( jingle , mtype ) { var content = $ ( jingle . tree ( ) ) . find ( ">jingle>content[name=\"" + mtype + "\"]" ) ; if ( ! content || ! content . length ) { $ ( jingle . tree ( ) ) . find ( ">jingle" ) . append ( "<content name=\"" + mtype + "\"></content>" ) ; content = $ ( jingle . tree ( ) ) . find ( ">jingle>content[name=\"" + mtype + "\"]" ) ; } var desc = content . find ( ">description" ) ; if ( ! desc || ! desc . length ) { content . append ( "<description " + "xmlns=\"urn:xmpp:jingle:apps:rtp:1\" media=\"" + mtype + "\"></description>" ) ; desc = content . find ( ">description" ) ; } return desc ; }
Returns the description node related to the passed content type.
Returns the description node related to the passed content type .