Line data Source code
1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim:set ts=2 sw=2 et tw=78: */
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 :
7 : #ifndef mozilla_dom_AudioTrack_h
8 : #define mozilla_dom_AudioTrack_h
9 :
10 : #include "MediaTrack.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 0 : class AudioTrack : public MediaTrack
16 : {
17 : public:
18 : AudioTrack(const nsAString& aId,
19 : const nsAString& aKind,
20 : const nsAString& aLabel,
21 : const nsAString& aLanguage,
22 : bool aEnabled);
23 :
24 : JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
25 :
26 0 : AudioTrack* AsAudioTrack() override
27 : {
28 0 : return this;
29 : }
30 :
31 : void SetEnabledInternal(bool aEnabled, int aFlags) override;
32 :
33 : // WebIDL
34 0 : bool Enabled() const
35 : {
36 0 : return mEnabled;
37 : }
38 :
39 : void SetEnabled(bool aEnabled);
40 :
41 : private:
42 : bool mEnabled;
43 : };
44 :
45 : } // namespace dom
46 : } // namespace mozilla
47 :
48 : #endif // mozilla_dom_AudioTrack_h
|