Shaka Player Embedded
Public Member Functions | List of all members
shaka::js::mse::TimeRanges Class Reference

#include <time_ranges.h>

Inheritance diagram for shaka::js::mse::TimeRanges:
shaka::BackingObject shaka::memory::Traceable

Public Member Functions

 TimeRanges (media::BufferedRanges ranges)
 
bool IsShortLived () const override
 
uint32_t length () const
 
ExceptionOr< double > Start (uint32_t index) const
 
ExceptionOr< double > End (uint32_t index) const
 
- Public Member Functions inherited from shaka::BackingObject
 BackingObject ()
 
void Trace (memory::HeapTracer *tracer) const override
 
bool IsRootedAlive () const override
 
std::string name () const
 
virtual BackingObjectFactoryBasefactory () const =0
 
bool DerivedFrom (const std::string &base)
 
ReturnVal< JsValue > JsThis () const
 
void SetJsThis (Handle< JsObject > this_)
 
- Public Member Functions inherited from shaka::memory::Traceable
virtual ~Traceable ()
 

Additional Inherited Members

- Static Public Member Functions inherited from shaka::BackingObject
static void * operator new[] (size_t size)=delete
 
static void operator delete[] (void *)=delete
 
- Static Public Attributes inherited from shaka::BackingObject
static constexpr const size_t kInternalFieldCount = 2
 
- Static Public Attributes inherited from shaka::memory::Traceable
static constexpr const uint64_t kShortLiveDurationMs = 5000
 
- Protected Member Functions inherited from shaka::BackingObject
 ~BackingObject () override
 

Detailed Description

Definition at line 27 of file time_ranges.h.

Constructor & Destructor Documentation

§ TimeRanges()

shaka::js::mse::TimeRanges::TimeRanges ( media::BufferedRanges  ranges)
explicit

Definition at line 37 of file time_ranges.cc.

Member Function Documentation

§ End()

ExceptionOr< double > shaka::js::mse::TimeRanges::End ( uint32_t  index) const

Definition at line 52 of file time_ranges.cc.

§ IsShortLived()

Doxygen_Skip bool shaka::js::mse::TimeRanges::IsShortLived ( ) const
overridevirtual

Gets whether the object is considered short-lived. This means that once the C++ ref-count is zero, the object won't remain alive for long. It is important to only set this if the JavaScript object won't be used for long.

This exists for JSC which doesn't offer a way for us to track whether a JavaScript object is still alive. If the JavaScript object is used after the backing object is destroyed, then a JavaScript exception will be thrown.

Reimplemented from shaka::memory::Traceable.

Definition at line 42 of file time_ranges.cc.

§ length()

uint32_t shaka::js::mse::TimeRanges::length ( ) const
inline

Definition at line 35 of file time_ranges.h.

§ Start()

ExceptionOr< double > shaka::js::mse::TimeRanges::Start ( uint32_t  index) const

Definition at line 46 of file time_ranges.cc.


The documentation for this class was generated from the following files: