1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_HTMLAudioElement_h
7 #define mozilla_dom_HTMLAudioElement_h
9 #include "mozilla/Attributes.h"
10 #include "mozilla/dom/HTMLMediaElement.h"
11 #include "mozilla/dom/TypedArray.h"
13 typedef uint16_t nsMediaNetworkState
;
14 typedef uint16_t nsMediaReadyState
;
19 class HTMLAudioElement final
: public HTMLMediaElement
{
21 typedef mozilla::dom::NodeInfo NodeInfo
;
23 NS_IMPL_FROMNODE_HTML_WITH_TAG(HTMLAudioElement
, audio
)
25 explicit HTMLAudioElement(already_AddRefed
<NodeInfo
>&& aNodeInfo
);
28 virtual bool IsInteractiveHTMLContent() const override
;
30 // nsIDOMHTMLMediaElement
31 using HTMLMediaElement::GetPaused
;
33 virtual nsresult
Clone(NodeInfo
*, nsINode
** aResult
) const override
;
34 virtual nsresult
SetAcceptHeader(nsIHttpChannel
* aChannel
) override
;
38 static already_AddRefed
<HTMLAudioElement
> Audio(
39 const GlobalObject
& aGlobal
, const Optional
<nsAString
>& aSrc
,
43 virtual ~HTMLAudioElement();
45 virtual JSObject
* WrapNode(JSContext
* aCx
,
46 JS::Handle
<JSObject
*> aGivenProto
) override
;
50 } // namespace mozilla
52 #endif // mozilla_dom_HTMLAudioElement_h