tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

AudioTrackList.h (1111B)


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