naiveproxy/content/common/media/peer_connection_tracker.mojom
2018-12-09 21:59:24 -05:00

40 lines
1.7 KiB
Plaintext

// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module content.mojom;
// This interface allows forwarding PeerConnection events to WebRTCInternals in
// the browser process.
interface PeerConnectionTrackerHost {
// PeerConnectionTrackerHost forwards these events to WebRTCInternals.
// TODO(vm.arjun): Migrate rest of the messages,
// https://bugs.chromium.org/p/chromium/issues/detail?id=792801
// Notifies WebRTCInternals about the removal of the peer connection
// identified with local id |lid|.
RemovePeerConnection(int32 lid);
// This method is called to update PeerConnection.
// |lid| is the ID of the peer connection
// |type| is the update type. ex: "createOffer"
// |value| is the detail of the update.
// ex: "options: {offerToReceiveAudio: 0}"
UpdatePeerConnection(int32 lid, string type, string value);
// Lets WebRTCInternals know that a getUserMedia() call has been made.
// |origin| is the security origin of getusermedia call
// |audio| is true if audio stream is requested
// |video| is true if video stream is requested
// |audio_constraints| is constraints for audio like audio source device id
// |video_constraints| is constraints for video like audio source device id
// The constraint strings are for display only and should not be parsed
// by the browser for security reasons.
// TODO(crbug.com/801955) Remove the |origin| parameter.
GetUserMedia(string origin, bool audio, bool video, string
audio_constraints, string video_constraints);
// Logs WebRtc log for the connection id.
WebRtcEventLogWrite(int32 lid, string output);
};