Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

onUpdateMetadata not called when tracks not supported #9

Closed
@mr-tichyt

Description

When the tracks are not supported in the stream the onUpdateMetadata callback exits even before it notifies about change of other metadata like title, subtitle, logo, mediaType...

video.media.ts

  protected onUpdateMetadata(event): void {
    if (!this.mediaElement) {
      Log.warn("MediaElement is null, ignore event (" + event.type + ")");
      return;
    }
    if (!this.metadata) {
      Log.warn("Metadata is null !!! ( implementation error )");
      return;
    }

    if (
      !(
        this.mediaElement.audioTracks &&
        this.mediaElement.videoTracks &&
        this.mediaElement.textTracks
      )
    ) {
      Log.warn("Tracks not implemented !!! ( implementation error )");
      return;
    }
    let signature: string = JSON.stringify(this.metadata);
    this.updateTracks();
    if (JSON.stringify(this.metadata) !== signature) {
      this.mediaChannel.onUpdateMetadata(this.getMedatadata());
    }
  }

The other metadata never gets to the app...

Thank you,
Tomas

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions