void MediaStreamTrack::trackEnabledChanged()
{
    if (stopped())
        return;

    setEnabled(m_privateTrack->enabled());
    configureTrackRendering();
}
Exemple #2
0
void MediaStreamTrack::sourceEnabledChanged()
{
    if (m_stopped)
        return;
    
    // media from the source only flows when a MediaStreamTrack object is both unmuted and enabled
    configureTrackRendering();
}
void MediaStreamTrack::trackMutedChanged()
{
    if (stopped())
        return;

    if (muted())
        scheduleEventDispatch(Event::create(eventNames().muteEvent, false, false));
    else
        scheduleEventDispatch(Event::create(eventNames().unmuteEvent, false, false));

    configureTrackRendering();
}
void MediaStreamTrack::trackReadyStateChanged()
{
    if (stopped())
        return;

    RealtimeMediaSource::ReadyState readyState = m_privateTrack->readyState();
    if (readyState == RealtimeMediaSource::Live)
        scheduleEventDispatch(Event::create(eventNames().startedEvent, false, false));
    else if (readyState == RealtimeMediaSource::Ended && !m_stoppingTrack)
        scheduleEventDispatch(Event::create(eventNames().endedEvent, false, false));

    configureTrackRendering();
}
Exemple #5
0
void MediaStreamTrack::sourceMutedChanged()
{
    if (m_stopped)
        return;

    bool muted = m_source->muted();
    if (m_muted == muted)
        return;

    m_muted = muted;
    if (m_muted)
        scheduleEventDispatch(Event::create(eventNames().muteEvent, false, false));
    else
        scheduleEventDispatch(Event::create(eventNames().unmuteEvent, false, false));

    configureTrackRendering();
}