Skip to content

Commit

Permalink
fix web merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rogurotus committed Aug 25, 2023
1 parent 710a92e commit b7cd1a2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 7 additions & 3 deletions e2e/src/object/tracks_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,15 @@ impl<T> Object<TracksStore<T>> {
if ({remote}) {{
for (track of store.tracks) {{
var tr = track.track;
if ({live} && !track.stopped
&& tr.media_direction() == 0) {{
if ({live} &&
!track.stopped &&
tr.media_direction() == 0)
{{
count++;
}} else if (!{live} &&
(track.stopped || tr.media_direction() != 0)) {{
(track.stopped ||
tr.media_direction() != 0))
{{
count++;
}}
}}
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/steps/track.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::time::Duration;
use std::{env, time::Duration};

use cucumber::then;
use medea_e2e::object::{MediaKind, MediaSourceKind};
Expand Down Expand Up @@ -178,7 +178,7 @@ async fn then_doesnt_have_remote_track(
kind: String,
partner_id: String,
) {
let live = cfg!(feature = "sfu") && !live.is_empty();
let live = env::var("SFU").is_ok() && !live.is_empty();
let member = world.get_member(&id).unwrap();
let partner_connection = member
.connections()
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/world/member.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Medea media server member representation.

use std::{cell::RefCell, collections::HashMap, fmt, time::Duration};
use std::{cell::RefCell, collections::HashMap, env, fmt, time::Duration};

use derive_more::{Display, Error, From};
use medea_e2e::{
Expand Down Expand Up @@ -219,7 +219,7 @@ impl Member {
/// [`RemoteTrack`]: crate::object::remote_track::RemoteTrack
#[must_use]
pub fn count_of_tracks_between_members(&self, other: &Self) -> (u64, u64) {
if cfg!(feature = "sfu") {
if env::var("SFU").is_ok() {
return (3, 3);
}

Expand Down

0 comments on commit b7cd1a2

Please sign in to comment.