Tizen WASM Player
Tizen TV WebAssembly Media Player extension allowing for a low-level elementary media stream playback.
|
Allows receiving ElementaryMediaTrack
events.
More...
#include <elementary_media_track_listener.h>
Public Member Functions | |
virtual | ~ElementaryMediaTrackListener ()=default |
virtual void | OnTrackOpen () |
Fired when the track is ready to accept data. More... | |
virtual void | OnTrackClosed (ElementaryMediaTrack::CloseReason) |
virtual void | OnSeek (Seconds) |
virtual void | OnSessionIdChanged (SessionId) |
virtual void | OnAppendError (OperationResult) |
Allows receiving ElementaryMediaTrack
events.
ElementaryMediaTrack
events are delivered via this interface when a listener is registered by ElementaryMediaTrack::SetListener()
.
ElementaryMediaTrack
Definition at line 25 of file elementary_media_track_listener.h.
|
virtualdefault |
|
inlinevirtual |
Fired when one of async append methods fail:
ElementaryMediaTrack::AppendPacketAsync()
ElementaryMediaTrack::AppendEncryptedPacketAsync()
ElementaryMediaTrack::AppendEndOfTrackAsync()
A code identifying an error is passed as an argument.[in] | operation_result | Error code representing append error. |
Definition at line 95 of file elementary_media_track_listener.h.
|
inlinevirtual |
Fired when an associated html::HTMLMediaElement
is seeking. This is a result of either a call to html::HTMLMediaElement::SetCurrentTime()
or direct user interaction with HTMLMediaElement
with controls enabled. New playback time is delivered as an argument to this function.
Seek sequence:
ElementaryMediaTrackListener::OnTrackClosed()
is fired with a reason argument set to ElementaryMediaTrack::CloseReason::kTrackSeeking
.ElementaryMediaTrackListener::OnSessionIdChanged()
is fired indicating the beginning of a new session. Packets with the old SessionId
are dropped by the backend. This may fire multiple times if multiple seek operations were performed in a close successionElementaryMediaTrackListener::OnSeek()
is fired with an argument set to a new playback time. This event may fire multiple times if multiple seek operations were performed in a close succession.ElementaryMediaTrackListener::OnTrackOpen()
is fired.If an associated ElementaryMediaStreamSource
is in the ElementaryMediaStreamSource::ReadyState::kOpen
state when seeking occurs, it will change it's state to ElementaryMediaStreamSource::ReadyState::kOpenPending
for the duration of the sequence above.
Please note this event doesn't fire at the same time that html::HTMLMediaElement
's seeking
and seeked
events. A source of media data should use this event to seek to the new playback position.
[in] | new_time | A time to which the seek is being performed. |
SessionId
Definition at line 71 of file elementary_media_track_listener.h.
|
inlinevirtual |
Fired when id of the current session is changed, which happens when track is closed.
ElementaryMediaTrack::GetSessionId()
, which should be used only to obtain an initial value of session_id
).[in] | session_id | Id of new session. |
Definition at line 86 of file elementary_media_track_listener.h.
|
inlinevirtual |
Fired when an associated source enters a state that makes this track unable of accepting data. A reason for closing the track is passed as an argument.
[in] | close_reason | A reason for closing this track. |
Definition at line 37 of file elementary_media_track_listener.h.
|
inlinevirtual |
Fired when the track is ready to accept data.
Definition at line 30 of file elementary_media_track_listener.h.