summaryrefslogtreecommitdiff
path: root/chromium/content/common/media/peer_connection_tracker.mojom
blob: 12fe034fb5c3845cb152551d7f75f512a5ae1da6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// 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);

  // This method is called to inform that a peer connection's session
  // description has been assigned an ID.
  OnPeerConnectionSessionIdSet(int32 lid, string session_id);

  // 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);
};