expose mime type
This commit is contained in:
@@ -35,12 +35,17 @@ abstract class TrackPublication<T extends Track> extends Disposable {
|
|||||||
bool simulcasted = false;
|
bool simulcasted = false;
|
||||||
VideoDimensions? dimension;
|
VideoDimensions? dimension;
|
||||||
|
|
||||||
|
/// The MIME type of the track
|
||||||
|
String get mimeType => _mimeType;
|
||||||
|
String _mimeType;
|
||||||
|
|
||||||
bool get subscribed => track != null;
|
bool get subscribed => track != null;
|
||||||
|
|
||||||
TrackPublication({
|
TrackPublication({
|
||||||
required lk_models.TrackInfo info,
|
required lk_models.TrackInfo info,
|
||||||
}) : sid = info.sid,
|
}) : sid = info.sid,
|
||||||
name = info.name,
|
name = info.name,
|
||||||
|
_mimeType = info.mimeType,
|
||||||
kind = info.type,
|
kind = info.type,
|
||||||
source = info.source.toLKType() {
|
source = info.source.toLKType() {
|
||||||
updateFromInfo(info);
|
updateFromInfo(info);
|
||||||
@@ -52,6 +57,7 @@ abstract class TrackPublication<T extends Track> extends Disposable {
|
|||||||
|
|
||||||
void updateFromInfo(lk_models.TrackInfo info) {
|
void updateFromInfo(lk_models.TrackInfo info) {
|
||||||
simulcasted = info.simulcast;
|
simulcasted = info.simulcast;
|
||||||
|
_mimeType = info.mimeType;
|
||||||
if (info.type == lk_models.TrackType.VIDEO) {
|
if (info.type == lk_models.TrackType.VIDEO) {
|
||||||
dimension = VideoDimensions(info.width, info.height);
|
dimension = VideoDimensions(info.width, info.height);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user