AudioTrackList.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #ifndef mozilla_dom_AudioTrackList_h
  7. #define mozilla_dom_AudioTrackList_h
  8. #include "MediaTrack.h"
  9. #include "MediaTrackList.h"
  10. namespace mozilla {
  11. namespace dom {
  12. class AudioTrack;
  13. class AudioTrackList : public MediaTrackList
  14. {
  15. public:
  16. AudioTrackList(nsPIDOMWindowInner* aOwnerWindow, HTMLMediaElement* aMediaElement)
  17. : MediaTrackList(aOwnerWindow, aMediaElement) {}
  18. JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
  19. AudioTrack* operator[](uint32_t aIndex);
  20. // WebIDL
  21. AudioTrack* IndexedGetter(uint32_t aIndex, bool& aFound);
  22. AudioTrack* GetTrackById(const nsAString& aId);
  23. protected:
  24. AudioTrackList* AsAudioTrackList() override { return this; }
  25. };
  26. } // namespace dom
  27. } // namespace mozilla
  28. #endif // mozilla_dom_AudioTrackList_h