mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-26 17:46:26 +03:00
Expand player stats and track metadata
Visible changes: - Add loadLatency stat - Add mimeType to tracks - Track state changes (buffering, playing, paused, ended) Internal changes: - Track switchHistory, playTime, bufferingTime in private Stats struct - Remove dead timer code Change-Id: I4566373251b9876b0d4f762a9d77aa50aea8ed00
This commit is contained in:
@@ -231,6 +231,9 @@ shaka.util.StreamUtils.getVariantTracks =
|
||||
if (codecs != '') codecs += ', ';
|
||||
codecs += variant.audio.codecs;
|
||||
}
|
||||
var mimeType = null;
|
||||
if (variant.video) mimeType = variant.video.mimeType;
|
||||
else if (variant.audio) mimeType = variant.audio.mimeType;
|
||||
|
||||
return {
|
||||
id: variant.id,
|
||||
@@ -242,6 +245,7 @@ shaka.util.StreamUtils.getVariantTracks =
|
||||
width: variant.video ? variant.video.width : null,
|
||||
height: variant.video ? variant.video.height : null,
|
||||
frameRate: variant.video ? variant.video.frameRate : undefined,
|
||||
mimeType: mimeType,
|
||||
codecs: codecs
|
||||
};
|
||||
});
|
||||
@@ -265,6 +269,7 @@ shaka.util.StreamUtils.getTextTracks = function(period, activeStream) {
|
||||
type: 'text',
|
||||
language: stream.language,
|
||||
kind: stream.kind,
|
||||
mimeType: stream.mimeType,
|
||||
codecs: stream.codecs || null
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user