Comments (2)
in webrtc\mediastreamsignaling.cc
void MediaStreamSignaling::OnRemoteTrackSeen(const std::string& stream_label,
const std::string& track_id,
uint32 ssrc,
cricket::MediaType media_type) {
MediaStreamInterface* stream = remote_streams_->find(stream_label);
if (media_type == cricket::MEDIA_TYPE_AUDIO) {
AudioTrackInterface* audio_track =
remote_stream_factory_->AddAudioTrack(stream, track_id);
stream_observer_->OnAddRemoteAudioTrack(stream, audio_track, ssrc);
} else if (media_type == cricket::MEDIA_TYPE_VIDEO) {
VideoTrackInterface* video_track =
remote_stream_factory_->AddVideoTrack(stream, track_id);
stream_observer_->OnAddRemoteVideoTrack(stream, video_track, ssrc);
} else {
ASSERT(false && "Invalid media type");
}
}
RemoteMediaStreamFactory::OnAddRemoteAudioTrack calls :
template <typename TI, typename T, typename TP, typename S>
TI* AddTrack(MediaStreamInterface* stream, const std::string& track_id,
S* source) {
rtc::scoped_refptr<TI> track(
TP::Create(signaling_thread_, T::Create(track_id, source)));
track->set_state(webrtc::MediaStreamTrackInterface::kLive);
if (stream->AddTrack(track)) {
return track;
}
return NULL;
}
And in MediaStream implementation:
template <typename TrackVector, typename Track>
bool MediaStream::AddTrack(TrackVector* tracks, Track* track) {
typename TrackVector::iterator it = FindTrack(tracks, track->id());
if (it != tracks->end())
return false;
tracks->push_back(track);
FireOnChanged();
return true;
}
So, before calling the Peerconnection::onAddStreamTrack the MediaStreamSignaling has already triggered the NotifierObserver::onChanged event on the remote stream.
from cordova-plugin-iosrtc.
Done in 41b4ca8
from cordova-plugin-iosrtc.
Related Issues (20)
- Implementing Mediapipe Pose on ionic IOs using iosRTC HOT 1
- Add flashlight control HOT 4
- Add video border radius support HOT 1
- Enable/Disable track from Receiver/Sender is broken in case of use with Janus Videoroom HOT 5
- Getting error in connecting ios device microphone and video in openvidu ionic HOT 5
- RTCRtpSender not have DTMF properties and createDTMFSender deprecate HOT 4
- PrecompileSwiftBridgingHeader fails after first successful build ('WebRTC/RTCAudioSource.h' file not found) HOT 9
- Pretty bad H264 performance after upgrading to iOS 15.4 HOT 24
- blank screen issue HOT 2
- HTML element over video HOT 1
- Own audio shut down during video conference HOT 5
- App failing to build because of the plugin HOT 4
- navigator.mediaDevices is undefined HOT 2
- cordova iosrtc app crash on iphone device - 'NSInternalInconsistencyException', HOT 12
- Twilio VideoJs adaptive simulcast undefined error, because of missing width and height properties from MediaTrackSettings HOT 6
- Call canceled when callee pickup the phone. HOT 3
- Bug: Can't install plugin on latest cordova/xcode HOT 3
- Build Failed HOT 8
- PluginMediaStreamRenderer.mediaStreamChanged() has multithreading race condition
- iOS 17.5 background mode, app suspended now, call audio stops. HOT 30
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-iosrtc.