MediaStreamTrackState readyState() { returnv_assert(m_track.get(), TRACK_ENDED); MediaStreamTrackState state = TRACK_ENDED; webrtc::MediaStreamTrackInterface::TrackState tstate = m_track->state(); switch (tstate) { case webrtc::MediaStreamTrackInterface::kInitializing: state = TRACK_NEW; break; case webrtc::MediaStreamTrackInterface::kLive: state = TRACK_LIVE; break; case webrtc::MediaStreamTrackInterface::kEnded: case webrtc::MediaStreamTrackInterface::kFailed: state = TRACK_ENDED; break; } return state; }
boolean muted() { returnv_assert(m_source.get(), false); webrtc::MediaSourceInterface::SourceState state = m_source->state(); return (state == webrtc::MediaSourceInterface::kMuted); }