pub struct RTCOutboundRtpStreamStats(/* private fields */);
Implementations§
Source§impl RTCOutboundRtpStreamStats
impl RTCOutboundRtpStreamStats
pub fn get_packets_sent(&self) -> JsNullable<JsNumber>
pub fn set_packets_sent(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_bytes_sent(&self) -> JsNullable<JsNumber>
pub fn set_bytes_sent(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_total_packet_send_delay(&self) -> JsNullable<JsNumber>
pub fn set_total_packet_send_delay( &self, value: &dyn ToJs<JsNullable<JsNumber>>, )
pub fn get_total_encoded_bytes_target(&self) -> JsNullable<JsNumber>
pub fn set_total_encoded_bytes_target( &self, value: &dyn ToJs<JsNullable<JsNumber>>, )
pub fn get_total_encode_time(&self) -> JsNullable<JsNumber>
pub fn set_total_encode_time(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_target_bitrate(&self) -> JsNullable<JsNumber>
pub fn set_target_bitrate(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_rid(&self) -> JsNullable<JsString>
pub fn set_rid(&self, value: &dyn ToJs<JsNullable<JsString>>)
pub fn get_retransmitted_packets_sent(&self) -> JsNullable<JsNumber>
pub fn set_retransmitted_packets_sent( &self, value: &dyn ToJs<JsNullable<JsNumber>>, )
pub fn get_retransmitted_bytes_sent(&self) -> JsNullable<JsNumber>
pub fn set_retransmitted_bytes_sent( &self, value: &dyn ToJs<JsNullable<JsNumber>>, )
pub fn get_remote_id(&self) -> JsNullable<JsString>
pub fn set_remote_id(&self, value: &dyn ToJs<JsNullable<JsString>>)
pub fn get_quality_limitation_resolution_changes(&self) -> JsNullable<JsNumber>
pub fn set_quality_limitation_resolution_changes( &self, value: &dyn ToJs<JsNullable<JsNumber>>, )
pub fn get_qp_sum(&self) -> JsNullable<JsNumber>
pub fn set_qp_sum(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_pli_count(&self) -> JsNullable<JsNumber>
pub fn set_pli_count(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_nack_count(&self) -> JsNullable<JsNumber>
pub fn set_nack_count(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_media_source_id(&self) -> JsNullable<JsString>
pub fn set_media_source_id(&self, value: &dyn ToJs<JsNullable<JsString>>)
pub fn get_key_frames_encoded(&self) -> JsNullable<JsNumber>
pub fn set_key_frames_encoded(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_huge_frames_sent(&self) -> JsNullable<JsNumber>
pub fn set_huge_frames_sent(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_header_bytes_sent(&self) -> JsNullable<JsNumber>
pub fn set_header_bytes_sent(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_frames_sent(&self) -> JsNullable<JsNumber>
pub fn set_frames_sent(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_frames_per_second(&self) -> JsNullable<JsNumber>
pub fn set_frames_per_second(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_frames_encoded(&self) -> JsNullable<JsNumber>
pub fn set_frames_encoded(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_frame_width(&self) -> JsNullable<JsNumber>
pub fn set_frame_width(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_frame_height(&self) -> JsNullable<JsNumber>
pub fn set_frame_height(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
pub fn get_fir_count(&self) -> JsNullable<JsNumber>
pub fn set_fir_count(&self, value: &dyn ToJs<JsNullable<JsNumber>>)
Methods from Deref<Target = JsObject>§
Sourcepub fn js_get_field(&self, property: &dyn UseInJsCode) -> JsValue
pub fn js_get_field(&self, property: &dyn UseInJsCode) -> JsValue
Get a field value of in this object.
WSDOM provides built-in getters so you should use that instead when possible.
Use js_get_field
only when needed
fn example(browser: Browser) {
// you can get `window["location"]["href"]` like this
let href: JsValue = wsdom::dom::location(&browser).js_get_field(&"href");
// but you should use built-in getters instead
let href: JsString = wsdom::dom::location(&browser).get_href();
}
Sourcepub fn js_set_field(&self, property: &dyn UseInJsCode, value: &dyn UseInJsCode)
pub fn js_set_field(&self, property: &dyn UseInJsCode, value: &dyn UseInJsCode)
Set a field value of in this object.
WSDOM provides built-in setters so you should use that instead when possible.
Use js_set_field
only when needed
fn example(browser: Browser) {
// you can set `window["location"]["href"]` like this
wsdom::dom::location(&browser).js_set_field(&"href", &"https://example.com/");
// but you should use built-in setters instead
wsdom::dom::location(&browser).set_href(&"https://example.com");
}
Sourcepub fn js_call_method<'a>(
&'a self,
method_name: &'a str,
args: impl IntoIterator<Item = &'a dyn UseInJsCode>,
last_arg_variadic: bool,
) -> JsValue
pub fn js_call_method<'a>( &'a self, method_name: &'a str, args: impl IntoIterator<Item = &'a dyn UseInJsCode>, last_arg_variadic: bool, ) -> JsValue
Call a method on this object.
Most types in WSDOM already come with safe Rust wrappers for their methods, so you should use those instead.
fn example(browser: &Browser) {
let console = wsdom::dom::console(browser);
// you can call console.log like this
console.js_call_method("log", [&"hello" as &_], false);
// but the better way is to use
wsdom::dom::console(&browser).log(&[&"Hello" as &_]);
}
Be aware that the first argument (method_name
) is NOT escaped.
Set last_arg_variadic
to true
if you want to “spread” the last argument as obj.method(arg1, arg2, ...arg3)
.
Sourcepub fn js_call_self<'a>(
&'a self,
args: impl IntoIterator<Item = &'a dyn UseInJsCode>,
last_arg_variadic: bool,
) -> JsValue
pub fn js_call_self<'a>( &'a self, args: impl IntoIterator<Item = &'a dyn UseInJsCode>, last_arg_variadic: bool, ) -> JsValue
Call this object: obj()
.
Most types in WSDOM already come with safe Rust wrappers for their methods, so you should use those instead.
Methods from Deref<Target = JsValue>§
pub fn browser(&self) -> &Browser
Sourcepub fn retrieve_json(&self) -> RetrieveFuture<'_, Value>
pub fn retrieve_json(&self) -> RetrieveFuture<'_, Value>
Retrive this value from the JS side to the Rust side. Returns Future whose output is a serde_json::Value.
§use wsdom::dom::Browser
§use wsdom::dom::HTMLInputElement;
async fn example(input: &HTMLInputElement) { let _val = input.get_value().retrieve_json().await; }
Trait Implementations§
Source§impl AsRef<JsObject> for RTCOutboundRtpStreamStats
impl AsRef<JsObject> for RTCOutboundRtpStreamStats
Source§impl AsRef<JsValue> for RTCOutboundRtpStreamStats
impl AsRef<JsValue> for RTCOutboundRtpStreamStats
Source§impl AsRef<RTCRtpStreamStats> for RTCOutboundRtpStreamStats
impl AsRef<RTCRtpStreamStats> for RTCOutboundRtpStreamStats
Source§fn as_ref(&self) -> &RTCRtpStreamStats
fn as_ref(&self) -> &RTCRtpStreamStats
Source§impl AsRef<RTCSentRtpStreamStats> for RTCOutboundRtpStreamStats
impl AsRef<RTCSentRtpStreamStats> for RTCOutboundRtpStreamStats
Source§fn as_ref(&self) -> &RTCSentRtpStreamStats
fn as_ref(&self) -> &RTCSentRtpStreamStats
Source§impl AsRef<RTCStats> for RTCOutboundRtpStreamStats
impl AsRef<RTCStats> for RTCOutboundRtpStreamStats
Source§impl Clone for RTCOutboundRtpStreamStats
impl Clone for RTCOutboundRtpStreamStats
Source§fn clone(&self) -> RTCOutboundRtpStreamStats
fn clone(&self) -> RTCOutboundRtpStreamStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more