Move media backend initialization to process startup.

This commit is contained in:
Josh Matthews 2019-03-29 15:31:01 -04:00
parent 17204544d9
commit eebd831ea5
8 changed files with 12 additions and 11 deletions

View file

@ -72,7 +72,6 @@ use servo_config::pref;
use servo_media::player::frame::{Frame, FrameRenderer};
use servo_media::player::{PlaybackState, Player, PlayerError, PlayerEvent, StreamType};
use servo_media::ServoMedia;
use servo_media_auto::Backend;
use servo_url::ServoUrl;
use std::cell::Cell;
use std::collections::VecDeque;
@ -276,7 +275,6 @@ pub enum ReadyState {
impl HTMLMediaElement {
pub fn new_inherited(tag_name: LocalName, prefix: Option<Prefix>, document: &Document) -> Self {
ServoMedia::init::<Backend>();
Self {
htmlelement: HTMLElement::new_inherited(tag_name, prefix, document),
network_state: Cell::new(NetworkState::Empty),