Skip to content

Commit

Permalink
feat: use new webrtc builds (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom authored Jun 30, 2023
1 parent 8387ad8 commit 5ceda45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion webrtc-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
use regex::Regex;
use reqwest::StatusCode;
use std::env;
use std::fs;
use std::io::BufRead;
use std::io::{self, Write};
use std::path;
use std::process::Command;

const WEBRTC_TAG: &str = "webrtc-beb0471";
const WEBRTC_TAG: &str = "webrtc-4a9b827";
const IGNORE_DEFINES: [&str; 2] = ["CR_CLANG_REVISION", "CR_XCODE_VERSION"];

fn download_prebuilt_webrtc(
Expand All @@ -30,6 +31,7 @@ fn download_prebuilt_webrtc(

let target_os = match target_os.as_str() {
"windows" => "win",
"macos" => "mac",
_ => &target_os,
};

Expand All @@ -52,6 +54,9 @@ fn download_prebuilt_webrtc(
// Download WebRTC-SDK
let res = reqwest::blocking::get(&file_url);
if let Ok(mut res) = res {
if res.status() != StatusCode::OK {
return Err(format!("Failed to download {}: {}", file_url, res.status()).into());
}
let mut writer = io::BufWriter::new(file);
io::copy(&mut res, &mut writer)?;
} else {
Expand Down

0 comments on commit 5ceda45

Please sign in to comment.