diff --git a/cobalt/dom/html_media_element.cc b/cobalt/dom/html_media_element.cc index 45a49ca18f6c..ade06946cc33 100644 --- a/cobalt/dom/html_media_element.cc +++ b/cobalt/dom/html_media_element.cc @@ -644,21 +644,16 @@ void HTMLMediaElement::ScheduleEvent(const scoped_refptr& event) { event_queue_.Enqueue(event); } -std::string HTMLMediaElement::h5vcc_audio_connectors( - script::ExceptionState* exception_state) const { +std::string HTMLMediaElement::h5vcc_audio_connectors() const { #if SB_API_VERSION >= 15 if (!player_) { - web::DOMException::Raise(web::DOMException::kInvalidStateErr, - exception_state); - return std::string(); + return ""; } std::vector configs = player_->GetAudioConnectors(); return base::JoinString(configs, ";"); #else // SB_API_VERSION >= 15 - web::DOMException::Raise(web::DOMException::kNotSupportedErr, - exception_state); - return std::string(); + return ""; #endif // SB_API_VERSION >= 15 } diff --git a/cobalt/dom/html_media_element.h b/cobalt/dom/html_media_element.h index 559c72a0ab60..f4eefebf3a1e 100644 --- a/cobalt/dom/html_media_element.h +++ b/cobalt/dom/html_media_element.h @@ -149,8 +149,7 @@ class HTMLMediaElement : public HTMLElement, // Returns semicolon separated names of audio connectors, like // "hdmi;bluetooth". // TODO(b/267678497): The current interface is tentative, to be refined. - std::string h5vcc_audio_connectors( - script::ExceptionState* exception_state) const; + std::string h5vcc_audio_connectors() const; // Set max video capabilities. void SetMaxVideoCapabilities(const std::string& max_video_capabilities, diff --git a/cobalt/dom/html_media_element.idl b/cobalt/dom/html_media_element.idl index 401060a6f7b7..f3b79173e6c6 100644 --- a/cobalt/dom/html_media_element.idl +++ b/cobalt/dom/html_media_element.idl @@ -63,8 +63,7 @@ interface HTMLMediaElement : HTMLElement { attribute boolean muted; // non standard, semicolon separated names of audio connectors, like - // "hdmi;bluetooth". It raises `NotSupportedError` on apps doesn't support - // this feature, or `InvalidStateError` if there isn't an active playback. + // "hdmi;bluetooth". // TODO(b/267678497): The current interface is tentative, to be refined. - [RaisesException] readonly attribute DOMString h5vccAudioConnectors; + readonly attribute DOMString h5vccAudioConnectors; };