mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
servo-media 1e28d1d997: don't unwrap ServoMedia::get() (#35049)
Signed-off-by: mcc <andi.m.mcclure@gmail.com>
This commit is contained in:
parent
7b15d9c44f
commit
d5993a0cea
7 changed files with 23 additions and 24 deletions
|
@ -1361,7 +1361,7 @@ impl HTMLMediaElement {
|
|||
let pipeline_id = window.pipeline_id();
|
||||
let client_context_id =
|
||||
ClientContextId::build(pipeline_id.namespace_id.0, pipeline_id.index.0.get());
|
||||
let player = ServoMedia::get().unwrap().create_player(
|
||||
let player = ServoMedia::get().create_player(
|
||||
&client_context_id,
|
||||
stream_type,
|
||||
action_sender,
|
||||
|
@ -2165,7 +2165,7 @@ impl HTMLMediaElementMethods<crate::DomTypeHolder> for HTMLMediaElement {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-navigator-canplaytype
|
||||
fn CanPlayType(&self, type_: DOMString) -> CanPlayTypeResult {
|
||||
match ServoMedia::get().unwrap().can_play_type(&type_) {
|
||||
match ServoMedia::get().can_play_type(&type_) {
|
||||
SupportsMediaType::No => CanPlayTypeResult::_empty,
|
||||
SupportsMediaType::Maybe => CanPlayTypeResult::Maybe,
|
||||
SupportsMediaType::Probably => CanPlayTypeResult::Probably,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue