LiveKit C++ SDK
Real-time audio/video SDK for C++
Loading...
Searching...
No Matches
remote_track_publication.h
1/*
2 * Copyright 2025 LiveKit
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an “AS IS” BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include "livekit/track_publication.h"
20
21namespace livekit {
22
23namespace proto {
24class OwnedTrackPublication;
25}
26
27class Track;
28
30public:
33 explicit RemoteTrackPublication(const proto::OwnedTrackPublication &owned);
34
36 std::shared_ptr<Track> track() const noexcept;
37
38 bool subscribed() const noexcept { return subscribed_; }
39
40 void setSubscribed(bool subscribed);
41
42private:
43 bool subscribed_{false};
44};
45
46} // namespace livekit
Definition remote_track_publication.h:29
RemoteTrackPublication(const proto::OwnedTrackPublication &owned)
std::shared_ptr< Track > track() const noexcept
Typed accessor for the attached RemoteTrack (if any).
Definition track_publication.h:40